Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.3.2
-
None
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