SSwarper issues

AFNI version info (afni -ver): AFNI_24.1.15

Hello all,

I'm having a problem with running the SSwarper. My command looks like this:

sswarper2 -input {datadir}/anat/{subject}_T1w.nii.gz
-base MNI152_2009_template_SSW.nii.gz
-subid {subject} \ -odir {subject}_anat_warped
-giant_mov

It seems to run till the end, but I'm not getting all the output files (as listed in the documentation). When I check the output in the terminal, I get a weird message: "Fatal Signal 11 (SIGSEGV) received" or "Fatal Signal 10 (SIGBUS) received" 14 times.

How can I fix that?
Best,
Maria Czarnecka

Hi, Maria-

Could you please copy+paste the output of:

afni_system_check.py -check_all

?

Also, it would help to have a copy+paste of the full crash message, plus a few lines prior in the text output.

--pt

Sure! That's the system check:

-------------------------------- general ---------------------------------architecture: 64bit cpu type: i386system: Darwinrelease: 23.4.0version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64distribution: 10.16number of CPUs: 16apparent login shell: zshshell RC file: .zshrc (exists)
--------------------- AFNI and related program tests ---------------------which afni : /Users/samplab/abin/afniafni version : Precompiled binary macos_10.12_local: May 27 2024 : AFNI_24.1.15 'Publius Septimius Geta'AFNI_version.txt : AFNI_24.1.15, macos_10.12_local, May 27 2024, officialwhich python : /Users/samplab/miniconda3/bin/pythonpython version : 3.12.2which R :
instances of various programs found in PATH: afni : 1 (/Users/samplab/abin/afni) R : 0 python : 2 /Users/samplab/miniconda3/bin/python3.12 /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 python2 : 1 (/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7) python3 : 4 /Users/samplab/miniconda3/bin/python3.12 /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12 /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 /usr/bin/python3

testing ability to start various programs... afni : success suma : success 3dSkullStrip : success 3dAllineate : success 3dRSFC : success SurfMesh : success 3dClustSim : success uber_subject.py : success 3dMVM : FAILURE R: Command not found. R: Command not found.
------------------------ dependent program tests -------------------------checking for dependent programs...
which tcsh : /bin/tcshtcsh version : 6.21.00which Xvfb : /opt/X11/bin/Xvfb
checking for R packages... rPkgsInstall -pkgs ALL -check : FAILURE R: Command not found. R: Command not found.
R RHOME : R: Command not found.
------------------------------ python libs -------------------------------
++ module loaded: matplotlib.pyplot module file : /Users/samplab/miniconda3/lib/python3.12/site-packages/matplotlib/pyplot.py matplotlib version : 3.8.0
++ module loaded: flask module file : /Users/samplab/miniconda3/lib/python3.12/site-packages/flask/init.py flask version : 2.2.5
++ module loaded: flask_cors module file : /Users/samplab/miniconda3/lib/python3.12/site-packages/flask_cors/init.py flask_cors version : 3.0.10
-- python binaries under /usr/local/bin: /usr/local/bin/python (sym link to /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7) /usr/local/bin/python3 (sym link to /Library/Frameworks/Python.framework/Versions/3.12/bin/python3.12) /usr/local/bin/python2 (sym link to /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7) /usr/local/bin/python3.9 (sym link to /usr/local/Cellar/python@3.9/3.9.17_1/Frameworks/Python.framework/Versions/3.9/bin/python3.9) /usr/local/bin/python2.7 (sym link to /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7)
-------------------------------- env vars --------------------------------PATH = /Users/samplab/miniconda3/bin:/Users/samplab/miniconda3/condabin:/Library/Frameworks/Python.framework/Versions/3.12/bin:/Users/samplab/fsl/share/fsl/bin:/Users/samplab/fsl/share/fsl/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/samplab/abin
PYTHONPATH (sub-shell) = R_LIBS (sub-shell) = LD_LIBRARY_PATH (sub-shell) = DYLD_LIBRARY_PATH (sub-shell) = :/opt/X11/lib/flat_namespaceDYLD_FALLBACK_LIBRARY_PATH (sub-shell) = CONDA_SHLVL = 1CONDA_DEFAULT_ENV = base
----------------------------- eval dot files -----------------------------
----------- AFNI $HOME files -----------
.afnirc : found .sumarc : found .afni/help/all_progs.COMP : found
--------- shell startup files ----------
-- good: .tcshrc seems to contain 'source .cshrc' -- considered operations: path, flatdir, apsearch -- note: followers should not need edits, so edit flags should be 0 (have 1 follower(s), which can be ignored) dot file test : want 1 modifications across 3 files: file path flatdir apsearch follower --------------- ---- ------- -------- -------- .cshrc 0 0 1 0 .tcshrc 0 0 0 1 .zshrc 0 0 0 0 ------------------------------ data checks -------------------------------data dir : missing AFNI_data6data dir : missing AFNI_demosdata dir : missing suma_demodata dir : found afni_handouts under $HOME (1908108M Avail)atlas : found TT_N27+tlrc under /Users/samplab/abin
------------------------------ OS specific -------------------------------XQuartz version : 2.8.5
which brew : /usr/local/bin/brewbrew version : Homebrew >=2.5.0 (shallow or no git repository)
** consider linking /usr/local/Cellar/gcc/13.1.0/lib/gcc/current/libgomp.1.dylib under /usr/local/lib++ found valid link /usr/local/lib/libglib-2.0.dylib to ../Cellar/glib/2.76.4/lib/libglib-2.0.dylib++ found 1 dylib files under '/opt/X11/lib/flat_namespace' -- found 'libXt' dylib files: /opt/X11/lib/flat_namespace/libXt.6.dylib-- recent OS X, cheating to check DYLD_LIBRARY_PATH in cur shell 'zsh'...++ found evar DYLD_LIBRARY_PATH = :/opt/X11/lib/flat_namespace-- recent OS X, cheating to check DYLD_LIBRARY_PATH in shell 'tcsh'...++ found evar DYLD_LIBRARY_PATH = /opt/X11/lib/flat_namespace:/opt/X11/lib/flat_namespace
========================= summary, please fix: =========================* just be aware: login shell 'zsh', but our code examples use 'tcsh'* missing program: R* failure under initial "AFNI and related program tests"* AFNI programs show FAILURE* missing R packages (see rPkgsInstall)* dot file test : want 1 modifications across 3 files:* insufficient data for AFNI bootcamp (see "Prepare for Bootcamp" on install pages)* consider linking /usr/local/Cellar/gcc/13.1.0/lib/gcc/current/libgomp.1.dylib under /usr/local/lib* have R, but need to add dir to PATH add dir: /Library/Frameworks/R.framework/Versions/3.6/Resources/bin

Here are two (out of 14) examples of the message:

+++ Command Echo:
afni -q -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=4 mont=1x1:176:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=4 mont=1x1:256:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=4 mont=1x1:256:1:black crop=0:0,0:0 -com SET_PBAR_ALL +99 1 Reds_and_Blues -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 499.000000 -com SET_FUNC_RANGE 1151.000000 -com SET_THRESHNEW 0 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_XHAIR_GAP -1 -com SET_DICOM_XYZ 0 0 0 -com SAVE_JPEG axialimage ./img00.axi blowup=2 -com SAVE_JPEG sagittalimage ./img00.sag blowup=2 -com SAVE_JPEG coronalimage ./img00.cor blowup=2 -com QUITT ./__tmp_chauf_rXTPq8ZGPb7

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++ If you are using XQuartz 2.7.10 (or later), and AFNI crashes when

  • opening windows, or you cannot type text into AFNI popup windows,
  • you might need to set an environment variable to solve this problem:
  • setenv DYLD_LIBRARY_PATH /opt/X11/lib/flat_namespace # tcsh
  • export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace # bash
  • This command is best put in your startup ~/.cshrc file, so that
  • it will be invoked for every (t)csh shell you open (mutatis mutandis
  • for the bash shell, of course).
  • If things are OK and you want to avoid having this warning message
  • pollute your terminal, use this:
  • setenv AFNI_SKIP_DYLD_WARNING YES # tcsh
  • export AFNI_SKIP_DYLD_WARNING=YES # bash

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Warning: Widget must be a VendorShell.

