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

QSharedMemory doesn't work as described for Mac AppStore builds

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.3.2
    • Core: Other
    • None
    • macOS

    Description

      QSharedMemory does not work as described at https://doc.qt.io/qt-6/qsharedmemory.html#details - see notes for Apple Platforms.

       

      Minimal example which reproduces the problem:

      https://github.com/itay-grudev/SingleApplication/tree/master/examples/basic

      Note: to test the above example, singleapplication_p.cpp should be patched to assign

      blockServerName = "<apple_team_id>.myapp/shared"; 

      in the function genBlockServerName(), as per the Qt docs linked to above.

       

      Expected result:

      Application loads and runs as usual.

       

      Actual Result:

      Application crashes on startup with this message in terminal:

      SingleApplication: Unable to create block.
      SingleApplication: 1 "QSharedMemoryPrivate::initKey: unable to set key on lock"
      

       

      Tested with:

      • Qt 6.3.2 built with `-feature-ipc_posix` enabled
      • AppStore Connect resources created:
        • Developer ID Application certificate
        • Application ID
        • Application Group ID
        • Provisioning Profile
      • shmem key formatted as per documentation, ensuring <30 chars, ie "XXX1XX11XX.myapp/shared"

       

      Reference:

      See discussion at: https://github.com/itay-grudev/SingleApplication/issues/136

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            danryu dan garton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes