Skip to content
This repository has been archived by the owner on Sep 24, 2023. It is now read-only.

DMG install created with CPack for Qt5 crashes when run on OSX #189

Open
mkae opened this issue Jan 21, 2015 · 4 comments
Open

DMG install created with CPack for Qt5 crashes when run on OSX #189

mkae opened this issue Jan 21, 2015 · 4 comments

Comments

@mkae
Copy link

mkae commented Jan 21, 2015

I have built a DMG using cpack in an OSX 10.9.5 Parallels guest system
with the current MacPorts version of charm (aca5faf).

But when I copy this to my host system and run the application after finally
installing it I get a crash:

thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x00007fff93962866 __pthread_kill + 10
1   libsystem_pthread.dylib         0x00007fff92cb335c pthread_kill + 92
2   libsystem_c.dylib               0x00007fff88a85b1a abort + 125
3   QtCore                          0x000000010c1fd109 qt_message_fatal(QtMsgType, QMessageLogContext const&, QString const&) + 9
4   QtCore                          0x000000010c1fe5b1 QMessageLogger::fatal(char const*, ...) const + 161
5   QtGui                           0x000000010cff9088 QGuiApplicationPrivate::createPlatformIntegration() + 5672
6   QtGui                           0x000000010cff90ab QGuiApplicationPrivate::createEventDispatcher() + 27
7   QtCore                          0x000000010c3afe01 QCoreApplication::init() + 113
8   QtCore                          0x000000010c3afd77 QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39
9   QtGui                           0x000000010cff680e QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14
10  QtWidgets                       0x000000010c71f82e QApplication::QApplication(int&, char**, int) + 206
11  com.kdab                        0x000000010c03c659 main + 537
12  libdyld.dylib                   0x00007fff87f415fd start + 1

The host system has no Qt5 installed, but runs qt4-mac from MacPorts instead.

Still, charm's application package contains all the needed libs, as I believe.

What can be done to diagnose this? Shall I send the complete crash log?

@mkae
Copy link
Author

mkae commented Jan 21, 2015

I reinstalled the version 1.8.0 from GitHub and get this error on the console:

$ /Applications/Charm.app/Contents/MacOS/Charm 
This application failed to start because it could not find or load the Qt platform plugin "cocoa".

Reinstalling the application may fix this problem.
Abort trap: 6

Which seems to be of no surprise, as it is not in the app bundle:

$ find /Applications/Charm.app/Contents -name "*cocoa*"
$

@mkae
Copy link
Author

mkae commented Jan 21, 2015

Ah, ok, I see now that in principle all of these:

/opt/local/Library/Frameworks/QtCore.framework/Versions/5/QtCore
/opt/local/Library/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
/opt/local/Library/Frameworks/QtXml.framework/Versions/5/QtXml
/opt/local/Library/Frameworks/QtNetwork.framework/Versions/5/QtNetwork
/opt/local/Library/Frameworks/QtSql.framework/Versions/5/QtSql
/opt/local/Library/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport
/opt/local/Library/Frameworks/QtMacExtras.framework/Versions/5/QtMacExtras
/opt/local/Library/Frameworks/QtGui.framework/Versions/5/QtGui
/opt/local/lib/libz.1.2.8.dylib
/opt/local/lib/libicui18n.54.1.dylib
/opt/local/lib/libicuuc.54.1.dylib
/opt/local/lib/libicudata.54.1.dylib
/opt/local/lib/libpcre16.0.dylib
/opt/local/lib/libgthread-2.0.0.dylib
/opt/local/lib/libglib-2.0.0.dylib
/opt/local/lib/libintl.8.dylib
/opt/local/lib/libiconv.2.dylib
/opt/local/lib/libpng16.16.dylib
/opt/local/lib/libssl.1.0.0.dylib
/opt/local/lib/libcrypto.1.0.0.dylib
/opt/local/share/qt5/plugins/platforms/libqcocoa.dylib
/opt/local/share/qt5/plugins/imageformats/libqdds.dylib
/opt/local/share/qt5/plugins/imageformats/libqgif.dylib
/opt/local/share/qt5/plugins/imageformats/libqicns.dylib
/opt/local/share/qt5/plugins/imageformats/libqico.dylib
/opt/local/share/qt5/plugins/imageformats/libqjpeg.dylib
/opt/local/lib/libjpeg.9.dylib
/opt/local/share/qt5/plugins/imageformats/libqmng.dylib
/opt/local/share/qt5/plugins/imageformats/libqsvg.dylib
/opt/local/share/qt5/plugins/imageformats/libqjp2.dylib
/opt/local/lib/libmng.1.dylib
/opt/local/lib/liblcms.1.0.19.dylib
/opt/local/Library/Frameworks/QtSvg.framework/Versions/5/QtSvg
/opt/local/share/qt5/plugins/imageformats/libqtga.dylib
/opt/local/share/qt5/plugins/imageformats/libqtiff.dylib
/opt/local/lib/libtiff.5.dylib
/opt/local/lib/liblzma.5.dylib
/opt/local/share/qt5/plugins/imageformats/libqwbmp.dylib
/opt/local/share/qt5/plugins/imageformats/libqwebp.dylib
/opt/local/share/qt5/plugins/accessible/libqtaccessiblewidgets.dylib
/opt/local/share/qt5/plugins/sqldrivers/libqsqlite.dylib
/opt/local/lib/libsqlite3.0.dylib

should get distributed in the tool’s package, if I don’t have Qt5 installed on the host system…

Well, I have in the app package this:

$ find .
.
./Frameworks
./Frameworks/QtCore.framework
./Frameworks/QtCore.framework/Versions
./Frameworks/QtCore.framework/Versions/5
./Frameworks/QtCore.framework/Versions/5/QtCore
./Frameworks/QtGui.framework
./Frameworks/QtGui.framework/Versions
./Frameworks/QtGui.framework/Versions/5
./Frameworks/QtGui.framework/Versions/5/QtGui
./Frameworks/QtMacExtras.framework
./Frameworks/QtMacExtras.framework/Versions
./Frameworks/QtMacExtras.framework/Versions/5
./Frameworks/QtMacExtras.framework/Versions/5/QtMacExtras
./Frameworks/QtNetwork.framework
./Frameworks/QtNetwork.framework/Versions
./Frameworks/QtNetwork.framework/Versions/5
./Frameworks/QtNetwork.framework/Versions/5/QtNetwork
./Frameworks/QtPrintSupport.framework
./Frameworks/QtPrintSupport.framework/Versions
./Frameworks/QtPrintSupport.framework/Versions/5
./Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport
./Frameworks/QtSql.framework
./Frameworks/QtSql.framework/Versions
./Frameworks/QtSql.framework/Versions/5
./Frameworks/QtSql.framework/Versions/5/QtSql
./Frameworks/QtWidgets.framework
./Frameworks/QtWidgets.framework/Versions
./Frameworks/QtWidgets.framework/Versions/5
./Frameworks/QtWidgets.framework/Versions/5/QtWidgets
./Frameworks/QtXml.framework
./Frameworks/QtXml.framework/Versions
./Frameworks/QtXml.framework/Versions/5
./Frameworks/QtXml.framework/Versions/5/QtXml
./Info.plist
./MacOS
./MacOS/Charm
./MacOS/libcrypto.1.0.0.dylib
./MacOS/libglib-2.0.0.dylib
./MacOS/libgthread-2.0.0.dylib
./MacOS/libiconv.2.dylib
./MacOS/libicudata.54.dylib
./MacOS/libicui18n.54.dylib
./MacOS/libicuuc.54.dylib
./MacOS/libintl.8.dylib
./MacOS/libpcre16.0.dylib
./MacOS/libpng16.16.dylib
./MacOS/libssl.1.0.0.dylib
./MacOS/libz.1.dylib
./Resources
./Resources/Charm.icns
./Resources/qt.conf

which leaves me with these missing:

/opt/local/share/qt5/plugins/platforms/libqcocoa.dylib
/opt/local/share/qt5/plugins/imageformats/libqdds.dylib
/opt/local/share/qt5/plugins/imageformats/libqgif.dylib
/opt/local/share/qt5/plugins/imageformats/libqicns.dylib
/opt/local/share/qt5/plugins/imageformats/libqico.dylib
/opt/local/share/qt5/plugins/imageformats/libqjpeg.dylib
/opt/local/lib/libjpeg.9.dylib
/opt/local/share/qt5/plugins/imageformats/libqmng.dylib
/opt/local/share/qt5/plugins/imageformats/libqsvg.dylib
/opt/local/share/qt5/plugins/imageformats/libqjp2.dylib
/opt/local/lib/libmng.1.dylib
/opt/local/lib/liblcms.1.0.19.dylib
/opt/local/Library/Frameworks/QtSvg.framework/Versions/5/QtSvg
/opt/local/share/qt5/plugins/imageformats/libqtga.dylib
/opt/local/share/qt5/plugins/imageformats/libqtiff.dylib
/opt/local/lib/libtiff.5.dylib
/opt/local/lib/liblzma.5.dylib
/opt/local/share/qt5/plugins/imageformats/libqwbmp.dylib
/opt/local/share/qt5/plugins/imageformats/libqwebp.dylib
/opt/local/share/qt5/plugins/accessible/libqtaccessiblewidgets.dylib
/opt/local/share/qt5/plugins/sqldrivers/libqsqlite.dylib
/opt/local/lib/libsqlite3.0.dylib

OK, now it gets understandable why this wouldn’t work.

CPack needs to also ship these, right?

@frankosterfeld
Copy link
Member

cpack via Macports-installed Qt isn't really tested/supported. I'd suspect that the macports Qt tries to load plugins etc. from /opt/local, no matter if those plugins are actually needed? lzma, tiff etc. aren't used in Charm so I don't see why Charm should bundle them. Could you try if you have the same issues with this DMG: http://www.kdab.com/~frank/Charm_pre1.9.0-ge1ae21c.dmg ?

@mkae
Copy link
Author

mkae commented Feb 2, 2015

Thanks, Frank, your DMG runs Charm indeed fine - at least as far as I can see.

I hope this helps you to diagnose how to avoid this also in a MacPorts-built Charm version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants