Performance issues on Mac M1?

Hello everybody.

I’m using 3D Slicer 4.11.20210226 (latest at time of writing) on my Windows PC without any performance issues, and I can segment CT scans (thorax, abdomen, wrists, etc) without any performance issues. Unfortunately I’m experiencing severe performance issues with the same version, and also 4.13.0-2022-03-15, on my MacBook Pro M1 (2020, 16 GB, macOS Monterey 12.3). I’m getting either a ever-lasting spinning beach ball or it crashes. I’ve tried it without any plugins.

To other Mac/M1 users, are you experiencing any of these issues, or is there some fix for it? I know Slicer is using 3rd party applications that (yet) is not ported to Apple Silicon, and if there are no known fixes I’ll continue working on a Windows PC.

In advance, thank you!
Bjørn-Petter Johannessen MD/resident radiologist.

When does this happen? On startup? After doing certain actions in Slicer?

Thank you for your reply. I’m sorry I didn’t mention the important details…

I haven’t encountered any problems on startup, loading DICOM files, thresholding, drawing, erasing, etc.

I’m encountering the issues when I’m scissoring while the 3D view is enabled. It doesn’t matter if I’m scissoring in the 3D view or in one of the 2D views (ax/cor/sag). Scissoring a smaller CT (e.g., wrist) is quicker than an abdominal CT, but the application hangs regardless. 100% CPU usage and ~3-4-5 GB of RAM. I still have free RAM, and I don’t think the hardware itself is problematic (except M1?).

I hope this helps. Please let me know if you need any other details. Thresholding, some basic drawing/erasing and scissoring is what I need.

Does the slowdown occur when you release the mouse button after finishing drawing the curve?

How long do you have to wait after renewing the mouse button due the application to become responsive again?

Does the slowdown occur if you disable surface smoothing (in the dropdown menu of the “Show 3D” button)?

Note that after thresholding you can have tens of thousands of small speckles in the segmentation, which can drastically slow down 3D display and some processing. After thresholding it usually makes sense to use Smoothing effect with default parameters to reduce the amount of speckles and make the extracted surfaces smoother.

I also posted about this same issue. Performance on my brand new Macbook Pro M1 is very unreliable. I’ve tried working with smaller areas but it doesn’t seem to matter much. Sometimes it runs smoothly but most of the time it’s painfully slow. I switched back over to windows just to use Slicer.

I’ve submitted an issue to keep track of this:

Probably will have to buy a few M1 macs so that we can test this. But for that we would need to know which ones are problematic.

@sannpeterson can you give more information about your system (model name and year, CPU, RAM, operating system)?

Macbook Pro M1 Max (2021) w/ 10 core CPU and 32 core GPU
32 GB memory
1 TB SSD
macOS Monterey 12.5

Yes, when I release the mouse button.

Depends, sometimes it’s just “laggy” and a couple-10 seconds. Right now I’ve been waiting for 10 minutes after scissoring out parts of a kidney.

I haven’t been using a stopwatch, but it doesn’t seem to make a difference.

I’ve tried with and without smoothing, but I can’t notice any significant difference.

Right now I’m segmenting a CT arteriography of aorta from a axial 3 mm scan with 241 slices, so it’s not a lot of data…

MacBook Pro 13 M1, 2020
16 GB memory.
Fresh install of macOS 12.4. I’ve been using Slicer 3D version 4.x and now 5.0.3 and I can’t tell any difference in the performance.
Still works great on Windows.

(Sorry for the late reply - I thought I had replied to this)

1 Like

Hi, I am also experiencing issues with Slicer (v. 5.0.3.) when working in the Segmentation editor. It crashes constantly when using the scissor to cut off segmentation results.

MacBook Pro (13-inch, M2, 2022)
Monterey v 12.5.1

I have multiple problems regarding segmentation on CT images (Maxillofacial ones don’t differ much from others but anyways). Especially when I’m trying to use “Scissors”, “Watershed” tools.
The process usually goes like this:
-I import the CT data
-I add new segmentations to segment the cortical part of the mandible and the teeth. I used the method mentioned in this forum
-I use “grow from seeds” tool which typically results in mixed segmentations since the tissues do not differ from each other so much in terms of calcification
-I use “scissors” or “paintbrush” tool to fix the flooded/extra/unnecessary parts, then BOOM.
The app crashes, and all my efforts are gone

Thanks for reporting. There does seem to be some instability on macs with Apple chips. I have run some simple tests and things run fine, but we have seen previous issues indicating that the on-the-fly run time code conversion is not the same as running on native hardware. So until Apple fixes their emulation layer or Slicer is ported to the new architecture there are likely to be edge cases that fail.

I tested the basic flow described by @semredogan and got the crash report below basically instantly when using the scissors on my first try. Later attempts to do the same thing did not crash. I’ve never seen this on non-Apple CPUs.

For now I’d say the best option is to save often or use a different computer for intensive work.


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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000030
Exception Codes:       0x0000000000000001, 0x0000000000000030

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [6040]

VM Region Info: 0x30 is not in any region.  Bytes before following region: 140722657165264
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      mapped file              7ffc8bfe0000-7ffc92e98000 [110.7M] r-x/r-x SM=COW  ...t_id=cbf25fb1

Error Formulating Crash Report:
dyld_process_snapshot_create_for_process failed with 5

