Hi there everyone,

our app crashes on startup on Mavericks. In order to drill down on the 
whereabouts of the problem I did fresh MITK build, and get the same problem.

So, compiling the latest MITK,

commit 6aadfd1636481d54aa91d63bd5a7cbd40136c4d2
Merge: 07edc34 b203d00
Author: Sascha Zelzer 
<[email protected]<mailto:[email protected]>>
Date:   Wed Feb 12 00:36:08 2014 +0100

    Merge branch 'bug-16767-update-example-plugins

Running cmake

ccmake 
-DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk"
 -DCMAKE_OSX_DEPLOYMENT_TARGET="10.8" -DCMAKE_OSX_ARCHITECTURES="x86_64"  
../MITK



Doing a debug build, default options, make package, copy mitkWorkbench.app to 
/Applications, launch, and I get:

Process:         mitkWorkbench [90996]
Path:            /Applications/mitkWorkbench.app/Contents/MacOS/mitkWorkbench
Identifier:      ???
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  launchd [154]
Responsible:     mitkWorkbench [90996]
User ID:         501

Date/Time:       2014-02-12 12:49:51.560 +0000
OS Version:      Mac OS X 10.9.1 (13B3116)
Report Version:  11
Anonymous UUID:  A301E1D6-6FF7-24EA-45E7-FAA94EB57F84

Sleep/Wake UUID: C73238F2-05E3-4E8E-B33A-B6307C1E7AE0

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_BAD_ACCESS (SIGABRT)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000012a3fbd92

VM Regions Near 0x12a3fbd92:
    __LINKEDIT             0000000125fde000-0000000126060000 [  520K] r--/rwx 
SM=COW  
/Applications/mitkWorkbench.app/Contents/Frameworks/QtScript.framework/Versions/4/QtScript
-->
    CG shared images       00000001c0003000-00000001c000b000 [   32K] r--/r-- 
SM=SHM

Application Specific Information:
abort() called

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib         0x00007fff8af65866 __pthread_kill + 10
1   libsystem_pthread.dylib       0x00007fff8db7e35c pthread_kill + 92
2   libsystem_c.dylib             0x00007fff92938bba abort + 125
3   libPocoFoundationd.22.dylib   0x000000010ad5de8e 
Poco::SignalHandler::handleSignal(int) + 62
4   libsystem_platform.dylib       0x00007fff90eae5aa _sigtramp + 26
5   ???                           0x00007fff54fa98f0 0 + 140734619097328
6   QtCore                         0x000000010b60602e 
QResourcePrivate::load(QString const&) + 254
7   QtCore                         0x000000010b6073d1 
QResourcePrivate::ensureInitialized() const + 353
8   QtCore                         0x000000010b6099ec 
QResourceFileEngine::QResourceFileEngine(QString const&) + 108
9   QtCore                         0x000000010b635f4b 
_q_resolveEntryAndCreateLegacyEngine_recursive(QFileSystemEntry&, 
QFileSystemMetaData&, QAbstractFileEngine*&, bool) + 363
10  QtCore                         0x000000010b635cc3 
QFileSystemEngine::resolveEntryAndCreateLegacyEngine(QFileSystemEntry&, 
QFileSystemMetaData&) + 83
11  QtCore                         0x000000010b5dcea7 
QAbstractFileEngine::create(QString const&) + 55
12  QtCore                         0x000000010b5f0672 QFile::fileEngine() const 
+ 34
13  QtCore                         0x000000010b5ee0ca 
QFile::open(QFlags<QIODevice::OpenModeFlag>) + 202
14  libCTKPluginFramework.0.1.dylib 0x0000000118318e92 
ctkPluginStorageSQL::insertArchive(QSharedPointer<ctkPluginArchiveSQL>, 
QSqlQuery*) + 1938 (ctkPluginStorageSQL.cpp:440)
15  libCTKPluginFramework.0.1.dylib 0x000000011831a3ea 
ctkPluginStorageSQL::insertArchive(QSharedPointer<ctkPluginArchiveSQL>) + 170 
(ctkPluginStorageSQL.cpp:401)
16  libCTKPluginFramework.0.1.dylib 0x000000011831a0e2 
ctkPluginStorageSQL::insertPlugin(QUrl const&, QString const&) + 658 
(ctkPluginStorageSQL.cpp:378)
17  libCTKPluginFramework.0.1.dylib 0x000000011830e2d8 ctkPlugins::install(QUrl 
const&, QIODevice*) + 1160 (ctkPlugins.cpp:119)
18  libCTKPluginFramework.0.1.dylib 0x00000001182e1cf7 
ctkPluginContext::installPlugin(QUrl const&, QIODevice*) + 87 
(ctkPluginContext.cpp:101)
19  liborg_blueberry_osgi.dylib   0x000000010b8e7333 
berry::InternalPlatform::Initialize(int&, char**, 
Poco::Util::AbstractConfiguration*) + 8467 (berryInternalPlatform.cpp:232)
20  liborg_blueberry_osgi.dylib   0x000000010b8ba748 berry::Starter::Run(int&, 
char**, Poco::Util::AbstractConfiguration*) + 248 (berryStarter.cpp:55)
21                                 0x000000010ac744e0 main + 2464 
(mitkWorkbench.cpp:172)
22  libdyld.dylib                 0x00007fff8c0555fd start + 1

Which looks the same problem as what we have in our app.

If I switch to terminal and do:

export 
DYLD_LIBRARY_PATH=/Applications/mitkWorkbench.app/Contents/MacOS/:/Applications/mitkWorkbench.app/Contents/MacOS/plugins/
dhcp-4-6:MITK mattclarkson$ open /Applications/mitkWorkbench.app/

mitkWorkbench runs.

However, a standalone executable should not require the DYLD_LIBRARY_PATH to be 
set.

The same problem occurs in our dev environment. Historically we have had to set 
the DYLD_LIBRARY_PATH in our dev environment. If my DYLD_LIBRARY_PATH is set to:

/Users/mattclarkson/build/NifTK-SuperBuild-Debug/CTK-build/CTK-build/bin:/Users/mattclarkson/build/NifTK-SuperBuild-Debug/MITK-build/MITK-build/bin/plugins:/Users/mattclarkson/build/NifTK-SuperBuild-Debug/DCMTK-install/lib:

then our application starts up.

If I unset DYLD_LIBRARY_PATH, I get:

Pre-loading library "liborg_mitk_gui_qt_ext" failed: "Cannot load library 
liborg_mitk_gui_qt_ext: (dlopen(liborg_mitk_gui_qt_ext.dylib, 5): image not 
found)"
Check your library search paths.
Pre-loading library "libCTKDICOMCore" failed: "Cannot load library 
libCTKDICOMCore: (dlopen(libCTKDICOMCore.0.1.dylib, 5): image not found)"
Check your library search paths.

Im sure that on Mountain Lion, these used to be warnings only, and I have 
always ignored them, as when the final .dmg is made, the libraries are 
available and in the right place. However, on Mavericks it does seem to be a 
problem. So, if these libraries are successfully pre-loaded, then the app 
starts.  If they are not pre-loaded, then the app does not start.  It appears 
that when lib_org_mitk_gui_qt_ext fails to preload, the first plugin after

liborg_mitk_gui_qt_common.dylib

will also fail to load. Note that my Mavericks build uses clang, but my 
Mountain Lion build uses g++.

Any ideas what to do next?

Thanks as always.

Matt



------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to