Segmentation fault (core dumped)

HI
When I wanna process my own dmri data

forest@DESKTOP-DM8SQ21:~/linmin$ sct_maths -i linmin.nii.gz -mean t -o dmri_mean.nii.gz

--
Spinal Cord Toolbox (git-HEAD-95e66208c9d6937fbe00e86db6176e4001196e56)

sct_maths -i linmin.nii.gz -mean t -o dmri_mean.nii.gz
--

Segmentation fault (core dumped)

Something went wrong.

Hi,
Could you please run:

sct_check_dependencies

and show us the output.
thanks

 forest@DESKTOP-DM8SQ21:~/sct_course_london20/single_subject/data$ sct_check_dependencies

--
Spinal Cord Toolbox (git-HEAD-95e66208c9d6937fbe00e86db6176e4001196e56)

sct_check_dependencies
--

SCT info:
- version: git-HEAD-95e66208c9d6937fbe00e86db6176e4001196e56
- path: /home/forest/sct
OS: linux (Linux-4.4.0-19041-Microsoft-x86_64-with-debian-buster-sid)
CPU cores: Available: 6, Used by ITK functions: 6
RAM: Total: 16221MB, Used: 6968MB, Available: 9212MB
Check Python executable.............................[OK]
  Using bundled python 3.6.13 | packaged by conda-forge | (default, Feb 19 2021, 05:36:01)
[GCC 9.3.0] at /home/forest/sct/python/envs/venv_sct/bin/python
Check if data are installed.........................[OK]
Check if colored is installed.......................[OK] (1.4.2)
Check if dipy is installed..........................[OK] (1.3.0)
Check if futures is installed.......................[OK]
Check if h5py is installed..........................[OK] (2.10.0)
Check if Keras (2.1.5) is installed.................[OK] (2.1.5)
Check if ivadomed (2.7.2) is installed..............[OK] (2.7.2)
Check if matplotlib is installed....................[OK] (3.3.4)
Check if nibabel is installed.......................[OK] (3.2.1)
Check if numpy is installed.........................[OK] (1.19.5)
Check if onnxruntime (1.4.0) is installed...........[OK] (1.4.0)
Check if pandas is installed........................[OK] (1.1.5)
Check if psutil is installed........................[OK] (5.8.0)
Check if pyqt5 (5.11.3) is installed................[OK] (5.11.3)
Check if pytest is installed........................[OK] (6.2.2)
Check if pytest-cov is installed....................[OK] (__version__ = '2.11.1')
Check if raven is installed.........................[OK]
Check if requests is installed......................[OK] (2.25.1)
Check if requirements-parser is installed...........[OK] (0.2.0)
Check if scipy is installed.........................[OK] (1.5.3)
Check if scikit-image is installed..................[OK] (0.17.2)
Check if scikit-learn is installed..................[OK] (0.24.1)
Check if tensorflow (1.5.0) is installed............[OK] (1.5.0)
Check if torch (1.5.0+cpu) is installed.............[OK] (1.5.0+cpu)
Check if torchvision (0.6.0+cpu) is installed.......[OK] (0.6.0+cpu)
Check if xlwt is installed..........................[OK] (1.3.0)
Check if tqdm is installed..........................[OK] (4.57.0)
Check if transforms3d is installed..................[OK] (0.3.1)
Check if urllib3 is installed.......................[OK] (1.26.3)
Check if pytest_console_scripts is installed........[OK]
Check if spinalcordtoolbox is installed.............[OK]
Check ANTs compatibility with OS ...................[OK]
Check PropSeg compatibility with OS ................[OK]
Check if DISPLAY variable is set....................[OK]
Check if figure can be opened with PyQt.............failed to get the current screen resources
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-forest'
[OK]

OK, can you please now run:

sct_testing
forest@DESKTOP-DM8SQ21:~$ sct_testing

--
Spinal Cord Toolbox (git-HEAD-95e66208c9d6937fbe00e86db6176e4001196e56)

sct_testing
--

