Slicer / SlicerJupyter

Extension for 3D Slicer that allows the application to be used from Jupyter notebook
MIT License
240 stars 42 forks source link

[MacOS] Slicer does not start after installing SlicerJupyter #77

Open che85 opened 10 months ago

che85 commented 10 months ago

After installing SlicerJupyter from the ExtensionManager and restarting Slicer, Slicer crashes at bootup time. (@lassoan, @jcfr). See the problem report below.

When manually removing SlicerJupyter from the Extensions directory, Slicer starts and doesn't crash.

Problem Report

``` ------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Slicer [59784] Path: /Applications/Slicer-5.6.0_stable.app/Contents/MacOS/Slicer Identifier: org.slicer.slicer Version: 5.6.0 (5.6.0) Code Type: X86-64 (Translated) Parent Process: launchd [1] User ID: 1555809845 Date/Time: 2023-11-27 11:52:30.0779 -0500 OS Version: macOS 14.1.1 (23B81) Report Version: 12 Anonymous UUID: 999C5FD2-B9E5-F767-487C-E099C9C72384 Sleep/Wake UUID: 07EE913B-564B-4262-93C7-9F9E2C101C79 Time Awake Since Boot: 410000 seconds Time Since Wake: 6841 seconds System Integrity Protection: enabled Notes: PC register does not match crashing frame (0x0 vs 0x18B0A404F) Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [59784] Error Formulating Crash Report: PC register does not match crashing frame (0x0 vs 0x18B0A404F) Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libqSlicerJupyterKernelModule.dylib 0x18b0a404f qt_plugin_instance + 175 1 QtCore 0x10e426d98 0x10e248000 + 1961368 2 libqSlicerBaseQTCore.dylib 0x10b14bfa9 ctkFactoryPluginItem::instanciator() + 25 3 libqSlicerBaseQTCore.dylib 0x10b14b56c qSlicerLoadableModuleFactoryItem::instanciator() + 28 4 libqSlicerBaseQTCore.dylib 0x10b14d8d8 ctkAbstractFactory::instantiate(QString const&) + 200 5 libqSlicerBaseQTCore.dylib 0x10b11fc59 qSlicerAbstractModuleFactoryManager::instantiateModule(QString const&) + 57 6 libqSlicerBaseQTCore.dylib 0x10b11fa3b qSlicerAbstractModuleFactoryManager::instantiateModules() + 171 7 Slicer 0x100fdc49f int qSlicerApplicationHelper::postInitializeApplication(qSlicerApplication&, QScopedPointer>&, QScopedPointer>&) + 2063 8 Slicer 0x100fdb9a0 main + 144 9 dyld 0x20103c3a6 start + 1942 Thread 1:: com.apple.rosetta.exceptionserver 0 runtime 0x7ff7ffd67228 0x7ff7ffd63000 + 16936 Thread 2: 0 runtime 0x7ff7ffd8594c 0x7ff7ffd63000 + 141644 Thread 3: 0 runtime 0x7ff7ffd8594c 0x7ff7ffd63000 + 141644 Thread 4: 0 runtime 0x7ff7ffd8594c 0x7ff7ffd63000 + 141644 Thread 5: ... Model: Mac14,6, BootROM 10151.41.12, proc 12:8:4 processors, 64 GB, SMC Graphics: Apple M2 Max, Apple M2 Max, Built-In ```

domillima commented 7 months ago

Also experiencing this. Have a Apple M3 chip macbook pro. Uninstalled and reinstalled slicer with the same error.

Khoa-NT commented 6 months ago

I have the same problem on my M2 Macbook Air

che85 commented 5 months ago

@lassoan I compiled locally, packaged and installed via ExtensionManager. When starting Slicer, getting the following:

(base) herzc@K4YF7L70NQ Slicer-build % ./Slicer
2024-04-05 13:58:10.454 Slicer[43613:5435359] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
  Error(s):
    Cannot load library /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32793/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib: (dlopen(/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32793/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib, 0x0085): Library not loaded: @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: <959C0021-FD22-35BA-A01D-81572C83F204> /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32793/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib
  Reason: tried: '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Frameworks/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/QtCore.framework/Versions/5/Frameworks/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file))
dlopen(/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32793/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/vtkSlicerJupyterKernelModuleLogicPython.so, 0x0002): Library not loaded: @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: <294383B9-4128-3CFB-AF29-EA20B3B7AC4C> /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32793/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/vtkSlicerJupyterKernelModuleLogicPython.so
  Reason: tried: '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/LibArchive-install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file)
che85 commented 5 months ago

Compiling with ZeroMQ v4.3.4 failed with:

make[5]: *** [CMakeFiles/objects.dir/src/ws_engine.cpp.o] Error 1
/Users/herzc/sources/cpp/SlicerJupyter/build/ZeroMQ/src/ctx.cpp:60:10: fatal error: 'gnutls/gnutls.h' file not found
#include <gnutls/gnutls.h>
         ^~~~~~~~~~~~~~~~~
1 error generated.
make[5]: *** [CMakeFiles/objects.dir/src/ctx.cpp.o] Error 1
In file included from /Users/herzc/sources/cpp/SlicerJupyter/build/ZeroMQ/src/curve_client.cpp:36:
/Users/herzc/sources/cpp/SlicerJupyter/build/ZeroMQ/src/session_base.hpp:116:10: warning: 'process_conn_failed' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    void process_conn_failed ();
         ^
/Users/herzc/sources/cpp/SlicerJupyter/build/ZeroMQ/src/object.hpp:149:18: note: overridden virtual function is here
    virtual void process_conn_failed ();
                 ^
In file included from /Users/herzc/sources/cpp/SlicerJupyter/build/ZeroMQ/src/curve_mechanism_base.cpp:35:
/Users/herzc/sources/cpp/SlicerJupyter/build/ZeroMQ/src/session_base.hpp:116:10: warning: 'process_conn_failed' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
    void process_conn_failed ();
         ^
/Users/herzc/sources/cpp/SlicerJupyter/build/ZeroMQ/src/object.hpp:149:18: note: overridden virtual function is here
    virtual void process_conn_failed ();

I updated to v.4.3.5 and it compiled.

che85 commented 5 months ago

When running SlicerWithSlicerJupyter directly from the inner-build directory, everything seems to be working and SlicerJupyter can be used.

lassoan commented 5 months ago

@che85 Thanks for the information, I've updated the build scripts to use ZeroMQ 4.3.5 - https://github.com/Slicer/SlicerJupyter/commit/724809ab27667793a0438af6e087ff7decd7d1fe

When running SlicerWithSlicerJupyter directly from the inner-build directory, everything seems to be working and SlicerJupyter can be used.

Thanks for the information, this is good to know.

After installing SlicerJupyter from the ExtensionManager and restarting Slicer, Slicer crashes at bootup time

Does this still occur with the latest Slicer Preview Release?

che85 commented 5 months ago

@lassoan I just checked with the most recent preview and it is still crashing.

che85 commented 1 month ago

@jcfr I compiled Slicer on macOS Sonoma 14.4.1 with Apple M2 Max

cmake ../../sources/cpp/Slicer/ \
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11 \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DQt5_DIR:PATH=/Users/herzc/Qt/5.15.2/clang_64/lib/cmake/Qt5 \
-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 \
-Wno-unused-but-set-variable 

Compilation failed with the current LibArchive version, so I updated it to use v3.7.4 and everything compiled successfully.

After compiling and packaging SlicerJupyter, and installing it through the ExtensionManager, Slicer starts fine, but SlicerJupyter is not loaded. Upon checking I noticed the following error message:

2024-08-08 19:34:28.753 Slicer[26063:4234140] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
  Error(s):
    Cannot load library /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib: (dlopen(/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib, 0x0085): Library not loaded: @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: <EB4BE96E-3562-3BD1-B357-1DE7451295BC> /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib
  Reason: tried: '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Frameworks/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/QtCore.framework/Versions/5/Frameworks/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file))
dlopen(/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/vtkSlicerJupyterKernelModuleLogicPython.so, 0x0002): Library not loaded: @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: <04A0F438-50C0-39C0-B006-CB2AB9DD1E3B> /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/vtkSlicerJupyterKernelModuleLogicPython.so
  Reason: tried: '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file)
Switch to module:  "Welcome"
Loading Slicer RC file [/Users/herzc/.slicerrc.py]

@jcfr Would you happen to know what could be the issue?

Thank you.

justinsunger commented 1 month ago

@jcfr I compiled Slicer on macOS Sonoma 14.4.1 with Apple M2 Max

cmake ../../sources/cpp/Slicer/ \
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11 \
-DCMAKE_BUILD_TYPE:STRING=Debug \
-DQt5_DIR:PATH=/Users/herzc/Qt/5.15.2/clang_64/lib/cmake/Qt5 \
-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 \
-Wno-unused-but-set-variable 

Compilation failed with the current LibArchive version, so I updated it to use v3.7.4 and everything compiled successfully.

After compiling and packaging SlicerJupyter, and installing it through the ExtensionManager, Slicer starts fine, but SlicerJupyter is not loaded. Upon checking I noticed the following error message:

2024-08-08 19:34:28.753 Slicer[26063:4234140] WARNING: Secure coding is automatically enabled for restorable state! However, not on all supported macOS versions of this application. Opt-in to secure coding explicitly by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState:.
  Error(s):
    Cannot load library /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib: (dlopen(/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib, 0x0085): Library not loaded: @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: <EB4BE96E-3562-3BD1-B357-1DE7451295BC> /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/libqSlicerJupyterKernelModule.dylib
  Reason: tried: '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Frameworks/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/QtCore.framework/Versions/5/Frameworks/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file))
dlopen(/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/vtkSlicerJupyterKernelModuleLogicPython.so, 0x0002): Library not loaded: @rpath/Frameworks/QtWidgets.framework/Versions/5/QtWidgets
  Referenced from: <04A0F438-50C0-39C0-B006-CB2AB9DD1E3B> /Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/Extensions-32964/SlicerJupyter/lib/Slicer-5.7/qt-loadable-modules/vtkSlicerJupyterKernelModuleLogicPython.so
  Reason: tried: '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/qRestAPI-build/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/Slicer-build/bin/Slicer.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/CTK-build/CMakeExternals/Install/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/D/S4D/teem-build/bin/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/herzc/Qt/5.15.2/clang_64/lib/Frameworks/QtWidgets.framework/Versions/5/QtWidgets' (no such file)
Switch to module:  "Welcome"
Loading Slicer RC file [/Users/herzc/.slicerrc.py]

@jcfr Would you happen to know what could be the issue?

Thank you.

I am also experiencing this issue with MacOS for the current Slicer release so I reverted to Slicer 5.2.2 for now where SlicerJupyter extension loads without issue.