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

QSettings sync fails on Android 7 and 8

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Fixed
    • Affects Version/s: 5.11.0 RC 1
    • Fix Version/s: 5.11.1
    • Component/s: Core: Other
    • Labels:
      None
    • Commits:
      f86fbc45667528ac9a496d1476bd139f26b3b5bc

      Description

      We encountered a bug on Android 7 and 8 when using QSettings/QTemporaryFile. The QSettings cannot be written. When calling sync the settings file cannot be created.

      Steps to reproduce:

      1. Create QSettings object
      2. Set value
      3. Call sync

      Our current understanding of the problem:

      In this commit https://github.com/qt/qtbase/commit/189e9c93d7ed42202ad51507c8944d64e9a7888d the function createUnnamedFile was introduced to QTemporaryFile. It uses a Linux feature to create a temporary file without a filepath. QSettings seems to use QTemporaryFile. When calling sync the call to the libc function "linkat" fails. We could temporarily fix the problem by returning "CreateUnnamedFileStatus::NotSupported" in src/corelib/io/qtemporaryfile.cpp::createUnnamedFile() .

        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:
              jtrillma Jens Trillmann
            • Votes:
              4 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes