Hi Gurus,
I discovered while trying to visualize the phase of the FFT of our EPI data that setting a 3D+time RGB dataset as an overlay in the AFNI viewer causes memory corruption. The number of errors reported (which may or may not correlate with the actual amount of memory affected) each time the graph window is opened or closed seems to increase linearly with the total number of RGB subbricks that have been overlaid since the viewer was opened. This is a problem because I would like to be able to examine each subject's data in turn, looking at the task frequency and its harmonics in each case.
I think this is close to a minimal example:
$ 3dThreetoRGB -scale 255 -prefix temp \
> ~/abin/MNI_avg152T1+tlrc ~/abin/MNI_avg152T2+tlrc ~/abin/MNI_EPI+tlrc
++ output dataset: ./temp+tlrc.BRIK
$ 3dTcat -prefix temp2 temp+tlrc temp+tlrc
++ 3dTcat: AFNI version=AFNI_2011_12_21_1014 (Jul 3 2014) [64-bit]
*+ WARNING: Set TR of output dataset to 1.0 s
$ afni temp2+tlrc.HEAD
Thanks go to JA Frost for caloric input
Initializing: X11.. Widgets...... Input files:
session # 1 = fromCLI ==> 1 dataset
dataset count = 1
Time series = 0 files read
NLfit & NLerr= Optimizer (AFNI_NLFIM_METHOD) is SIMPLEX
NLfit & NLerr= Found 27 models
Plugins = 52 libraries read
write compress= GZIP
++ AFNI is detached from terminal.
$
++ NOTE: This version of AFNI was built Jul 3 2014 ++
++ NOTE: 'Define Markers' is hidden: right-click 'DataDir' to see it
[click 'OverLay']
[click 'Set']
[click 'Graph']
*** MCW_malloc post-corruption! serial=109748 size=2707887 source=thd_loaddblk.c line#871
<- THD_alloc_datablock <- THD_load_datablock <- AFNI_range_setter <- AFNI_view_xyz_CB <- AFNI_startup_layout_CB
[[ Called from source=afni.c line#6641 ]]
[close graph]
*** MCW_malloc post-corruption! serial=109748 size=2707887 source=thd_loaddblk.c line#871
<- THD_alloc_datablock <- THD_load_datablock <- AFNI_range_setter <- AFNI_view_xyz_CB <- AFNI_startup_layout_CB
[[ Called from source=afni.c line#4832 ]]
This is the stack trace that I get if the RGB dataset is the default overlay; if I have to change to it from another dataset, I get this stack trace instead:
*** MCW_malloc post-corruption! serial=114417 size=2707887 source=thd_loaddblk.c line#871
<- THD_alloc_datablock <- THD_load_datablock <- AFNI_set_viewpoint <- AFNI_initialize_view <- AFNI_finalize_dataset_CB
[[ Called from source=afni.c line#6641 ]]
*** MCW_malloc post-corruption! serial=114417 size=2707887 source=thd_loaddblk.c line#871
<- THD_alloc_datablock <- THD_load_datablock <- AFNI_set_viewpoint <- AFNI_initialize_view <- AFNI_finalize_dataset_CB
[[ Called from source=afni.c line#4832 ]]
If you choose to chase this one, happy hunting!
Isaac