After installing the Freesurfer software the program runs OK but when I’m trying to load a data, I encounter the error “freeview quit unexpectedly” and program crashes.
My device : macbook air m1 2020.
After installing the Freesurfer software the program runs OK but when I’m trying to load a data, I encounter the error “freeview quit unexpectedly” and program crashes.
My device : macbook air m1 2020.
Do you have a Freesurfer license in your installation directory?
Yes. I downloaded the license from the email sent by Free Surfer and pasted it in the following path: /Applications/freesurfer
I’ve also downloaded and installed the latest version of xquartz before installing and executing freesurfer.
Can you open freeview
in your terminal and then try loading the image? A crash message in your terminal may be informative.
Also, is the license file specifically named license.txt
?
I ran the program from the terminal, but after the program crashed, nothing was shown in the terminal! Also, the license file that was emailed to me had no name and was only displayed with \
. Although when I rename the license to license.txt, there was no change.
Can you just run freeview
in the terminal, rather than using the open
command?
I noticed that I made a mistake in setting an environment which caused the program to crash. Since I don’t have much experience with the terminal and The Free Surfer’s documentation is a bit confusing for me, I ask you to guide me in this field, Steven.
The version I’ve download is 7.4.1.
I’ve create a directory for freesurfer with code below:
export FREESURFER_HOME=/Applications/freesurfer/7.4.1
export SUBJECTS_DIR=$FREESURFER_HOME/subjects
source $FREESURFER_HOME/SetUpFreeSurfer.sh
and I could run the program perfectly. But every time I close the program (or terminate terminal) and try to reopen it, I cannot use freeview command (zsh: command not found: freeview) unless I use that code and make a directory again. Is there any solution for this or I should execute that code every time I want to open the program?
Did you follow the video guide? attachment:installFS_demo.mp4 of DownloadAndInstall - Free Surfer Wiki
If that doesn’t work, I’d recommend you just email the FreeSurfer tech support mailing list: FreeSurferSupport - Free Surfer Wiki
You can just add these lines to your appropriate profile/RC file, and they will be automatically re-executed upon opening terminal. I believe Macs are all using .zprofile
these days.
Best,
Steven
I’m having the same problem now which is quite annoying. Did you manage to sort it out?
Hi @Kaya_an and welcome to neurostars!
What troubleshooting steps have you taken so far? And can you say more about your computing environment?
Best,
Steven
I am taking the same result with segmentation fault 11 at each time and changed the MacBook from M3pro to Air but the problem still goes on
Hi @Mcercan,
What version of freesurfer? What kind of file were you trying to load? What troubleshooting steps from this thread have you tried?
Best,
Steven
I downloaded the freesurver version 7.4.1
To upload the T1.mgz or one of my nii.gz files something happens and and error message comes as ‘segmentation fault: 11’
I’ve tried to copy the code written above. It worked in M3 pro at first but later, I couldn’t continue
Thank you
I’m having the same problem. Has anyone figure this out? I downloaded the 7.4.1 version and when I try to open the T1.mgz from the sample video, it shuts down.
Hi,
I’m having the exact same issue as @Parham_Zargar.
I installed freesurfer following the video : https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall?action=AttachFile&do=get&target=installFS_demo.mp4.
However, everytime i try to load volume from freeview, it quits instantly and leaves a message of error
Had the same issue and just figured it out. When you open FreeView via mouse, it opens, but then crashes when you open a file. Same thing if you do it from the terminal. “freeview” works fine, but “freeview somefile.nii” crashes with:
ERROR: FreeSurfer license file ~/freesurfer/license.txt not found.
If the environmental variables aren’t set in your .zprofile yet, execute:
sudo nano ~/.zprofile
Then add the following lines to it and adjust based on where your FreeSurfer folder is located:
export FREESURFER_HOME=/Users/your_username/freesurfer
source $FREESURFER_HOME/SetUpFreeSurfer.sh
export FS_LICENSE='Users/your_username/freesurfer/license.txt'
Somehow, it doesn’t like the ~ reference to the home directory and you have to make it explicit as /Users/your_username and then it works.
However, when I tried to run recon-all, it still didn’t have permissions to write to the subjects folder. The following command resolved that and now everything works as intended. Adjust as needed, based on where your subjects folder is.
sudo chmod 777 ~/freesurfer/subjects
Good luck!
Hi,
I encounter the same problem.
I can open freesurfer but it crashes when I try to load data.
I have Mac OS Sonoma 14.6.1, Freesurfer 7.4.1 and Xquartz 2.8.5.
I followed the freesuerfer setup and configuration (basic setup + licence). I also tried the steps described here by tkaufmann.
But I still get a crash.
here is the report.
can anybody help please?
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: freeview [12049]
Path: /Applications/freesurfer/*/Freeview.app/Contents/MacOS/freeview
Identifier: org.martinos.freeview
Version: 7.3.2 (100)
Code Type: X86-64 (Native)
Parent Process: Exited process [12048]
Responsible: Terminal [11705]
User ID: 502
Date/Time: 2024-09-27 16:39:45.0926 -0400
OS Version: macOS 14.6.1 (23G93)
Report Version: 12
Bridge OS Version: 8.6 (21P6074)
Anonymous UUID: 1C546229-05F9-3943-80B6-D32EA774EEDC
Sleep/Wake UUID: EE6C25B2-A96C-4250-B954-409EAE946AFC
Time Awake Since Boot: 27000 seconds
Time Since Wake: 24615 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: UNKNOWN_0xD at 0x0000000000000000
Exception Codes: 0x000000000000000d, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [12049]
VM Region Info: 0 is not in any region. Bytes before following region: 4303409152
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT 10080d000-101ed9000 [ 22.8M] r-x/r-x SM=COW /Applications/freesurfer/*/Freeview.app/Contents/MacOS/freeview
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 freeview 0x100a00b98 0x10080d000 + 2046872
1 QtWidgets 0x11254a413 QWidget::event(QEvent*) + 1283
2 QtWidgets 0x1126895a4 QMainWindow::event(QEvent*) + 276
3 QtWidgets 0x1124fa0b7 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 247
4 QtWidgets 0x1124faffc QApplication::notify(QObject*, QEvent*) + 508
5 QtCore 0x1136321da QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170
6 QtWidgets 0x112561de4 0x1124ee000 + 474596
7 QtWidgets 0x11255fd5a 0x1124ee000 + 466266
8 QtWidgets 0x1124fa0b7 QApplicationPrivate::notify_helper(QObject*, QEvent*) + 247
9 QtWidgets 0x1124faffc QApplication::notify(QObject*, QEvent*) + 508
10 QtCore 0x1136321da QCoreApplication::notifyInternal2(QObject*, QEvent*) + 170
11 QtGui 0x1119c982d QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) + 493
12 QtGui 0x1119ca036 QGuiApplicationPrivate::processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent*) + 470
13 QtGui 0x111a2229c 0x111941000 + 922268
14 libqcocoa.dylib 0x1116fca50 0x1116b3000 + 301648
15 libqcocoa.dylib 0x1116f58c9 0x1116b3000 + 272585
16 libqcocoa.dylib 0x1116f537c 0x1116b3000 + 271228
17 QtGui 0x111a1393e QWindowPrivate::create(bool, unsigned long long) + 206
18 QtWidgets 0x112538d9d QWidgetPrivate::create() + 1037
19 QtWidgets 0x112536881 QWidget::create(unsigned long long, bool, bool) + 321
20 QtWidgets 0x1125388e7 QWidgetPrivate::createWinId() + 103
21 QtWidgets 0x1125388e7 QWidgetPrivate::createWinId() + 103
22 QtWidgets 0x1125388e7 QWidgetPrivate::createWinId() + 103
23 QtWidgets 0x1125388e7 QWidgetPrivate::createWinId() + 103
24 QtWidgets 0x1125388e7 QWidgetPrivate::createWinId() + 103
25 QtWidgets 0x1125388e7 QWidgetPrivate::createWinId() + 103
26 QtWidgets 0x112539631 QWidget::winId() const + 65
27 freeview 0x100b08964 0x10080d000 + 3127652
28 freeview 0x100b0888f 0x10080d000 + 3127439
29 freeview 0x10089859f 0x10080d000 + 570783
30 freeview 0x1009806cc 0x10080d000 + 1521356
31 freeview 0x1009833e5 0x10080d000 + 1532901
32 freeview 0x1009f4a1a 0x10080d000 + 1997338
33 freeview 0x1009ebfa3 0x10080d000 + 1961891
34 freeview 0x1009252e5 0x10080d000 + 1147621
35 dyld 0x7ff807858345 start + 1909
Thread 1:
0 libsystem_pthread.dylib 0x7ff807bdfac0 start_wqthread + 0
Thread 2:: Dispatch queue: com.apple.dock.fullscreen
0 dyld 0x7ff80789e8ca dyld3::MachOFile::trieWalk(Diagnostics&, unsigned char const*, unsigned char const*, char const*) + 244
1 dyld 0x7ff80786d3ec dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 352
2 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
3 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
4 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
5 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
6 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
7 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
8 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
9 dyld 0x7ff80786d6f1 dyld4::Loader::hasExportedSymbol(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::ExportedSymbolMode, dyld4::Loader::ResolverMode, dyld4::Loader::ResolvedSymbol*, dyld3::Array<dyld4::Loader const*>*) const + 1125
10 dyld 0x7ff807887805 dyld4::APIs::dlsym(void*, char const*) + 799
11 SkyLight 0x7ff80d5c799b __loginframework_vtable_block_invoke + 605
12 libdispatch.dylib 0x7ff807a42dbc _dispatch_client_callout + 8
13 libdispatch.dylib 0x7ff807a4404e _dispatch_once_callout + 20
14 SkyLight 0x7ff80d5c926b SLSCopyCurrentSessionPropertiesInternalBridge + 366
15 SkyLight 0x7ff80d3f773a SLSessionCopyCurrentDictionary + 12
16 AppKit 0x7ff80b4545bb -[NSDockConnection _makeConnectionIfNeededWithRetryInterval:onDemand:] + 45
17 AppKit 0x7ff80bff4660 __35-[NSDockConnection startConnection]_block_invoke.37 + 45
18 libdispatch.dylib 0x7ff807a41ac6 _dispatch_call_block_and_release + 12
19 libdispatch.dylib 0x7ff807a42dbc _dispatch_client_callout + 8
20 libdispatch.dylib 0x7ff807a48eff _dispatch_lane_serial_drain + 800
21 libdispatch.dylib 0x7ff807a49997 _dispatch_lane_invoke + 377
22 libdispatch.dylib 0x7ff807a53414 _dispatch_root_queue_drain_deferred_wlh + 271
23 libdispatch.dylib 0x7ff807a52d2a _dispatch_workloop_worker_thread + 451
24 libsystem_pthread.dylib 0x7ff807be0b84 _pthread_wqthread + 327
25 libsystem_pthread.dylib 0x7ff807bdfacf start_wqthread + 15
Thread 3:
0 libsystem_pthread.dylib 0x7ff807bdfac0 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x7ff807bdfac0 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x5367756265442f73 rbx: 0x00007ff7bf6f0210 rcx: 0x000000011254a403 rdx: 0x000000011254b178
rdi: 0x00007ffd8d090088 rsi: 0x00007ff7bf6eeb38 rbp: 0x00007ff7bf6ee7d0 rsp: 0x00007ff7bf6ee7c0
r8: 0x00000000fffff9e2 r9: 0x0000000000000000 r10: 0x000000011175d4a8 r11: 0x00007ff80b34a55f
r12: 0x00007f791db1cec0 r13: 0x00007ff7bf6f0210 r14: 0x00007ff7bf6eeb38 r15: 0x00007ff7bf6eeb38
rip: 0x0000000100a00b98 rfl: 0x0000000000010217 cr2: 0x0000000000000000
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 13
Thread 0 instruction stream:
27 01 66 0f 1f 44 00 00-55 48 89 e5 41 56 53 49 '.f..D..UH..AVSI
89 f6 48 89 fb 48 8b bf-98 01 00 00 48 8b 47 20 ..H..H......H.G
66 83 78 08 00 79 05 e8-1c dc e7 ff 48 89 df 4c f.x..y......H..L
89 f6 5b 41 5e 5d e9 a9-72 27 01 66 2e 0f 1f 84 ..[A^]..r'.f....
00 00 00 00 00 0f 1f 00-55 48 89 e5 41 56 53 49 ........UH..AVSI
89 f6 48 89 fb 48 8b bf-98 01 00 00 48 8b 47 20 ..H..H......H.G
[66]83 78 08 00 79 05 e8-dc db e7 ff 48 89 df 4c f.x..y......H..L <==
89 f6 5b 41 5e 5d e9 83-73 27 01 66 2e 0f 1f 84 ..[A^]..s'.f....
00 00 00 00 00 0f 1f 00-55 48 89 e5 41 56 53 41 ........UH..AVSA
89 ce 48 89 fb 48 8b bf-38 01 00 00 e8 57 73 f2 ..H..H..8....Ws.
ff 84 c0 74 17 48 8b b3-38 01 00 00 41 0f b6 d6 ...t.H..8...A...
48 89 df 5b 41 5e 5d e9-0c 00 00 00 31 c0 5b 41 H..[A^].....1.[A
Binary Images:
0x111687000 - 0x111693fff libobjc-trampolines.dylib (*) <e554b85a-6614-3883-83d8-8eb3bd70a202> /usr/lib/libobjc-trampolines.dylib
0x1117de000 - 0x1117e5fff libqmacjp2.dylib (*) <41234a69-0606-3f7d-ac82-499b68e7ca40> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqmacjp2.dylib
0x1117d0000 - 0x1117d7fff libqtga.dylib (*) <4f81c0d1-a27e-3ad1-848f-f6d98b196553> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqtga.dylib
0x1117c1000 - 0x1117c8fff libqicns.dylib (*) <cf2b53cc-5f03-3dcf-b1dc-d5b19cc7b39e> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqicns.dylib
0x1133d1000 - 0x11343cfff libqtiff.dylib (*) <a588fa3d-680f-33b2-b1b3-02a035bd7cad> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqtiff.dylib
0x11349a000 - 0x113509fff libqjpeg.dylib (*) <fb2e4cb6-67fd-3b9d-94d9-d0f3053fc895> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqjpeg.dylib
0x1117b2000 - 0x1117b9fff libqmacheif.dylib (*) <e76b1e74-e944-34d2-8d84-5cf2834a81d0> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqmacheif.dylib
0x1117a3000 - 0x1117aafff libqico.dylib (*) <794fb25c-3196-3e6b-aef6-714be0814505> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqico.dylib
0x112440000 - 0x1124cffff libqwebp.dylib (*) <eca0ac78-e7ba-3a03-aeca-2be5c17b3900> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqwebp.dylib
0x111795000 - 0x11179cfff libqwbmp.dylib (*) <01c3f1c0-9acd-317c-947e-a49f4e3d27fc> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqwbmp.dylib
0x111787000 - 0x11178efff libqgif.dylib (*) <bcc35720-04d0-304a-a77b-a1037536d0c7> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/imageformats/libqgif.dylib
0x112407000 - 0x11242efff libqmacstyle.dylib (*) <5d5fd017-f4d1-3b54-9845-648d0af93171> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/styles/libqmacstyle.dylib
0x1116b3000 - 0x11174efff libqcocoa.dylib (*) <ea4d92c7-1e56-3035-973a-cc1b9e855893> /Applications/freesurfer/*/Freeview.app/Contents/PlugIns/platforms/libqcocoa.dylib
0x1124ee000 - 0x11299dfff org.qt-project.QtWidgets (6.4) <0c19fe5b-8080-3277-b0d7-db86b1abfa73> /Applications/freesurfer/*/Freeview.app/Contents/Frameworks/QtWidgets.framework/Versions/A/QtWidgets
0x111941000 - 0x11200cfff org.qt-project.QtGui (6.4) <9c994073-fbbb-32e0-8f98-4ba06dd0b45c> /Applications/freesurfer/*/Freeview.app/Contents/Frameworks/QtGui.framework/Versions/A/QtGui
0x1135c6000 - 0x113abdfff org.qt-project.QtCore (6.4) <e2b9aa6f-b72b-3985-846f-c337ba7fbfbe> /Applications/freesurfer/*/Freeview.app/Contents/Frameworks/QtCore.framework/Versions/A/QtCore
0x111801000 - 0x111884fff org.qt-project.QtDBus (6.4) <ce1dbd3c-3df5-3b52-a631-8c079db6bbe9> /Applications/freesurfer/*/Freeview.app/Contents/Frameworks/QtDBus.framework/Versions/A/QtDBus
0x10080d000 - 0x101ed8fff org.martinos.freeview (7.3.2) <9f2f99e0-7cdf-3b5d-a8c3-7152207d0e6a> /Applications/freesurfer/*/Freeview.app/Contents/MacOS/freeview
0x7ff807852000 - 0x7ff8078e281f dyld (*) <18f658dd-20f3-324d-b7ac-8a9c60b574b3> /usr/lib/dyld
0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???
0x7ff80b2f0000 - 0x7ff80c720ff7 com.apple.AppKit (6.9) <d0e19a37-f677-32b5-b3d2-005e60b90f7f> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x7ff807bde000 - 0x7ff807be9ff7 libsystem_pthread.dylib (*) <d70de43a-2804-340a-804c-5d316c1e013b> /usr/lib/system/libsystem_pthread.dylib
0x7ff80d2bc000 - 0x7ff80d71effe com.apple.SkyLight (1.600.0) <9852f0e8-f530-3fe5-bf94-47d9a2266f87> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
0x7ff807a40000 - 0x7ff807a86ff1 libdispatch.dylib (*) <ffb968b0-807c-38bf-ae61-50a96c8d310c> /usr/lib/system/libdispatch.dylib
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=557.8M resident=0K(0%) swapped_out_or_unallocated=557.8M(100%)
Writable regions: Total=1.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.3G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
ColorSync 224K 25
Foundation 16K 1
Kernel Alloc Once 8K 1
MALLOC 1.1G 45
MALLOC guard page 48K 12
STACK GUARD 56.0M 5
Stack 10.0M 5
VM_ALLOCATE 268K 4
__CTF 824 1
__DATA 264.3M 394
__DATA_CONST 20.0M 229
__DATA_DIRTY 813K 115
__FONT_DATA 2352 1
__LINKEDIT 184.3M 19
__OBJC_RO 71.9M 1
__OBJC_RW 2201K 2
__TEXT 373.5M 411
mapped file 75.3M 20
shared memory 1296K 17
=========== ======= =======
TOTAL 2.1G 1309
MANAGED BY INCF