PDA

View Full Version : Crash after macdeployqt



stefandetter
22nd December 2009, 15:35
Hi all,

i have a little problem.
I have created a little application that i now want to deploy for mac os x. So i compiled it on my mac and everything works fine. The application runs stable, like on windows.

Now to deploy the application i used the macdeployqt tool that comes with the qt sdk. The strange thing about the whole thing, after i ran the deploy tool the application crashes on my mac, but if i test it on a "non developer" mac, with no qt installed, the application works fine!

Like i understand the error message, the Qt libs in my case QtCore, QtGui and QtNetwork are loaded twice. The one from the app package and the one from the system.

Little cut out of the error report:


Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000004
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 QtGui 0x1406b1ca QHeaderView::count() const + 10
1 QtGui 0x0022069d QAccessible::cleanup() + 3021
2 QtGui 0x00228628 QAccessible::cleanup() + 35672
3 QtGui 0x00228c2d QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) + 621
4 QtGui 0x002926fa QWidgetPrivate::show_helper() + 330
5 QtGui 0x00292d73 QWidget::setVisible(bool) + 1139
...




Binary Images:
0x1000 - 0x138ff3 +com.yourcompany.MyApp ??? (???) <8BF068F4-1A9D-5BC0-D733-6C5E2253BA68> /Users/sde/Temp/Deploy/MyApp.app/Contents/MacOS/MyApp
0x1b4000 - 0xa9bff7 +QtGui ??? (???) <FDFADE60-B0D2-A3F4-1363-7091B67ACD4D> /Users/sde/Temp/Deploy/MyApp.app/Contents/Frameworks/QtGui.framework/Versions/4/QtGui
...
0x13a86000 - 0x1436dff7 +QtGui ??? (???) <FDFADE60-B0D2-A3F4-1363-7091B67ACD4D> /Library/Frameworks/QtGui.framework/Versions/4/QtGui
...


As you can see in the address space the crash happens because the application first uses the QtGui lib of the application package but then tries to call the system wide QtGui lib.

Is there any solution for the problem?

Thanks,
Stefan

axeljaeger
8th January 2010, 11:15
Use otool -L on the binary within the bundle and see to which libraries you actually link. I think your executable links agains the libraries in the bundle but the libraries themself link against their friends in the system. After doing this, we can dig further for a solution.