Fatal Signal 11 (SIGSEGV) received -3dDeconvolve afni2012

HI Afni gurus!

I am getting a Signal 11 (SIGSEGV) error when trying to run 3dDeconvolve (on only some of my subjects).

Here is my script with 3dDecon command.

for i in {1004…1004} #{1007…1008} {1012…1012} {1014…1014} {1023…1023} {1026…1028} # {1023…1023}
do

value=$(<…/${i}/GLM_BASIC/scans.txt)
set $value

/home/bradley/bin/qexec2.R -q bigmem_16.q --mem=16G
3dDeconvolve -force_TR 1.77
-local_times
-input …/${i}/GLM_BASIC/$1 …/${i}/GLM_BASIC/$2 …/${i}/GLM_BASIC/$3 …/${i}/GLM_BASIC/$4 …/${i}/GLM_BASIC/$5 …/${i}/GLM_BASIC/$6
-xout -num_stimts 23
-GOFORIT
-polort 5
-stim_times_IM 1 ${i}_study_scene_prev_correct.1D ‘GAM’ -stim_label 1 StudCor
-stim_times_IM 2 ${i}_study_scene_prev_incorrect.1D ‘GAM’ -stim_label 2 StudIncor
-stim_times_IM 3 ${i}_study_scene_prev_not_tested.1D ‘GAM’ -stim_label 3 Stud_nottested
-stim_times_IM 4 ${i}_test_scene_delay_correct.1D ‘GAM’ -stim_label 4 delayCor
-stim_times_IM 5 ${i}_test_scene_delay_incorrect.1D ‘GAM’ -stim_label 5 delayIncor
-stim_times_IM 6 ${i}_test_scene_face_correct.1D ‘GAM’ -stim_label 6 faceCor
-stim_times_IM 7 ${i}_test_scene_face_incorrect.1D ‘GAM’ -stim_label 7 faceIncor
-stim_times_IM 8 ${i}_test_scene_prev_correct.1D ‘GAM’ -stim_label 8 prevCor
-stim_times_IM 9 ${i}_test_scene_prev_incorrect.1D ‘GAM’ -stim_label 9 prevIncor
-stim_times_IM 10 ${i}_study_scene_prev_NoGuess.1D ‘GAM’ -stim_label 10 StudGuess
-stim_times_IM 11 ${i}_study_scene_prev_no_response.1D ‘GAM’ -stim_label 11 StudnoR
-stim_times_IM 12 ${i}_test_scene_delay_NoGuess.1D ‘GAM’ -stim_label 12 delayGuess
-stim_times_IM 13 ${i}_test_scene_delay_no_response.1D ‘GAM’ -stim_label 13 delaynoR
-stim_times_IM 14 ${i}_test_scene_face_NoGuess.1D ‘GAM’ -stim_label 14 faceGuess
-stim_times_IM 15 ${i}_test_scene_face_no_response.1D ‘GAM’ -stim_label 15 facenoR
-stim_times_IM 16 ${i}_test_scene_prev_NoGuess.1D ‘GAM’ -stim_label 16 prevGuess
-stim_times_IM 17 ${i}_test_scene_prev_no_response.1D ‘GAM’ -stim_label 17 prevnoR
-stim_file 18 …/${i}/epi/MotionFile_allruns.1D’[0]’ -stim_base 18 -stim_label 18 roll
-stim_file 19 …/${i}/epi/MotionFile_allruns.1D’[1]’ -stim_base 19 -stim_label 19 pitch
-stim_file 20 …/${i}/epi/MotionFile_allruns.1D’[2]’ -stim_base 20 -stim_label 20 yaw
-stim_file 21 …/${i}/epi/MotionFile_allruns.1D’[3]’ -stim_base 21 -stim_label 21 dS
-stim_file 22 …/${i}/epi/MotionFile_allruns.1D’[4]’ -stim_base 22 -stim_label 22 dL
-stim_file 23 …/${i}/epi/MotionFile_allruns.1D’[5]’ -stim_base 23 -stim_label 23 dP
-x1D ${i}.xmat.1D -xjpeg ${i}.jpg
-fout -tout -bucket ${i}_bc_stats4FC_syn -cbucket ${i}.cstats
done

And here is the output (more P_1396_0319163057487458.cmd.e961578):

++ ‘-stim_times_IM 1 1004_study_scene_prev_correct.1D’ will have 42 regressors
++ ‘-stim_times_IM 2 1004_study_scene_prev_incorrect.1D’ will have 16 regressors
++ ‘-stim_times_IM 3 1004_study_scene_prev_not_tested.1D’ will have 192 regressors
++ ‘-stim_times_IM 4 1004_test_scene_delay_correct.1D’ will have 42 regressors
++ ‘-stim_times_IM 5 1004_test_scene_delay_incorrect.1D’ will have 16 regressors
++ ‘-stim_times_IM 6 1004_test_scene_face_correct.1D’ will have 42 regressors
++ ‘-stim_times_IM 7 1004_test_scene_face_incorrect.1D’ will have 16 regressors
++ ‘-stim_times_IM 8 1004_test_scene_prev_correct.1D’ will have 42 regressors
++ ‘-stim_times_IM 9 1004_test_scene_prev_incorrect.1D’ will have 16 regressors
++ ‘-stim_times_IM 10 1004_study_scene_prev_NoGuess.1D’ will have 37 regressors
*+ WARNING: ‘-stim_times_IM 11’ didn’t read any good times from file ‘1004_study_scene_prev_no_response.1D’
++ ‘-stim_times_IM 11 1004_study_scene_prev_no_response.1D’ will have 0 regressors
++ ‘-stim_times_IM 12 1004_test_scene_delay_NoGuess.1D’ will have 37 regressors
*+ WARNING: ‘-stim_times_IM 13’ didn’t read any good times from file ‘1004_test_scene_delay_no_response.1D’
++ ‘-stim_times_IM 13 1004_test_scene_delay_no_response.1D’ will have 0 regressors
++ ‘-stim_times_IM 14 1004_test_scene_face_NoGuess.1D’ will have 37 regressors
*+ WARNING: ‘-stim_times_IM 15’ didn’t read any good times from file ‘1004_test_scene_face_no_response.1D’
++ ‘-stim_times_IM 15 1004_test_scene_face_no_response.1D’ will have 0 regressors
++ ‘-stim_times_IM 16 1004_test_scene_prev_NoGuess.1D’ will have 37 regressors
*+ WARNING: ‘-stim_times_IM 17’ didn’t read any good times from file ‘1004_test_scene_prev_no_response.1D’
++ ‘-stim_times_IM 17 1004_test_scene_prev_no_response.1D’ will have 0 regressors
++ 3dDeconvolve: AFNI version=AFNI_2011_12_21_1014 (Aug 31 2012) [64-bit]
++ Authored by: B. Douglas Ward, et al.
++ current memory malloc-ated = 455,053 bytes (about 455 thousand)
++ loading dataset …/1004/GLM_BASIC/…/epi/rscan01.nii …/1004/GLM_BASIC/…/epi/rscan02.nii …/1004/GLM_BASIC/…/epi/rscan03.nii …/1004/GLM_BASIC/…/epi/rscan04.nii …/1004/GLM_BASIC/…/epi
/rscan05.nii …/1004/GLM_BASIC/…/epi/rscan06.nii
++ current memory malloc-ated = 515,197 bytes (about 515 thousand)
++ forcibly using TR=1.7700 seconds for -input dataset
++ Auto-catenated input datasets treated as multiple imaging runs
++ Auto-catenated datasets start at: 0 346 692 1038 1384 1730
++ STAT automask has 183823 voxels (out of 762300 = 24.1%)
++ Skipping check for initial transients
++ Input polort=5; Longest run=612.4 s; Recommended minimum polort=5 ++ OK ++
++ -stim_times using TR=1.77 s for stimulus timing conversion
++ -stim_times using TR=1.77 s for any -iresp output datasets
++ [you can alter the -iresp TR via the -TR_times option]
++ -stim_times_IM 1 using LOCAL times
++ -stim_times_IM 2 using LOCAL times
++ -stim_times_IM 3 using LOCAL times
++ -stim_times_IM 4 using LOCAL times
++ -stim_times_IM 5 using LOCAL times
++ -stim_times_IM 6 using LOCAL times
++ -stim_times_IM 7 using LOCAL times
++ -stim_times_IM 8 using LOCAL times
++ -stim_times_IM 9 using LOCAL times
++ -stim_times_IM 10 using LOCAL times
+ WARNING: -stim_times_IM 11 has all times equal to '’ ?!?!
++ -stim_times_IM 11 using LOCAL times
*+ WARNING: !! ‘-stim_times_IM 11’ file ‘1004_study_scene_prev_no_response.1D’ has no good stimulus time values
++ -stim_times_IM 12 using LOCAL times
+ WARNING: -stim_times_IM 13 has all times equal to '’ ?!?!
++ -stim_times_IM 13 using LOCAL times
*+ WARNING: !! ‘-stim_times_IM 13’ file ‘1004_test_scene_delay_no_response.1D’ has no good stimulus time values
++ -stim_times_IM 14 using LOCAL times
+ WARNING: -stim_times_IM 15 has all times equal to '’ ?!?!
++ -stim_times_IM 15 using LOCAL times
*+ WARNING: !! ‘-stim_times_IM 15’ file ‘1004_test_scene_face_no_response.1D’ has no good stimulus time values
++ -stim_times_IM 16 using LOCAL times
+ WARNING: -stim_times_IM 17 has all times equal to '’ ?!?!
++ -stim_times_IM 17 using LOCAL times
*+ WARNING: !! ‘-stim_times_IM 17’ file ‘1004_test_scene_prev_no_response.1D’ has no good stimulus time values
++ Number of time points: 2076 (no censoring)

  • Number of parameters: 614 [42 baseline ; 572 signal]
    ++ Memory required for output bricks = 3,799,303,200 bytes (about 3.8 billion)

Fatal Signal 11 (SIGSEGV) received
Last STATUS: extract xgood matrix
init_indep_var_matrix
calculate_results
3dDeconvolve main
Bottom of Debug Stack
** AFNI version = AFNI_2011_12_21_1014 Compile date = Aug 31 2012
** [[Precompiled binary linux_openmp_64: Aug 31 2012]]
** Program Abort **
** 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.
*** MCW_malloc post-corruption! serial=853005 size=10197312 source=matrix.c line#225
← init_indep_var_matrix ← calculate_results ← 3dDeconvolve main
[[ Called from source=debugtrace.h line#148 ]]

Seeing as it’s the same thing but an error for only some subjects I don’t really know where to start. Any help you can offer would be much appreciated.

Thank you very much!
Kirk

First, you are running a SERIOUSLY outdated version of AFNI. You should update and try again.

Second, you are running a lot of stimuli with no valid times, which will lead to problems in defining the regression matrix. Without seeing your data and input files, I’m not sure what could be happening. There could be a bug in the way 3dDeconvolve handles -stim_times_IM files when there is no information to process for some stimuli (numbers 11, 13, 15, and 17). But try it with a newer AFNI version first, please.

Hi

Thank you so much for your reply.

I was able to update AFNI but I still receive the same error.

It would make sense that the program has issues with modelling stimuli lists that are empty. However I’m not sure what to do about this.

My goal is to model “correct” and “incorrect” trials. However the reason I am including these other trial types (ex. NoResponse trials for StimTimesIM 11,13,15,17) is because I don’t want these trials to be included in the baseline. Does that make sense to you or is there another way I should have done this?

Would you recommend I attempt to fix this problem by removing the lines that run stimuli types of 0 length? Do you think I will still have issues with stimuli types of very few trials or is it only when there are 0?

Thanks for any helps and tips you can offer.

All the best,
Kirk