Page MenuHomePhabricator

Crash Ubuntu 18.04.3 Qt 5.12.4
Closed, ResolvedPublic

Description

The MitkWorkbench crashes on the master and release tag 2018.4 on freshly installed ubuntu 18.04.3. gcc 7.4, cmake 3.16, qt 5.12.4

./MitkWorkbench
!Fri Dec 13 09:15:27 2019
0.136! WARNING: Pre-loading library "liborg_mitk_gui_qt_ext" failed: "Cannot load library liborg_mitk_gui_qt_ext: (liborg_mitk_gui_qt_ext: cannot open shared object file: No such file or directory)"
Check your library search paths.
!1.442! WARNING: Startup error: ctkPluginException: The plugin "/home/ericheim/workspace/MITK/build/debug/MITK-build/lib/plugins/liborg_mitk_gui_qt_common.so" could not be loaded: Cannot load library /home/ericheim/workspace/MITK/build/debug/MITK-build/lib/plugins/liborg_mitk_gui_qt_common.so: (/home/ericheim/workspace/MITK/build/debug/MITK-build/lib/plugins/liborg_blueberry_core_expressions.so: undefined symbol: _ZN5berry14ElementHandler6CreateEPNS_19ExpressionConverterEPN4Poco3XML7ElementE)
Segmentation fault (core dumped)

Event Timeline

kislinsk added a subscriber: kislinsk.

This was supposed to be solved in T26150: Build tree version of MitkWorkbench crashes twice before eventually starting on Ubuntu with GCC. Long story short, it has probably something to do with a messed up linkage of mixed superbuild/system dependencies. After some months of silence I think you are not the first one to encounter this bug again so we have to reinvestigate. As far as I remember using Clang does not lead to this issue in the first place.

Thanks for the explanation. It happens on two freshly installed Ubuntu 18.04.3 PC's. An older setup seems to magically work fine

It's a GCC bug that bit us in the past already and that's why we were pre-loading org.mitk.gui.qt.common. Now it's org.blueberry.core.expressions.

You can manually bypass this bug by calling LD_PRELOAD=../lib/plugins/liborg_blueberry_core_expressions.so ./MitkWorkbench --BlueBerry.clean.

In the main() function of the MITK Workbench was an attempt of pre-loading org.mitk.gui.qt.common but that worked only when the plugin path was added to LD_LIBRARY_PATH. This is exactly what happens in MitkWorkbench.sh in our installers and that's why this crash only appears in the build tree version.

I changed this pre-loading code to pre-load org.blueberry.core.expressions from a relative path to the application and only to do so if the code was compiled with GCC. If the plugin doesn't exist in this location, it falls back to the plain plugin name (prior behavior, works with installed version of MITK). This also gets rid of the pre-loading error messages with other compilers/platforms.

TL;DR: MitkWorkbench --BlueBerry.clean works again.