[Split] Mac deployment problem using zLib
I'm facing a similar problem when trying to deploy my qt windows application on mac os x 10.6.8 (64 bit).
I tried to deploy using the automatic deploy tool (macdeployqt) and i am able to run the resulting "myapplication.app". However, at some point of the application an external library is used to process vnc features, and that library apparently uses libz.1.dylib, and it causes an application crash:
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000ffafd8f2
Crashed Thread: 7
Thread 7 Crashed:
0 ??? 0xffafd8f2 0 + 4289714418
1 libz.1.dylib 0x95591a4a inflateInit_ + 39
2 libmylib.1.0.0.dylib 0x001b1be7 ivsConnection::handleZlib(unsigned short, unsigned short, unsigned short, unsigned short) + 471
3 libmylib.1.0.0.dylib 0x001b2d83 ivsConnection::handleServerMessages(bool, int) + 2131
4 libmylib.1.0.0.dylib 0x001b8c98 vncWorker::framebufferUpdate() + 72
5 libmylib.1.0.0.dylib 0x001c5ea2 vncWorker::qt_metacall(QMetaObject::Call, int, void**) + 82
6 QtCore 0x0169922a QMetaObject::activate(QObject*, QMetaObject const*, int, void**) + 538
7 QtCore 0x017caa52 QTimer::timeout() + 50
8 QtCore 0x0177fe28 QObject::event(QEvent*) + 424
9 QtGui 0x009c0a6f QApplicationPrivate::notify_helper(QObject*, QEvent*) + 175
10 QtGui 0x009c6d25 QApplication::notify(QObject*, QEvent*) + 1221
11 QtCore 0x016939c2 QCoreApplication::notifyInternal(QObject*, QEvent*) + 98
12 QtCore 0x017975f7 QTimerInfoList::activateTimers() + 775
13 QtCore 0x0179778b QEventDispatcherUNIX::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 235
14 QtCore 0x017713a1 QEventLoop::processEvents(QFlagsQEventLoop::ProcessEventsFlag) + 65
15 QtCore 0x017715cd QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 189
16 QtCore 0x016b48b2 QThread::exec() + 98
17 libuni_net.1.0.0.dylib 0x001b8f79 vncViewThread::run() + 41
18 QtCore 0x016b52ab QThreadPrivate::start(void*) + 187
19 libSystem.B.dylib 0x91372259 _pthread_start + 345
20 libSystem.B.dylib 0x913720de thread_start + 34
Thanks in advance
[I've split your question off from the "older thread":/forums/viewthread/5934/ where your posted it originally.]
Does your application work without using macdeployqt?
Thank you for your quick response. My application works without macdeploy, but in order to run my application from Qt Creator i needed to paste the necessary libraries in the MacOs directory that is inside the application bundle.
I tried a different aproach and managed to deploy my qt application successfully (at last!). What i did was:
- Added CONFIG-=app_bundle , so qt creator won't create an application bundle
- Copied my resulting executable file into a new folder
- Copied all Qt frameworks and plugins into that folder (cp -R /Library/Frameworks/Qt* and cp -R /Developer/Applications/Qt/plugins)
Now i can run my application without having qt installed. My next step is to somehow create an application bundle with this. I've searched a bit, and found Platypus, but haven't tried it yet.
I was wasting a lot of time trying to solve problems with qt generated bundle and macdeployqt, so i dropped that solution.
How can i "bundle" this solution (executable) into an application bundle? Do you know any good tools or programs to do so?
Thanks in advance,
Go with the application bundle that's created by qmake. Everything else will do basically the same, so this won't save you anything.
You can try to use macdeployqt to do the basic installation and tweak the rest afterwards. Or you copy the stuff by hand and run install_name_tool manually. Always copy all frameworks and libs that are not present on the default OS installation.
As we do not know more about your application and its needs, I cannot comment more specifically.