Creating temporary folder (/tmp/sct-20210318232327.723511-dllwwgiz)
Will run through the following tests:
- sequentially: sct_deepseg_gm sct_deepseg_lesion sct_deepseg_sc
- in parallel with 6 jobs: sct_analyze_lesion sct_analyze_texture sct_apply_transfo sct_convert sct_compute_ernst_angle sct_compute_hausdorff_distance sct_compute_mtr sct_compute_mscc sct_compute_snr sct_concat_transfo sct_create_mask sct_crop_image sct_dice_coefficient sct_detect_pmj sct_dmri_compute_dti sct_dmri_concat_b0_and_dwi sct_dmri_concat_bvals sct_dmri_concat_bvecs sct_dmri_compute_bvalue sct_dmri_moco sct_dmri_separate_b0_and_dwi sct_dmri_transpose_bvecs sct_extract_metric sct_flatten_sagittal sct_fmri_compute_tsnr sct_fmri_moco sct_get_centerline sct_image sct_label_utils sct_label_vertebrae sct_maths sct_merge_images sct_process_segmentation sct_propseg sct_qc sct_register_multimodal sct_register_to_template sct_resample sct_smooth_spinalcord sct_straighten_spinalcord sct_warp_template
Checking sct_deepseg_gm.............................[OK]
Checking sct_deepseg_lesion.........................[OK]
Checking sct_deepseg_sc.............................[OK]
Checking sct_analyze_lesion.........................[OK]
Checking sct_analyze_texture........................[OK]
Checking sct_apply_transfo..........................[OK]
Checking sct_convert................................[OK]
Checking sct_compute_ernst_angle....................[OK]
Checking sct_compute_hausdorff_distance.............[OK]
Checking sct_compute_mtr............................[OK]
Checking sct_compute_mscc...........................[OK]
Checking sct_compute_snr............................[OK]
Checking sct_concat_transfo.........................[OK]
Checking sct_create_mask............................[OK]
Checking sct_crop_image.............................[OK]
Checking sct_dice_coefficient.......................[OK]
Checking sct_detect_pmj.............................[OK]
Checking sct_dmri_compute_dti.......................[OK]
Checking sct_dmri_concat_b0_and_dwi.................[OK]
Checking sct_dmri_concat_bvals......................[OK]
Checking sct_dmri_concat_bvecs......................[OK]
Checking sct_dmri_compute_bvalue....................[OK]
Checking sct_dmri_moco..............................[OK]
Checking sct_dmri_separate_b0_and_dwi...............[OK]
Checking sct_dmri_transpose_bvecs...................[OK]
Checking sct_extract_metric.........................[OK]
Checking sct_flatten_sagittal.......................[OK]
Checking sct_fmri_compute_tsnr......................[OK]
Checking sct_fmri_moco..............................[OK]
Checking sct_get_centerline.........................[OK]
Checking sct_image..................................[OK]
Checking sct_label_utils............................[OK]
Checking sct_label_vertebrae........................[OK]
Checking sct_maths..................................[OK]
Checking sct_merge_images...........................[OK]
Checking sct_process_segmentation...................[OK]
Checking sct_propseg................................[OK]
Checking sct_qc.....................................[OK]
Checking sct_register_multimodal....................[OK]
Checking sct_register_to_template...................[OK]
Checking sct_resample...............................[OK]
Checking sct_smooth_spinalcord......................[OK]
Checking sct_straighten_spinalcord..................[OK]
Checking sct_warp_template..........................[OK]
status: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
Finished! Elapsed time: 155s

Excellent news, it means that SCT is working well on your end, and the problem likely comes from the data. Can you please share linmin.nii.gz

Hi jcohenadad
It is too big (about 13 MB) to upload ,so I emailed it to you.

hi,
this is too big for my email, can you just put it on the cloud (could be a private link), e.g. dropbox, google drive, OSF, etc.

https://osf.io/uxtm6

Hum, I can successfully run the following command:

sct_maths -i linmin.nii.gz -mean t -o dmri_mean.nii.gz

Here is the output image: dmri_mean.nii.gz (1.6 MB)

You seem to have enough RAM available (~10GB), so I am wondering what is the problem on your end. Could you please download this smaller dataset linmin_small.nii.gz (4.0 MB) and try the following command:

sct_maths -i linmin_small.nii.gz -mean t -o dmri_mean.nii.gz

Hi @chang, I see you removed the post. Did you try what I suggest here and did it work at the end?

Hi jcohenadad
Thank you very much for your concern!
I finally found the problem was the file permissions, I changed the permissions to solve the problem.

Hello @chang, this bug mystifies us, so I am hoping you can help us track this down in more detail. How exactly did you change the permissions? What were they before?

Would you be willing to share what

history

says, at least for the section from the first time you ran sct_maths -i linmin.nii.gz to the time it finally worked.

That would help us avoid this problem for other people in the future.

Thanks! Have a good day.

Hi

(venv_sct) forest@DESKTOP-DM8SQ21:~$ history
    1  cd/
    2  ls
    3  cd /
    4  cd mnt
    5  quit
    6  exit
    7  sct.exe clean
    8  sct
    9  cd sct
   10  sudo passwd root
   11  sudo cp /etc/apt/sources.list ~/.sources.listbf
   12  sudo vim /etc/apt/sources.list
   13  cd /etc/apt
   14  sudo cp /etc/apt/sources.list /etc/apt/sources.list.20210305
   15  sudo vim
   16  sudo cp /etc/apt/sources.list /etc/apt/sources.list.20210305
   17  sudo vim
   18  sudo vim sources.list
   19  sudo cp /etc/apt/sources.list /etc/apt/sources.list.20210305
   20  sudo vim sources.list
   21  cd /etc/apt
   22  sudo vim sources.list
   23  sudo apt update
   24  exit
   25  sudo apt-get update
   26  sudo apt-get install language-pack-zh-han*
   27  sudo vim /etc/profile
   28  sudo vim /etc/ssh/sshd_config
   29  sudo service ssh --full-restart
   30  sudo apt-get -y update
   31  sudo apt-get -y install gcc
   32  sudo apt-get -y install unzip
   33  sudo apt-get install -y python-pip python
   34  sudo apt-get install -y psmisc net-tools
   35  sudo apt-get install -y git
   36  sudo apt-get install -y gfortran
   37  sudo apt-get install -y libjpeg-dev
   38  echo 'export DISPLAY=127.0.0.1:0.0' >> .profile
   39  git clone https://github.com/neuropoly/spinalcordtoolbox.git sct
   40  echo 'export DISPLAY=127.0.0.1:0.0' >> .profile
   41  git clone https://github.com/neuropoly/spinalcordtoolbox.git sct
   42  cd sct
   43  git checkout 5.2.0
   44  yes | ./install_sct
   45  cd ~
   46  source .profile
   47  source .bashrc
   48  cd /mnt/c
   49  $SCT_DIR/batch_processing.sh
   50  exit
   51  cd sct
   52  yes | ./install_sct
   53  xclock
   54  echo 'export DISPLAY=:0.0' >> .profile
   55  yes | ./install_sct
   56  cd sct
   57  echo 'export DISPLAY=:0.0' >> .profile
   58  yes | ./install_sct
   59  pwd
   60  cd sct
   61  ls
   62  ll
   63  cd /tmp
   64  ls
   65  ll
   66  rm -rf sct-20210306110821.709913-4ylurit9/
   67  ll
   68  cd
   69  pwd
   70  cd sct
   71  ll
   72  yes | ./instal_sct
   73  yes | ./install_sct
   74  cd ~
   75  source .profile
   76  source .bashrc
   77  source/home/forest/.bashrc
   78  cd sct
   79  source/home/forest/.bashrc
   80  cd /mnt/c
   81  $SCT_DIR/batch_processing.sh
   82  cd~
   83  cd ~
   84  xhost+
   85  sct_check_dependencies
   86  exit
   87  sudo apt-get install x11-xserver-utils dconf-editor dbus-x11 -y
   88  xhost +
   89  sudo apt-get install xfce4-terminal
   90  echo "export DISPLAY=:1.0">> ~/.bashrc
   91  sudo xfce4-terminal
   92  apt-get update
   93  sudo apt install lubuntu-core lxde fcitx fcitx-googlepinyin
   94  sudo apt install language-pack-gnome-zh-hans
   95  sudo apt install fonts-wqy-zenhei
   96  sudo startlxde
   97  sudo apt-get install synaptic
   98  sudo synaptic
   99  sudo apt install lubuntu-core lxde fcitx fcitx-googlepinyin
  100  apt-get update
  101  sudo -s
  102  sudo startlxde
  103  sudo xfce4-terminal
  104  source/home/forest/.bashrc
  105  cd sct
  106  source/home/forest/.bashrc
  107  cd~
  108  pwd
  109  cd -
  110  conda activate venv_sct
  111  cd~sct
  112  cd sct
  113  conda activate venv_sct
  114  cd -
  115  sudo apt-get install build-essential
  116  sudo apt-get install libgtk2.0-dev libgtk-3-dev libwebkitgtk-dev libwebkitgtk-3.0-dev
  117  sudo apt-get install libjpeg-turbo8-dev libtiff5-dev libsdl1.2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libnotify-dev freeglut3-dev
  118  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  119  conda activate venv_sct
  120  conda config --set channel_priority strict
  121  conda install -y -c conda-forge fsleyes
  122  cd /mnt/c
  123  cd -
  124  sudo xfce4-terminal
  125  sct_testing
  126  #!/bin/bash
  127  $SCT_DIR/batch_processing.sh
  128  echo $0
  129  if uname -a | grep -i darwin > /dev/null 2>&1; then open_cmd="open"; else  open_cmd="xdg-open"; f; exit; d;
  130  echo $0
  131  if uname -a | grep -i darwin > /dev/null 2>&1; then open_cmd="open"; else  open_cmd="xdg-open"; fi
  132  cd ~
  133  sct_download_data -d course_beijing19
  134  cd sct_course-beijing19/single_subject
  135  cd sct
  136  cd sct_course-beijing19/single_subject
  137  pwd
  138  cd -
  139  cd sct_course-beijing19
  140  echo $0
  141  if uname -a | grep -i darwin > /dev/null 2>&1; then open_cmd="open"; else  open_cmd="xdg-open"; fi
  142  cd sct_course-beijing19/single_subject
  143  sct_download_data -d course_beijing19
  144  cd sct_course_beijing19/single_subject
  145  cd sct_course_beijing19
  146  cd sct_data -d course_beijing19
  147  cd sct_course-beijing19/single_subject
  148  cd sct_course_beijing19/single_subject
  149  chmod 775 *.sh
  150  ./batch_single_subject.sh
  151  batch_single_subject.sh
  152  curl -L https://osf.io/bze7v/?action=download -o sct_course_london20.zip
  153  sct
  154  cd sct
  155  sct
  156  cd -
  157  source /home/forest/.bashrc
  158  pwd
  159  cd sct
  160  pwd
  161  ll
  162  sct_version
  163  sct_testing
  164  cd -
  165  ll
  166  unzip -o sct_course_london20.zip
  167  cd sct_course_london20/single_subject
  168  ll
  169  cd batch_single_subject.sh*
  170  chmod 775 *.sh
  171  ./batch_single_subject.sh
  172  cd data/t2
  173  ls
  174  t2.nii.gz
  175  sct_pro
  176  sct_propseg
  177  sct_propseg -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
  178  exit
  179  cd sct_course_london20/single_subject
  180  chmod 775 *.sh
  181  ./batch_single_subject.sh
  182  echo $0
  183  if uname -a | grep -i darwin > /dev/null 2>&1; then open_cmd="open"; else open_cmd="xdg-open"; fi
  184  cd sct_course_london20/single_subject
  185  chmod 775 *.sh
  186  ./batch_single_subject.sh
  187  ls
  188  ll
  189  sct_testing
  190  cd fsleyes
  191  ll
  192  cd sct
  193  ll
  194  cd install/
  195  ll
  196  cd -
  197  cd ~
  198  cd fsleyes
  199  ll
  200  cd conda
  201  cd .conda/
  202  ll
  203  cd -
  204  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  205  conda activate venv_sct
  206  fsleyes
  207  sct_check_dependencies
  208  cd /tmp/runtime-forest
  209  ll
  210  cd sct_course_london20/single_subject
  211  chmod 775 *.sh
  212  ./batch_single_subject.sh
  213  cd data/t2
  214  sct_propseg -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
  215  cd ~
  216  fsleyes
  217  cd fsleyes
  218  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  219  conda activate venv_sct
  220  fsleyes
  221  #rpm -q -a
  222  #rpm-q-a
  223  exit
  224  cd sct
  225  git checkout 4.2.1
  226  yes | ./install_sct
  227  git checkout 4.2.1
  228  yes | ./install_sct
  229  git checkout 4.2.1
  230  yes | ./install_sct
  231  cd ~
  232  rm -rf sct
  233  cd sct
  234  git clone https://github.com/neuropoly/spinalcordtoolbox.git sct
  235  cd sct
  236  git checkout 4.2.1
  237  yes | ./install_sct
  238  cd sct
  239  git checkout 4.2.1
  240  yes | ./install_sct
  241  git checkout 5.2.0
  242  yes | ./install_sct
  243  cd <PATH_TO_SCT_INSTALLATION>
  244  cd sct
  245  cd <PATH_TO_SCT_INSTALLATION>
  246  <PATH_TO_SCT_INSTALLATION>
  247  git checkout 5.2.0
  248  ./install_sct
  249  source .profile
  250  source .bashrc
  251  cd /mnt/c
  252  cd ~
  253  sct_testing
  254  ll
  255  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  256  conda activate venv_sct
  257  cd sct_course_london20/single_subject
  258  chmod 775 *.sh
  259  ./batch_single_subject.sh
  260  cd data/t2
  261  sct_propseg -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
  262  cd data/t2
  263  cd ../t1
  264  sct_propseg -i t1.nii.gz -c t1 -qc ~/qc_singleSubj
  265  cd ~
  266  fsleyes
  267  ll
  268  cd sct
  269  ll
  270  cd ~
  271  ll
  272  FSLeyes
  273  cd fsleyes
  274  exit
  275  sudo apt-get install build-essential
  276  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  277  conda activate venv_sct
  278  conda config --set channel_priority strict
  279  conda install -y -c conda-forge fsleyes
  280  ll
  281  cd ~
  282  fsleyes
  283  cd sct_course_london20/single_subject
  284  chmod 775 *.sh
  285  ./batch_single_subject.sh
  286  cd data/t2
  287  sct_propseg -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
  288  fsleyes /home/forest/sct_course_london20/single_subject/data/t2/t2.nii.gz -cm greyscale /home/forest/sct_course_london20/single_subject/data/t2/t2_seg.nii.gz -cm red -a 100.0 &
  289  exit
  290  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  291  conda activate venv_sct
  292  cd sct_course_london20/single_subject
  293  cd data/t2
  294  sct_propseg -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
  295  fsleyes /home/forest/sct_course_london20/single_subject/data/t2/t2.nii.gz -cm greyscale /home/forest/sct_course_london20/single_subject/data/t2/t2_seg.nii.gz -cm red -a 100.0 &
  296  cd -
  297  cd data/t2
  298  $open_cmd "/Users/julien/qc_singleSubj/index.html"
  299  $open_cmd "/Users/julien/qc_singleSubj/index.html
  300  cd-
  301  cd -
  302  exit
  303  cd sct_course_london20/single_subject
  304  ls
  305  exit
  306  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  307  conda activate venv_sct
  308  cd sct_course_london20/single_subject
  309  cd ../t1
  310  ll
  311  cd data
  312  ll
  313  cd t1
  314  sct_propseg -i t1.nii.gz -c t1 -qc ~/qc_singleSubj
  315  fsleyes /home/forest/sct_course_london20/single_subject/data/t1/t1.nii.gz -cm greyscale /home/forest/sct_course_london20/single_subject/data/t1/t1_seg.nii.gz -cm red -a 100.0 &
  316  cd -
  317  cd t2
  318  sct_propseg -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
  319  cd ~
  320  sudo synaptic
  321  $open_cmd "/Users/chang/qc_singleSubj/index.html"
  322  $open_cmd "/Users/chang/AppData/Local/Packages/CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc/LocalState/rootfs/home/forest/qc_singleSubj
  323  exit
  324  ssssssssss
  325  ll
  326  cd sct_course_london20
  327  ll
  328  cd single_subject
  329  ll
  330  cd t1
  331  ll
  332  cd data
  333  cd t1
  334  sct-warp-template
  335  sct_warp_template
  336  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  337  conda activate venv_sct
  338  cd sct_course_london20/single_subject
  339  cd t1
  340  ll
  341  cd data
  342  cd t1
  343  sct_deepseg_sc -i t1.nii.gz -c t1 -ofolder deepseg -qc ~/qc_singleSubj
  344  cd ../t2
  345  ls
  346  sct_label_vertebrae -i t2.nii.gz -s t2_seg.nii.gz -c t2 -qc ~/qc_singleSubj
  347  sct_label_utils -i t2_seg_labeled.nii.gz -vert-body 3,9 -o t2_labels_vert.nii.gz
  348  fsleyes t2_seg_labeled.nii.gz t2_labels_vert.nii.gz &
  349  D
  350  fsleyes /home/forest/sct_course_london20/single_subject/data/t2/t2.nii.gz -a 100.0 t2_seg_labeled.nii.gz -cm subcortical -a 50.0 &
  351  DD\
  352  sct_register_to_template -i t2.nii.gz -s t2_seg.nii.gz -l t2_labels_vert.nii.gz -c t2 -qc ~/qc_singleSubj
  353  fsleyes t2.nii.gz template2anat.nii.gz &
  354  fsleyes /home/forest/sct/data/PAM50/template/PAM50_t2.nii.gz anat2template.nii.gz &
  355  ls -la
  356  sct_warp_template -d t2.nii.gz -w warp_template2anat.nii.gz -a 0 -qc ~/qc_singleSubj
  357  fsleyes t2.nii.gz -cm greyscale -a 100.0 label/template/PAM50_t2.nii.gz -cm greyscale -dr 0 4000 -a 100.0 label/template/PAM50_gm.nii.gz -cm red-yellow -dr 0.4 1 -a 50.0 label/template/PAM50_wm.nii.gz -cm blue-lightblue -dr 0.4 1 -a 50.0 &
  358  sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -o csa_c3c4.csv
  359  xdg-open /home/forest/sct_course_london20/single_subject/data/t2/csa_c3c4.csv
  360  exit
  361  C:\Users\chang\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs\home\forest\sct_course_london20\single_subject\batch_single_subject.sh
  362  cat batch_single_subject
  363  cd sct
  364  ll
  365  cd ~
  366  C:\Users\chang\Desktop\batch_single_subject.sh
  367  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  368  conda activate venv_sct
  369  ll
  370  cd sct_course_london20
  371  ll
  372  cd single_subject
  373  cd data
  374  cd t2
  375  sct_process_segmentation -i t2_seg.nii.gz -vert 3:4 -o csa_c3c4.csv
  376  cd ../mt
  377  ll
  378  sct_deepseg_sc -i mt1.nii.gz -c t2 -qc ~/qc_singleSubj
  379  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  380  conda activate venv_sct
  381  ll
  382  cd sct_course_london20
  383  ll
  384  cd single_subject
  385  ll
  386  cd data
  387  ll
  388  cd mt
  389  sct_deepseg_sc -i mt1.nii.gz -c t2 -qc ~/qc_singleSubj
  390  cd ~
  391  fsleyes
  392  ll
  393  cd sct_course_london20
  394  ll
  395  cd  single_subject
  396  cd data
  397  cd mt
  398  sct_deepseg_sc -i mt1.nii.gz -c t2 -qc ~/qc_singleSubj
  399  cd ../t2s
  400  sct_deepseg_sc -i t2s.nii.gz -c t2s -qc ~/qc_singleSubj
  401  cd -
  402  pwd
  403  cd ~
  404  cd sct_course_london20
  405  cd single_subject
  406  cd data
  407  cd t2
  408  sct_propseg -i t2.nii.gz -c t2 -qc ~/qc_singleSubj
  409  cd ~
  410  pip3 install h5py==2.10.0
  411  cd sct_course_london20
  412  cd single_subject
  413  cd data
  414  cd mt
  415  sct_deepseg_sc -i mt1.nii.gz -c t2 -qc ~/qc_singleSubj
  416  sct_create_mask -i mt1.nii.gz -p centerline,mt1_seg.nii.gz -size 35mm -f cylinder -o mask_mt1.nii.gz
  417  fsleyes /home/forest/sct_course_london20/single_subject/data/mt/mt1.nii.gz -cm greyscale /home/forest/sct_course_london20/single_subject/data/mt/mask_mt1.nii.gz -cm red -a 50.0 &
  418  d
  419  sct_register_multimodal -i mt0.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param step=1,type=im,algo=slicereg,metric=CC -m mask_mt1.nii.gz -x spline -qc ~/qc_singleSubj
  420  fsleyes mt1.nii.gz mt0_reg.nii.gz &
  421  sct_compute_mtr -mt0 mt0_reg.nii.gz -mt1 mt1.nii.gz
  422  fsleyes mt0_reg.nii.gz mt1.nii.gz ./mtr.nii.gz &
  423  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t2.nii.gz -iseg $SCT_DIR/data/PAM50/template/PAM50_cord.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m mask_mt1.nii.gz -initwarp ../t2/warp_template2anat.nii.gz -qc ~/qc_singleSubj
  424  fsleyes dest_seg_RPI.nii src_seg_reg.nii &
  425  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t2.nii.gz -iseg $SCT_DIR/data/PAM50/template/PAM50_cord.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m mask_mt1.nii.gz -initwarp ../t2/warp_template2anat.nii.gz -qc ~/qc_singleSubj
  426  cd ../t2s
  427  sct_deepseg_sc -i t2s.nii.gz -c t2s -qc ~/qc_singleSubj
  428  sct_deepseg_gm -i t2s.nii.gz -qc ~/qc_singleSubj
  429  sct_maths -i t2s_seg.nii.gz -sub t2s_gmseg.nii.gz -o t2s_wmseg.nii.gz
  430  fsleyes t2s_wmseg.nii.gz &
  431  sct_register_multimodal -i ${SCT_DIR}/data/PAM50/template/PAM50_t2s.nii.gz -iseg ${SCT_DIR}/
  432  data/PAM50/template/PAM50_wm.nii.gz -d t2s.nii.gz -dseg t2s_wmseg.nii.gz -param
  433  step=1,type=seg,algo=rigid:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -initwarp ../t2/
  434  warp_template2anat.nii.gz -initwarpinv ../t2/warp_anat2template.nii.gz -qc ~/qc_singleSubj
  435  sct_register_multimodal -i ${SCT_DIR}/data/PAM50/template/PAM50_t2s.nii.gz -iseg ${SCT_DIR}/data/PAM50/template/PAM50_wm.nii.gz -d t2s.nii.gz -dseg t2s_wmseg.nii.gz -param step=1,type=seg,algo=rigid:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -initwarp ../t2/warp_template2anat.nii.gz -initwarpinv ../t2/warp_anat2template.nii.gz -qc ~/qc_singleSubj
  436  mv warp_PAM50_t2s2t2s.nii.gz warp_template2t2s.nii.gz
  437  mv warp_t2s2PAM50_t2s.nii.gz warp_t2s2template.nii.gz
  438  sct_warp_template -d t2s.nii.gz -w warp_template2t2s.nii.gz -qc ~/qc_singleSubj
  439  fsleyes t2s.nii.gz -cm greyscale -a 100.0 label/template/PAM50_t2.nii.gz -cm greyscale -dr 0 4000 -a 100.0 label/template/PAM50_gm.nii.gz -cm red-yellow -dr 0.4 1 -a 50.0 label/template/PAM50_wm.nii.gz -cm blue-lightblue -dr 0.4 1 -a 50.0 &
  440  sct_process_segmentation -i t2s_gmseg.nii.gz -o csa_gm.csv -angle-corr 0
  441  sct_process_segmentation -i t2s_wmseg.nii.gz -o csa_wm.csv -angle-corr 0
  442  cd ../mt
  443  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t2.nii.gz -iseg $SCT_DIR/data/
  444  PAM50/template/PAM50_cord.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param
  445  step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m
  446  mask_mt1.nii.gz -initwarp ../t2s/warp_template2t2s.nii.gzsct_warp_template -d t2s.nii.gz -w
  447  warp_template2t2s.nii.gz -qc ~/qc_singleSubj
  448  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t2.nii.gz -iseg $SCT_DIR/data/PAM50/template/PAM50_cord.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m mask_mt1.nii.gz -initwarp ../t2s/warp_template2t2s.nii.gz
  449  cd ../dmri
  450  sct_maths -i dmri.nii.gz -mean t -o dmri_mean.nii.gz
  451  sct_propseg -i dmri_mean.nii.gz -c dwi -qc ~/qc_singleSubj
  452  sct_create_mask -i dmri_mean.nii.gz -p centerline,dmri_mean_seg.nii.gz -size 35mm
  453  sct_crop_image -i dmri.nii.gz -m mask_dmri_mean.nii.gz -o dmri_crop.nii.gz
  454  fsleyes dmri.nii.gz dmri_crop.nii.gz &
  455  sct_dmri_moco -i dmri_crop.nii.gz -bvec bvecs.txt
  456  fsleyes dmri_crop_moco.nii.gz dmri_crop.nii.gz &
  457  sct_propseg -i dmri_crop_moco_dwi_mean.nii.gz -c dwi -qc ~/qc_singleSubj
  458  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t1.nii.gz -iseg $SCT_DIR/data/PAM50/template/PAM50_cord.nii.gz -d dmri_crop_moco_dwi_mean.nii.gz -dseg dmri_crop_moco_dwi_mean_seg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -initwarp ../t2s/warp_template2t2s.nii.gz -initwarpinv ../t2s/warp_t2s2template.nii.gz -qc ~/qc_singleSubj
  459  mv warp_PAM50_t12dmri_crop_moco_dwi_mean.nii.gz warp_template2dmri.nii.gz
  460  mv warp_dmri_crop_moco_dwi_mean2PAM50_t1.nii.gz warp_dmri2template.nii.gz
  461  sct_warp_template -d dmri_crop_moco_dwi_mean.nii.gz -w warp_template2dmri.nii.gz
  462  sct_warp_template -d dmri_crop_moco_dwi_mean.nii.gz -w warp_template2dmri.nii.gz -qc ~/qc_singleSubj
  463  sct_dmri_compute_dti -i dmri_crop_moco.nii.gz -bval bvals.txt -bvec bvecs.txt
  464  sct_dmri_compute_dti
  465  sct_extract_metric -i dti_FA.nii.gz -vert 2:5 -perlevel 1 -method map -l 51 -o fa_in_wm.csv
  466  cd ..
  467  cd ~
  468  fsleyes
  469  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  470  conda activate venv_sct
  471  fsleyes
  472  ll
  473  cd sct_course_london20
  474  ll
  475  cd single_subject
  476  cd data
  477  cd dmri
  478  ll
  479  sct_extract_metric -i dti_FA.nii.gz -method map -l 51 -o mtr_in_wm.csv
  480  sct_extract_metric -i dti_FA.nii.gz -method map -l 4,5 -z 5:15 -o fa_in_cst.csv
  481  sct_extract_metric -i dti_fa.nii.gz -method map -l 4,5 -z 5:15 -o fa_in_cst.csv
  482  sct_extract_metric -i dti_FA.nii.gz -method map -l 51 -o dti_in_wm.csv
  483  sct_extract_metric -i dti_FA.nii.gz -method map -l 4,5 -z 5:15 -o dti_in_cst.csv
  484  sct_extract_metric -i dti_FA.nii.gz -method map -l 51 -o fa_in_wm.csv
  485  sct_extract_metric -i dti_FA.nii.gz -method map -l 4,5 -z 5:15 -o fa_in_cst.csv
  486  sct_extract_metric -i dti_FA.nii.gz -method map -l 4,5 -z 0:9 -o fa_in_cst.csv
  487  sct_extract_metric -i dti_FA.nii.gz -method map -l 4,5 -o fa_in_cst.csv
  488  sct_extract_metric -i dti_FA.nii.gz -method map -l 4,5 -z 0:8 -o fa_in_cst.csv
  489  sct_extract_metric -i dti_FA.nii.gz -method map -l 4,5 -z 0:9 -o fa_in_cst.csv
  490  ll
  491  cd sct_course_london20
  492  ll
  493  cd single_subject
  494  cd data
  495  cd mt
  496  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t2.nii.gz -iseg $SCT_DIR/data/PAM50/template/
  497  PAM50_cord.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param
  498  step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m mask_mt1.nii.gz -initwarp ../t2/
  499  warp_template2anat.nii.gz -qc ~/qc_singleSubj
  500  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t2.nii.gz -iseg $SCT_DIR/data/PAM50/template/PAM50_cord.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m mask_mt1.nii.gz -initwarp ../t2/warp_template2anat.nii.gz -qc ~/qc_singleSubj
  501  source ${SCT_DIR}/python/etc/profile.d/conda.sh
  502  conda activate venv_sct
  503  ll
  504  cd sct_course_london20
  505  ll
  506  cd single_subject
  507  cd data
  508  cd mt
  509  sct_register_multimodal -i $SCT_DIR/data/PAM50/template/PAM50_t2.nii.gz -iseg $SCT_DIR/data/PAM50/template/PAM50_cord.nii.gz -d mt1.nii.gz -dseg mt1_seg.nii.gz -param step=1,type=seg,algo=centermass:step=2,type=seg,algo=bsplinesyn,slicewise=1,iter=3 -m mask_mt1.nii.gz -initwarp ../t2s/warp_template2t2s.nii.gz
  510  sct_extract_metric -i mtr.nii.gz -method map -l 51 -o mtr_in_wm.csv
  511  cd ../dmri
  512  sct_maths -i dmri.nii.gz -mean t -o dmri_mean.nii.gz
  513  sct_propseg -i dmri_mean.nii.gz -c dwi -qc ~/qc_singleSubj
  514  cd ../mt
  515  sct_extract_metric -i mtr.nii.gz -method map -l 51 -o mtr_in_wm.csv
  516  cd ../dmri
  517  sct_extract_metric -i dti_FA.nii.gz -vert 2:5 -perlevel 1 -method map -l 4,5 -o fa_in_wm.csv
  518  sct_extract_metric -i dti_FA.nii.gz -vert 2:5 -perlevel 1 -method map -l 4,5 -o fa_in_cst.csv
  519  cd ~
  520  fsleyes
  521  ll
  522  cd sct_course_london20
  523  ll

This includes all the actions before the error

Thanks so much! I’m going to look into it and get back to everyone.

Hi again @chang, I’ve been working but haven’t yet figured out what caused the the crash. Here’s my attempt: https://showterm.io/c82a348d19d20ecd23e88

Your environment is different than mine. Our WSL support is still new and shaky and we don’t test very widely. We’ve never tested on Debian-on-WSL and especially not on Debian-sid-on-WSL, which you seem to be running.

If you are able to provide some more details it would help us improve. Would you please be able to show me:

  • cmd.exe /c ver
  • wsl.exe -l -v
  • cat /proc/version
  • uname -a
  • cat /etc/os-release
  • cat /etc/apt/sources.list
  • cat /etc/apt/sources.list.20210305
  • apt list --installed

I am also curious what you meant by changed the permissions. Do you still have those commands in your history? Were they unix permissions or Windows permissions? Can you describe how you changed them? Do you remember what the permissions were before the change?

I don’t see any chmods or linmin.nii.gz lines in your history so I am just guessing a bit. If you could fill in the details it would help me track this down.

Thanks. Have a good week.

Hi nguenthe
Thank you for your concern!

forest@DESKTOP-DM8SQ21:~$ cmd.exe /c ver
'\\wsl$\Ubuntu-18.04\home\forest'

Microsoft Windows [ 10.0.19041.867]
forest@DESKTOP-DM8SQ21:~$ wsl.exe -l -v
  NAME            STATE           VERSION
* Ubuntu-18.04    Running         1
forest@DESKTOP-DM8SQ21:~$ cat /proc/version
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020
forest@DESKTOP-DM8SQ21:~$ uname -a
Linux DESKTOP-DM8SQ21 4.4.0-19041-Microsoft #488-Microsoft Mon Sep 01 13:43:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux
forest@DESKTOP-DM8SQ21:~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
forest@DESKTOP-DM8SQ21:~$ cat /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic universe
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates universe
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic-security universe
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security universe
deb http://mirrors.aliyun.com/ubuntu/ bionic-security multiverse
# deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security multiverse
forest@DESKTOP-DM8SQ21:~$ cat /etc/apt/sources.list.20210305
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://archive.ubuntu.com/ubuntu/ bionic universe
deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse

I’m running Linux on a Windows system.
I found the Linux system folder where the files were stored, and then copied the image files I wanted to work with from the Windows folder into it. Then I use SCT to process these files. But the above error will occur. Finally, I run the code in the terminal.

chmod 754 [filename]

and changed the permissions.

Thanks. Have a good week.