3dREMLfit from 3dDeconvolve: Fatal Signal 6 (SIGABRT) received

Dear AFNI experts,

I try to run 3dDeconvolve with TWOGAMpw function for my subjects. For 5 out of 75 it is not working. I was looking on Message Board for help, and I found similar error, but for different function here . Over there the problem was related with affine alignment, so the solution does not apply to me. Could you please help me fix this? The error is:

3dREMLfit -matrix X.xmat.1D
-input “/home/z820/Desktop/Ruben/Studies/RIR/repeated_analysis/derivatives/sub-67/func/sub-67_task-scenarios_run-1_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz /home/z820/Desktop/Ruben/Studies/RIR/repeated_analysis/derivatives/sub-67/func/sub-67_task-scenarios_run-2_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz /home/z820/Desktop/Ruben/Studies/RIR/repeated_analysis/derivatives/sub-67/func/sub-67_task-scenarios_run-3_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz /home/z820/Desktop/Ruben/Studies/RIR/repeated_analysis/derivatives/sub-67/func/sub-67_task-scenarios_run-4_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz /home/z820/Desktop/Ruben/Studies/RIR/repeated_analysis/derivatives/sub-67/func/sub-67_task-scenarios_run-5_space-MNI152NLin6Asym_res-2_desc-preproc_bold.nii.gz”
-mask /home/z820/Desktop/Ruben/Studies/RIR/repeated_analysis/derivatives/sub-67/func/brain_mask_output_mean/sub-67_across_runs_mask.nii.gz
-fout -tout -Rbuck stats_sub-67_task-scenarios_REML -Rvar stats_sub-67_task-scenarios_REMLvar
-Rfitts fitts_sub-67_task-scenarios_REML -Rerrts errts_sub-67_task-scenarios_REML -verb

++ N.B.: 3dREMLfit command above written to file stats_sub-67_task-scenarios.REML_cmd
++ (b) Visualization/analysis of the matrix via ExamineXmat.R
++ (c) Synthesis of sub-model datasets using 3dSynthesize
++ ==========================================================
++ Wrote matrix values to file X.nocensor.xmat.1D
realloc(): invalid next size

Fatal Signal 6 (SIGABRT) received
calculate_results
3dDeconvolve main
Bottom of Debug Stack
** AFNI version = AFNI_21.0.16 Compile date = Mar 10 2021
** [[Precompiled binary linux_ubuntu_16_64: Mar 10 2021]]
** 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.
malloc(): invalid size (unsorted)

Thanks in advance for your help!
r.

The SIGABRT signal to abort the program is sent (in this case) from the memory manager. It can indicate that too much memory is being asked for by the program, or (more likely) that the program has run amok and destroyed the data structure that supports the memory manager.

This kind of error is hard to find, and impossible without being able to reproduce the problem. To go any further, we’d need a copy of all the data that you used to run 3dDeconvolve with, and the exact command line, so we can try to duplicate the problem and then figure out what the heck is happening. And then maybe fix it.

Thank you for your answer.
I did solve the problem by running the analysis on macOS Big Sur 11.3 (where this installation suggestion was very helpful, thanks for it!).

Do you think it worth to prepare and send you those data for further investigation? I did encounter this problem before, and at that time the solution was to remove one run for that subject (since I had 5 runs for each subject in this data set). I (or maybe other AFNI users) may encounter this problem later too, when I will do some analysis on this server on which I got the error [OS debian 10.8(x86-64), Linux Kernel 4.19.0-9-amd64].