Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-36908

QSettings::setPath() segmentation fault in Qt3support mode

    XMLWordPrintable

    Details

    • Commits:
      0315971ee951e9abe7f288564ddf2e81aeed1fd8 (4.8, 26.2.2014, 4.8.6)

      Description

      Using QSettings:setPath() several times in Qt3Support mode causes segmentation fault. It's caused because in QSettings:setPath_helper() is created new QSettingsPrivate and old is deleted by QScopedPointer::reset(). Reset Cleanup decreases reference counter. But setting new private instance doesn't increase it. Reference counting is out of sync and cause crash when application is closing.

      Valgrind summary of attached example:
      ==5106== ERROR SUMMARY: 3 errors from 1 contexts (suppressed: 0 from 0)

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes