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

Settings::sync() doesn't always work on macOS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      We are using QSettings in our tests to setup Qbs parameters.
      The pattern we use is the following:
      1. Create QSettings object
      2. Write some data into it
      3. Call sync()
      4. Run Qbs (which should read those settings)
      5. Remove previously written settings (via dtor of the helper object)
      6. Destroy QSetting object

      Here are some examples of this pattern: one, two, three

      However, it appears that external process (qbs) launched after call to sync() does not get the settings written into the config: one, two, three. It almost looks like a data race like sync() was not called at all.

      This only happens on macOS hosts on Github. It also appears that QSettings does not report any error - I've added a check and the tests fails, while sync() appears to be successful. I cannot reproduce that locally.

      I am not sure if this is a QSettings bug or an issue with GitHub VMs. However, it happens too often to simply ignore the issue (though it works as expected on Linux and Windows and most of the time on macOS) and I am a bit out of ideas how to proceed further.

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            arch Ivan Komissarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes