Afni crashing when I attempt to use the Draw ROI plugin

Hi,

I’m having a weird issue where everything in afni is working totally fine except when I go to click on the Draw ROI plugin afni crashes. I get this error message:

Fatal Signal 11 (SIGSEGV) received
Last STATUS: ** free() of non-tracked pointer [thd_ttatlas_query.c line 8740] ??
PLUG_startup_plugin_CB
AFNI_drive_open_plugin
AFNI_drive_open_window
AFNI_driver
AFNI_imag_pop_CB
AFNI:main
Bottom of Debug Stack
** AFNI version = AFNI_19.3.12 Compile date = Nov 8 2019
** [[Precompiled binary linux_ubuntu_16_64: Nov 8 2019]]
** Program Death **

I’ve tried opening afni in different folders and I’ve tried restarting the whole thing. It just keeps crashing. Any idea what’s happening?

Thanks,
Miranda

Your AFNI binary is a year old. Try updating to a newer version and see if you still have this issue.

Okay I updated and unfortunately the same thing happened. I get the same error message:

Fatal Signal 11 (SIGSEGV) received
PLUG_startup_plugin_CB
AFNI_drive_open_plugin
AFNI_drive_open_window
AFNI_driver
AFNI_imag_pop_CB
AFNI:main
Bottom of Debug Stack
** AFNI version = AFNI_20.2.06 Compile date = Jul 23 2020
** [[Precompiled binary linux_ubuntu_16_64: Jul 23 2020]]
** 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 /home/scarlatamj/.afni.crashlog

Hi, Miranda-

I see you are using Ubuntu. Is this on “real” Ubuntu, or the Windows Subsystem Linux Ubuntu (which is also real Ubuntu, but with occasional quirks)?

Also, could you please copy+paste the output of the system check:


afni_system_check.py -check_all

?

thanks,
pt

The current linux_ubuntu_16_64 binary distribution is even more recent than the version you just updated to. Update to the latest with:

@update.afni.binaries -d

That may very well not be the real problem you are running into. If you have built this from source yourself, then you will want to download the atlas and template datasets separately. You can put them in the same directory as the AFNI binaries or put them into a separate directory. With a separate directory, you will need to specify that directory with an AFNI environment variable, AFNI_ATLAS_PATH, (set in your ~/.afnirc file).

https://afni.nimh.nih.gov/pub/dist/atlases/atlases_latest.tgz

You can check out the atlases from the command line with :

whereami -show_atlases
whereami -space MNI 30 30 20

I believe I am using the windows subsystem linux ubunto but not 100% sure about that. This is the output of uname -a if it helps: Linux xorn 4.4.0-171-generic #200-Ubuntu SMP Tue Dec 3 11:04:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Here’s the output of the check:
-------------------------------- general ---------------------------------
architecture: 64bit ELF
system: Linux
release: 4.4.0-171-generic
version: #200-Ubuntu SMP Tue Dec 3 11:04:55 UTC 2019
distribution: Ubuntu 16.04 xenial
number of CPUs: 192
apparent login shell: bash
shell RC file: .bashrc (exists)

--------------------- AFNI and related program tests ---------------------
which afni : /share/imaging/afni/20200729/afni
afni version : Precompiled binary linux_ubuntu_16_64: Jul 23 2020
: AFNI_20.2.06 ‘Aulus Vitellius’
AFNI_version.txt : AFNI_20.2.06, linux_ubuntu_16_64, Jul 23 2020
which python : /usr/bin/python
python version : 2.7.12
which R : /usr/bin/R
R version : R version 3.6.2 (2019-12-12) – “Dark and Stormy Night”
which tcsh : /usr/bin/tcsh

instances of various programs found in PATH:
afni : 1 (/share/imaging/afni/20200729/afni)
R : 1 (/usr/lib/R/bin/R)
python : 1 (/usr/bin/python2.7)
python2 : 1 (/usr/bin/python2.7)
python3 : 1 (/usr/bin/python3.5)

testing ability to start various programs…
afni : success
suma : success
3dSkullStrip : success
uber_subject.py : success
3dAllineate : success
3dRSFC : success
SurfMesh : success
3dClustSim : success
3dMVM : success

checking for R packages…
rPkgsInstall -pkgs ALL -check : FAILURE

    oo Warning: 
       These packages are not installed on the computer: metafor!

R RHOME : /usr/lib/R

checking for $HOME files…
.afnirc : found
.sumarc : found
.afni/help/all_progs.COMP : found

------------------------------ python libs -------------------------------
++ module loaded: PyQt4
module file : /usr/lib/python2.7/dist-packages/PyQt4/init.pyc

++ module loaded: matplotlib.pyplot
module file : /usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.pyc

-------------------------------- env vars --------------------------------
PATH = /share/imaging/afni/20200729:/share/imaging/rstudio/1.2-gpu:/share/imaging/bin:/opt/anaconda2/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/bin:/usr/local/lib/python2.7/dist-packages/numpy/.libs

PYTHONPATH = /usr/local/python

R_LIBS =
LD_LIBRARY_PATH =
DYLD_LIBRARY_PATH =
DYLD_FALLBACK_LIBRARY_PATH =

------------------------------ data checks -------------------------------
data dir : missing AFNI_data6
data dir : missing AFNI_demos
data dir : missing suma_demo
data dir : missing afni_handouts
atlas : found TT_N27+tlrc under /share/imaging/afni/20200729

------------------------------ OS specific -------------------------------
which apt-get : /usr/bin/apt-get
apt-get version : apt 1.2.32ubuntu0.1 (amd64)

have Ubuntu system: Ubuntu 16.04 xenial
have Ubuntu afni : Precompiled binary linux_ubuntu_16_64: Jul 23 2020

========================= summary, please fix: =========================

  • just be aware: login shell ‘bash’, but our code examples use ‘tcsh’
  • missing R packages (see rPkgsInstall)
  • insufficient data for AFNI bootcamp

The only errors it brings up seem to be only relevant for afni bootcamp.

Thanks for helping with this!

Hmm, OK, thanks for sending that.

It looks like you aren’t using Windows Subsystem Linux (that would be if you were on a Windows OS, and then opened a Linux erminal from there).

Given that you have 192 CPUs available, I’m guessing you are using a cluster or larger central computer (or are just lucky to have such a powerful computer to yourself!).

There is an R package failure (“metafor”), which will make Gang sad, but we can come back to that.

What is the output of each of these:


afni -q -VAFNI_GLOBAL_SESSION=
afni -q -VAFNI_ATLAS_PATH=
afni -q -VAFNI_ATLAS_LIST=
afni -q -VAFNI_ATLAS_COLORS=
afni -q -VAFNI_TEMPLATE_SPACE_LIST=

(ignoring the “++ AFNI is detached from terminal.” that will likely be displayed in each case)?

And what is the output of:


\ls -l /share/imaging/afni/20200729/*HEAD

?

–pt

Okay gotcha. Yes, I’m connected to a larger central computer through a VPN.

These are the outputs:

afni -q -VAFNI_GLOBAL_SESSION=

++ AFNI is detached from terminal.
afni -q -VAFNI_ATLAS_PATH=

++ AFNI is detached from terminal.
afni -q -VAFNI_ATLAS_LIST=
-Rat_Atlas_Adjusted
++ AFNI is detached from terminal.

afni -q -VAFNI_ATLAS_COLORS=

++ AFNI is detached from terminal.

afni -q -VAFNI_TEMPLATE_SPACE_LIST=
-all
++ AFNI is detached from terminal.

\ls -l /share/imaging/afni/20200729/*HEAD
-rw-r–r-- 1 20892 users 19781 Jul 23 19:27 /share/imaging/afni/20200729/HaskinsPeds_aff_atlas1.0+tlrc.HEAD
-rw-r–r-- 1 20892 users 2878 Jul 23 19:27 /share/imaging/afni/20200729/HaskinsPeds_aff_template1.0+tlrc.HEAD
-rw-r–r-- 1 20892 users 20750 Jul 23 19:27 /share/imaging/afni/20200729/HaskinsPeds_NL_atlas1.0+tlrc.HEAD
-rw-r–r-- 1 20892 users 9836 Jul 23 19:27 /share/imaging/afni/20200729/HaskinsPeds_NL_template1.0+tlrc.HEAD
-rw-r–r-- 1 20892 users 4686 Jul 23 19:27 /share/imaging/afni/20200729/MNI152_1mm_uni+tlrc.HEAD
-rw-r–r-- 1 20892 users 2496 Jul 23 19:27 /share/imaging/afni/20200729/MNI152_T1_2009c+tlrc.HEAD
-rwxr-xr-x 1 20892 users 2309 Jul 23 19:27 /share/imaging/afni/20200729/MNIa_caez_colin27_T1_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 2658 Jul 23 19:27 /share/imaging/afni/20200729/MNIa_caez_gw_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 2771 Jul 23 19:27 /share/imaging/afni/20200729/MNIa_caez_lr_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 18192 Jul 23 19:27 /share/imaging/afni/20200729/MNIa_caez_ml_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 11872 Jul 23 19:27 /share/imaging/afni/20200729/MNIa_caez_mpm_18+tlrc.HEAD
-rw-r–r-- 1 20892 users 16986 Jul 23 19:27 /share/imaging/afni/20200729/MNIa_caez_mpm_22+tlrc.HEAD
-rwxr-xr-x 1 20892 users 2309 Jul 23 19:27 /share/imaging/afni/20200729/MNIa_caez_N27+tlrc.HEAD
-rwxr-xr-x 1 20892 users 4656 Jul 23 19:27 /share/imaging/afni/20200729/MNI_avg152T1+tlrc.HEAD
-rwxr-xr-x 1 20892 users 4983 Jul 23 19:27 /share/imaging/afni/20200729/MNI_avg152T2+tlrc.HEAD
-rw-r–r-- 1 20892 users 3160 Jul 23 19:27 /share/imaging/afni/20200729/MNI_caez_gw_18+tlrc.HEAD
-rw-r–r-- 1 20892 users 3273 Jul 23 19:27 /share/imaging/afni/20200729/MNI_caez_lr_18+tlrc.HEAD
-rw-r–r-- 1 20892 users 19202 Jul 23 19:27 /share/imaging/afni/20200729/MNI_caez_ml_18+tlrc.HEAD
-rw-r–r-- 1 20892 users 12533 Jul 23 19:27 /share/imaging/afni/20200729/MNI_caez_mpm_18+tlrc.HEAD
-rw-r–r-- 1 20892 users 18341 Jul 23 19:27 /share/imaging/afni/20200729/MNI_caez_mpm_22+tlrc.HEAD
-rwxr-xr-x 1 20892 users 2764 Jul 23 19:27 /share/imaging/afni/20200729/MNI_caez_N27+tlrc.HEAD
-rwxr-xr-x 1 20892 users 4631 Jul 23 19:27 /share/imaging/afni/20200729/MNI_EPI+tlrc.HEAD
-rw-r–r-- 1 20892 users 4202 Jul 23 19:27 /share/imaging/afni/20200729/MNI_VmPFC+tlrc.HEAD
-rw-r–r-- 1 20892 users 9783 Jul 23 19:27 /share/imaging/afni/20200729/TT_152_2009c+tlrc.HEAD
-rwxr-xr-x 1 20892 users 40896 Jul 23 19:27 /share/imaging/afni/20200729/TTatlas+tlrc.HEAD
-rwxr-xr-x 1 20892 users 4932 Jul 23 19:27 /share/imaging/afni/20200729/TT_avg152T1+tlrc.HEAD
-rwxr-xr-x 1 20892 users 5440 Jul 23 19:27 /share/imaging/afni/20200729/TT_avg152T2+tlrc.HEAD
-rwxr-xr-x 1 20892 users 8799 Jul 23 19:27 /share/imaging/afni/20200729/TT_caez_colin27_T1_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 8473 Jul 23 19:27 /share/imaging/afni/20200729/TT_caez_gw_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 8585 Jul 23 19:27 /share/imaging/afni/20200729/TT_caez_lr_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 24016 Jul 23 19:27 /share/imaging/afni/20200729/TT_caez_ml_18+tlrc.HEAD
-rwxr-xr-x 1 20892 users 17687 Jul 23 19:27 /share/imaging/afni/20200729/TT_caez_mpm_18+tlrc.HEAD
-rw-r–r-- 1 20892 users 25284 Jul 23 19:27 /share/imaging/afni/20200729/TT_caez_mpm_22+tlrc.HEAD
-rwxr-xr-x 1 20892 users 35035 Jul 23 19:27 /share/imaging/afni/20200729/TT_desai_dd_mpm+tlrc.HEAD
-rwxr-xr-x 1 20892 users 21386 Jul 23 19:27 /share/imaging/afni/20200729/TT_desai_dk_mpm+tlrc.HEAD
-rwxr-xr-x 1 20892 users 4897 Jul 23 19:27 /share/imaging/afni/20200729/TT_EPI+tlrc.HEAD
-rwxr-xr-x 1 20892 users 8730 Jul 23 19:27 /share/imaging/afni/20200729/TT_icbm452+tlrc.HEAD
-rwxr-xr-x 1 20892 users 12387 Jul 23 19:27 /share/imaging/afni/20200729/TT_N27_CA_EZ_MPM+tlrc.HEAD
-rwxr-xr-x 1 20892 users 18436 Jul 23 19:27 /share/imaging/afni/20200729/TT_N27_CA_EZ_PMaps+tlrc.HEAD
-rwxr-xr-x 1 20892 users 11839 Jul 23 19:27 /share/imaging/afni/20200729/TT_N27_EZ_LR+tlrc.HEAD
-rwxr-xr-x 1 20892 users 15625 Jul 23 19:27 /share/imaging/afni/20200729/TT_N27_EZ_ML+tlrc.HEAD
-rwxr-xr-x 1 20892 users 11447 Jul 23 19:27 /share/imaging/afni/20200729/TT_N27+tlrc.HEAD

Thanks for helping!

Two things stick out to me as odd -

First, the last version you posted was still out of date as Jul 23 2020.

Second, the AFNI_TEMPLATE_SPACE_LIST should not be set to “-all”. Remove that variable from your ~/.afnirc file.

Okay it works now!! I commented out AFNI_ATLAS_LIST and AFNI_TEMPLATE_SPACE_LIST in my .afnirc file and suddenly the draw ROI plugin works! So something’s just off with how I have one of those two variables set. Which is easily troubleshooted! Thanks for all your help guys!

Howdy-

Adding to Daniel’s comment, I also wonder why this command:


afni -q -VAFNI_ATLAS_LIST=

outputs something with a minus in front:


-Rat_Atlas_Adjusted

I don’t think that should be the case. I am not sure what that file is, either. I don’t see that string anywhere in the AFNI code.

From the list of AFNI environment variables, viewable here:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/educational/readme_env_vars.html
The meaning+examples of those environment variables is here:


AFNI_ATLAS_LIST

    This list contains the names of the atlases that should be queried
    when no specific atlas has been requested. For example, the afni GUI
    and whereami, by default, do not load all the atlases specified in the
    AFNI_atlas_spaces.niml file. If this variable is not set, the
    TT_Daemon atlas and the cytoarchitectonic Eickhoff-Zilles in MNI_ANAT
    space are loaded. If the variable is set to a list like
    "TT_Daemon,DD_Desai_PM", then only these two atlases are loaded. The
    list of atlas names may be separated by commas or semicolons. A
    special case of "ALL" may be set, and all the available atlases will
    be loaded.

and


AFNI_TEMPLATE_SPACE_LIST

    This list contains the names of the template spaces that are shown
    when whereami reports the coordinates among various spaces. By
    default, the list contains "TLRC,MNI,MNI_ANAT". As with
    AFNI_ATLAS_LIST, this list may also be set to "ALL".

Note that the values of these variables could be “ALL”, but that is different than “-all”.

Do you have specific files or directories of files that you want to include as default atlases?

–pt