Bug report #20535

QCA init crash with bundled Qt AND installed Qt

Added by William Kyngesburye about 6 years ago. Updated over 5 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:mac_os_specific
Affected QGIS version:3.4.1 Regression?:No
Operating System:macOS Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:28355

Description

An old problem, new life, or maybe a new problem. When Qt is bundled in the Mac app package (standard distribution method), and the installed Qt is present (the Qt path used in compilation), QGIS immediately crashes on startup trying to initialize QCA. It's trying to load Qt plugins from the installed Qt, as well as the QGIS plugins folder, and then loading a 2nd set of Qt libraries.

This is the backtrace of the crash:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.qt-project.QtCore 0x0000000116ee0aa0 QMutex::lock() + 16
1 0x000000011bbc9b71 QCA::Global::get_logger() + 27
2 libqca-softstore.dylib 0x000000011bcf8b83 softstoreProvider::features() const + 21
3 0x0000000109e2a654 QCA::ProviderManager::allFeatures() const + 204
4 0x0000000109deb34c QCA::supportedFeatures() + 89
5 org.qgis.qgis3_core 0x0000000105757ec2 QgsAuthManager::init(QString const&, QString const&) + 108
6 org.qgis.qgis3_core 0x000000010588892b QgsApplication::initQgis() + 271
7 libqgis_app.3.4.1.dylib 0x000000010393f11e QgisApp::QgisApp(QSplashScreen*, bool, bool, QString const&, QString const&, QWidget*, QFlags<Qt::WindowType>) + 2362
8 org.qgis.qgis3 0x000000010347ae77 main + 20183
9 libdyld.dylib 0x00007fffcc126235 start + 1

I found a Qt bug report about Qt ignoring qt.conf (the one we need to have in the app package so QGIS loads from its copy of plugins) when supportedImageFormats is called:

https://bugreports.qt.io/browse/QTBUG-27811

I didn't see any supportedImageFormats calls in QCA, but maybe it's a similar problem?

Maybe an alternate method to get QGIS to use the app package plugins folder is to use setLibraryPaths mentioned here: http://doc.qt.io/qt-5/osx-deployment.html#qt-plugins

History

#1 Updated by Denis Rouzaud over 5 years ago

  • Assignee deleted (Denis Rouzaud)

Also available in: Atom PDF