Kernel Triage:
VM - pmap_enter retried due to resource shortage
VM - pmap_enter retried due to resource shortage


Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0   <translation info unavailable>	       0x10493f43c ???
1   <translation info unavailable>	       0x10493ea4c ???
2   libvtkCommon-9.1.1.dylib      	       0x143fb9cc0 vtkPolyData::BuildLinks(int) + 160
3   libvtkFilters-9.1.1.dylib     	       0x1407a356e vtkPolyDataNormals::RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 1614
4   libvtkCommon-9.1.1.dylib      	       0x143d9ab15 vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*) + 69
5   libvtkCommon-9.1.1.dylib      	       0x143d9585d vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 61
6   libvtkCommon-9.1.1.dylib      	       0x143d8fc98 vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 104
7   libvtkCommon-9.1.1.dylib      	       0x143d9501d vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 1437
8   libvtkCommon-9.1.1.dylib      	       0x143dd9930 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 848
9   libvtkCommon-9.1.1.dylib      	       0x143d90f39 vtkCompositeDataPipeline::ForwardUpstream(vtkInformation*) + 297
10  libvtkCommon-9.1.1.dylib      	       0x143d94e3d vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 957
11  libvtkCommon-9.1.1.dylib      	       0x143dd9930 vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*) + 848
12  libvtkCommon-9.1.1.dylib      	       0x143dd9f2b vtkStreamingDemandDrivenPipeline::Update(int, vtkInformationVector*) + 283
13  libqSlicerSegmentationsEditorEffects.dylib	       0x18289cc5b qSlicerSegmentEditorScissorsEffectPrivate::updateBrushStencil(qMRMLWidget*) + 203
14  libqSlicerSegmentationsEditorEffects.dylib	       0x18289cfb9 qSlicerSegmentEditorScissorsEffectPrivate::paintApply(qMRMLWidget*) + 137
15  libqSlicerSegmentationsEditorEffects.dylib	       0x1828a0d30 qSlicerSegmentEditorScissorsEffect::processInteractionEvents(vtkRenderWindowInteractor*, unsigned long, qMRMLWidget*) + 448
16  libqSlicerSegmentationsModuleWidgets.dylib	       0x18271302b qMRMLSegmentEditorWidget::processEvents(vtkObject*, unsigned long, void*, void*) + 619
17  libvtkCommon-9.1.1.dylib      	       0x14457b351 vtkCallbackCommand::Execute(vtkObject*, unsigned long, void*) + 33
18  libvtkCommon-9.1.1.dylib      	       0x14468f330 vtkSubjectHelper::InvokeEvent(unsigned long, void*, vtkObject*) + 1200
19  libvtkGUISupportQt-9.1.1.dylib	       0x1360218cb QVTKInteractorAdapter::ProcessEvent(QEvent*, vtkRenderWindowInteractor*) + 2171
20  libvtkGUISupportQt-9.1.1.dylib	       0x136023cae QVTKOpenGLNativeWidget::event(QEvent*) + 30
21  QtWidgets                     	       0x10e9c0a1a QApplicationPrivate::notify_helper(QObject*, QEvent*) + 266
22  QtWidgets                     	       0x10e9c3785 QApplication::notify(QObject*, QEvent*) + 6965
23  libqSlicerBaseQTGUI.dylib     	       0x10d0aaf20 qSlicerApplication::notify(QObject*, QEvent*) + 16
24  QtCore                        	       0x1114939d4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
25  QtWidgets                     	       0x10e9c1340 QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) + 896
26  QtWidgets                     	       0x10ea1a052 0x10e9b0000 + 434258
27  QtWidgets                     	       0x10ea18719 0x10e9b0000 + 427801
28  QtWidgets                     	       0x10e9c0a1a QApplicationPrivate::notify_helper(QObject*, QEvent*) + 266
29  QtWidgets                     	       0x10e9c1e41 QApplication::notify(QObject*, QEvent*) + 497
30  libqSlicerBaseQTGUI.dylib     	       0x10d0aaf20 qSlicerApplication::notify(QObject*, QEvent*) + 16
31  QtCore                        	       0x1114939d4 QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212
32  QtGui                         	       0x10fdc11de QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) + 3534
33  QtGui                         	       0x10fda612b QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 219
34  libqcocoa.dylib               	       0x143123260 0x1430e9000 + 238176
35  libqcocoa.dylib               	       0x1431239c8 0x1430e9000 + 240072
36  CoreFoundation                	    0x7ff80289def1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
37  CoreFoundation                	    0x7ff80289dea0 __CFRunLoopDoSource0 + 157
38  CoreFoundation                	    0x7ff80289dc6e __CFRunLoopDoSources0 + 212
39  CoreFoundation                	    0x7ff80289c8c8 __CFRunLoopRun + 943
40  CoreFoundation                	    0x7ff80289be9f CFRunLoopRunSpecific + 560
41  HIToolbox                     	    0x7ff80c6c3bd6 RunCurrentEventLoopInMode + 292
42  HIToolbox                     	    0x7ff80c6c3806 ReceiveNextEventCommon + 199
43  HIToolbox                     	    0x7ff80c6c3723 _BlockUntilNextEventMatchingListInModeWithFilter + 70
44  AppKit                        	    0x7ff8058f9b37 _DPSNextEvent + 909
45  AppKit                        	    0x7ff8058f89b8 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1219
46  AppKit                        	    0x7ff8058eaff3 -[NSApplication run] + 586
47  libqcocoa.dylib               	       0x14312262f 0x1430e9000 + 235055
48  QtCore                        	       0x11148fa6f QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 431
49  QtCore                        	       0x111493fe2 QCoreApplication::exec() + 130
50  libqSlicerBaseQTCore.dylib    	       0x10e1cc1a9 qSlicerCoreApplication::exec() + 9
51  Slicer                        	       0x10432cae3 main + 483
52  dyld                          	       0x20460b310 start + 2432