Hi there,

Our previous problems with failing to load MitkCore during unit tests
(reported here: http://sourceforge.net/p/mitk/mailman/message/33476382/)

was resolved by setting the DYLD_LIBRARY_PATH and using US_INITIALIZE_MODULE in 
the unit test.

However, another unit test loads MitkCore, and then the auto-loading feature 
tries to load libMitkDiffusionIO.dylib using an absolute path. It fails on the 
call to dlopen in usUtils.cpp at line 73. Our MITK is based on 2014.10. 
Specifically this one: 
https://github.com/NifTK/MITK/commit/97c899f2a7647c955604b9ca5eb94b7248dc65db

The error is:
 malloc: *** error for object 0x11c1e3c88: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

If I set my Terminal to have the DYLD_LIBRARY_PATH that enables the GUI and 
unit test to run:

DYLD_LIBRARY_PATH=/Users/mattclarkson/build/NifTK-BASE/VTK/40b41/install/lib:/Users/mattclarkson/build/NifTK-BASE/GDCM/40b41/install/lib:/Users/mattclarkson/build/NifTK-BASE/ITK/fa958/install/lib

and

Matts-MacBook-Pro:MitkCore mattclarkson$ pwd
/Users/mattclarkson/build/NifTK-BASE/MITK/8e07b/build/MITK-build/bin/MitkCore
Matts-MacBook-Pro:MitkCore mattclarkson$ ls
libMitkDiffusionIO.dylib        libMitkIOExt.dylib              
libMitkIpPicSupportIO.dylib     libMitkVtkShaders.dylib
Matts-MacBook-Pro:MitkCore mattclarkson$ otool -L libMitkDiffusionIO.dylib 
libMitkDiffusionIO.dylib:

<snip>
  libvtkRenderingVolumeOpenGL-6.1.1.dylib (compatibility version 1.0.0, current 
version 1.0.0)
<snip>
  libITKIOTIFF-4.5.1.dylib (compatibility version 1.0.0, current version 1.0.0)
<snip>
  libgdcmDSED.2.4.dylib (compatibility version 2.4.0, current version 2.4.1)

it looks to me like the VTK, ITK and GDCM libraries are not found, or otool -L 
is not reporting where they will be loaded from. These 3 libraries are just 
chosen at random. It looks to me like ALL VTK, ITK and GDCM libaries are not 
loaded. Im also not sure if this is relevant to the above problem.

In addition, when I 

export US_DISABLE_AUTOLOADING=1 

my unit test passes and runs.

So, while I can probably set US_DISABLE_AUTOLOADING and carry on, I would love 
to know why this fails?

Thanks

Matt


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to