I’m trying to enable FreeSurfer in my laptop (Mac / Big Sur), but I’m facing a strange error.
I downloaded the installation package and installed without any problem, and also added the lines in terminal for:
exporting the FREESURFER_HOME address, SUBJECT_DIR, and
doing the environment setup (SetUpFreeSurfer.sh).
Still, when I execute “freeview” (either in the terminal or in Finder), the application doesn’t run. If I run it in the terminal, I get the following error:
I usually get
/Applications/freesurfer/7.2.0
without the last “/”.
After seeing you email, I changed FREESURFER_HOME (with an export command) to includ the last “/”. And somehow freeview ran.
But then, I closed and re-started the Terminal, and now is not running again,
even after following (to the best of my memory) these same steps that seem to made it run before.
Sounds like your shell is not configured. You may have been using bash before, and the default is now zsh. You will need to either switch your default shell (User option) or the Terminal app’s default shell or update the configuration file that gets loaded for the default shell (for instance .zshrc).
sorry to get your hopes up, actually ,it worked only one time, after I did some "clearing of things on my desktop: then when I open freeview again the same error (segentation fault. error). I did not make any changes in the script ,so I am mystified about what to do next.
Any update on this issue?? I had some problems opening Freeview yesterday but after updating Freeview.app (UpdateFreeview - Free Surfer Wiki) I was able to open my files properly. Somehow it is no longer opening today, even after re-updating Freeview.app… I’m confused… Here’s the error message I get:
/Applications/freesurfer/7.2.0/bin/freeview: line 2: 6263 Segmentation fault: 11 FREESURFER_HOME/Freeview.app/Contents/MacOS/freeview "@"
You might want to be sure to configure the shell environment with the scripts Freesurfer provides. For example, if you are using bash or zsh, you can use
source /Applications/freesurfer/7.2.0/sources.sh
for tcsh, use
source /Applications/freesurfer/7.2.0/sources.csh
You can replace the “/Applications/freesurfer/7.2.0” with the variable $FREESURFER_HOME
If the terminal from which I am trying to launch freeview is on an external monitor, I get an immediate segfault, same as this first post. If I drag the terminal to my MacBook display and launch freeview it works. Dragging the terminal back to an external monitor after this successful launch and trying again gets me the same segfault. So - if you run into this issue, and it isn’t a license problem, try moving the terminal window over to the inbuilt display.
Edit - This is an M1 mac, with Monterey 12.3.1.
Good news - after launching freeview, you can move it to you (likely larger) external monitor and there are no complaints (as long as you don’t close it).
We’ve seen similar issues in the past with multiple monitors and X11. I haven’t seen it on ARM systems. Also there can be problems related to the number of colors and refresh rate.
Wow… thanks a lot @dowdlelt for sharing that! I would have look forever for that! But sure enough, I just moved the terminal from my external screen to my MacBook pro screen and ! Problem solved!
I tried moving the terminal to the mac screen but still I get the same error, has anyone solved it?
could anyone help me ? I have tried literally every solution mentioned in this thread but still getting the same segmentation fault 11 error whenever I try to open any volume ( even the sample which comes with freesurfer)