Fatal Signal 11 (SIGSEGV) received
Last STATUS: creating top_form
AFNI_make_widgets
new_AFNI_controller
MAIN_workprocess
AFNI:main
Bottom of Debug Stack
** AFNI version = AFNI_24.1.15 Compile date = May 27 2024
** [[Precompiled binary macos_10.12_local: May 27 2024]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /Users/samplab/.afni.crashlog
\n+* Removing temporary image directory './__tmp_chauf_rXTPq8ZGPb7'.\n
[1] + Done Xvfb :146 -screen 0 1024x768x24

...

+++ Command Echo:
afni -q -no1D -noplugins -no_detach -com SWITCH_UNDERLAY tmp_ulay.nii -com SWITCH_OVERLAY tmp_olay.nii -com SEE_OVERLAY + -com OPEN_WINDOW sagittalimage opacity=9 mont=6x1:30:1:black crop=0:0,0:0 -com OPEN_WINDOW coronalimage opacity=9 mont=6x1:35:1:black crop=0:0,0:0 -com OPEN_WINDOW axialimage opacity=9 mont=6x1:29:1:black crop=0:0,0:0 -com SET_PBAR_ALL -99 1 Reds_and_Blues_Inv -com DO_NOTHING -com SET_SUBBRICKS 0 0 0 -com SET_ULAY_RANGE A.all 0.000000 1296.494385 -com SET_FUNC_RANGE 351.156158 -com SET_THRESHNEW 22.583483 * -com SET_FUNC_ALPHA No -com SET_FUNC_BOXED No -com SET_FUNC_RESAM NN.NN -com SET_XHAIRS OFF -com SET_XHAIR_GAP -1 -com SET_DICOM_XYZ -14 31 30 -com SAVE_JPEG axialimage ../__ssw_intermed_vRhlaqcarOd.axi blowup=2 -com SAVE_JPEG sagittalimage ../__ssw_intermed_vRhlaqcarOd.sag blowup=2 -com SAVE_JPEG coronalimage ../__ssw_intermed_vRhlaqcarOd.cor blowup=2 -com QUITT ../__tmp_chauf_j74rh8i6YGd

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++ If you are using XQuartz 2.7.10 (or later), and AFNI crashes when

  • opening windows, or you cannot type text into AFNI popup windows,
  • you might need to set an environment variable to solve this problem:
  • setenv DYLD_LIBRARY_PATH /opt/X11/lib/flat_namespace # tcsh
  • export DYLD_LIBRARY_PATH=/opt/X11/lib/flat_namespace # bash
  • This command is best put in your startup ~/.cshrc file, so that
  • it will be invoked for every (t)csh shell you open (mutatis mutandis
  • for the bash shell, of course).
  • If things are OK and you want to avoid having this warning message
  • pollute your terminal, use this:
  • setenv AFNI_SKIP_DYLD_WARNING YES # tcsh
  • export AFNI_SKIP_DYLD_WARNING=YES # bash

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Warning: Widget must be a VendorShell.

Fatal Signal 10 (SIGBUS) received
Last STATUS: creating top_form
AFNI_make_widgets
new_AFNI_controller
MAIN_workprocess
AFNI:main
Bottom of Debug Stack
** AFNI version = AFNI_24.1.15 Compile date = May 27 2024
** [[Precompiled binary macos_10.12_local: May 27 2024]]
** Program Death **
** If you report this crash to the AFNI message board,
** please copy the error messages EXACTLY, and give
** the command line you used to run the program, and
** any other information needed to repeat the problem.
** You may later be asked to upload data to help debug.
** Crash log is appended to file /Users/samplab/.afni.crashlog
\n+* Removing temporary image directory '../__tmp_chauf_j74rh8i6YGd'.\n
[1] + Done Xvfb :731 -screen 0 1024x768x24

Hi-

Thanks for copy+pasting that, that is helpful.

You are using the precompiled AFNI binaries "macos_10.12_local" for a macOS system, with Intel compiler. At present, "macos_10.12_local" seems to have an issue with the widgets. If you compile AFNI source code locally on your machine, you should avoid that error.

These are the instructions for doing so here.

  • You have AFNI installed to run precompiled binaries, but I think you can still run the initial script; it will update your homebrew, and then also get any extra dependencies from the list which it needs to install.
  • You don't have R at present, so running the second script will likely still be useful for doing that.
  • The third script will get the AFNI github repository and then build the binaries, which takes a while (like 15 minutes to compile, and then for some reason on macOS building the library of parsed help files for option-autocompleting is slow, so might take another 10-15mins).
    • NB: as a quirk of the building, you might have to conda deactivate your miniconda in the terminal before building (i.e., before running the 3rd script), if it fails running the build with an environment being active.

After that, you shouldn't have the observed errors.

--pt

Thank you so much! That helped. SSwarper is running with no problems (which is really surprising to me because it used to run with that configuration two months ago).
I am running the afni_proc.py now and I have new issues. Should I start a new thread or can I post here?

Yay for sswarper issues being sorted; boooo for new afni_proc.py ones! But sure, starting a new thread makes sense.

--pt