Custom build crash - MacOS 10.12

I’ve been trying to build Slicer from source, but I keep running into the following error when running the build:

2018-10-26 11:18:42.097 Slicer[1559:9595646] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 
Switch to module:  "Welcome"
Switch to module:  "Volumes"
ASSERT: "this->Table->rowHeight(i) == newHeight" in file /opt/S/CTK/Libs/Widgets/ctkMatrixWidget.cpp, line 252
error: [/opt/S/Slicer-build/bin/Slicer.app/Contents/MacOS/./Slicer] exit abnormally - Report the problem.

This happens whenever I switch to the Volumes module (with or without data loaded).

OS: MacOS Sierra 10.12.6
XCode: Version 9.2 (9C40b)
clang: Apple LLVM version 9.0.0 (clang-900.0.39.2)
QT: 5.11.2
Cmake: 3.12.3

Slicer: Nightly-master branch (4.11.0 2018-10-23)

My cmake command is
cmake
-DCMAKE_BUILD_TYPE:STRING=Debug
-DQt5_DIR:PATH=/Users/whitede/Applications/Qt/5.11.2/clang_64/lib/cmake/Qt5
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
-DSlicer_USE_GIT_PROTOCOL=OFF
-DSlicer_USE_PYTHONQT_WITH_TCL=OFF
/Users/whitede/MyProjects/Slicer

I’ve been trying various combinations of this all week without success. Is there a likely cause of this problem? Wrong version of QT? When I try to compile the master-48 branch, I get this error:

In file included from /opt/Slicer/CTK-build/CTK-build/Libs/Widgets/moc_ctkPathListButtonsWidget_p.cpp:9:
/opt/Slicer/CTK/Libs/Widgets/ctkPathListButtonsWidget_p.h:60:49: error: unknown type name 'QItemSelection'
  void on_PathListWidget_selectionChanged(const QItemSelection& selected, const QItemSelection& deselected);

Thanks for detailed report. Could you create an issue report on: http://issues.slicer.org/ ? Summarizing the problem and including a link to this post will be enough.

Also waiting we address the issue, you could do a Release build and you shouldn’t have problem.

You can do a release build passing the following option to cmake when configuring Slicer -DCMAKE_BUILD_TYPE:STRING=Release.

1 Like

The same issue happen to MacOS 10.15 SDK again

The issue is fixed in recent CTK versions. Either build latest Slicer master or backport the CTK fix into CTK in your build tree.