shnizzedy / brainlife-C-PAC

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

🐛 Bad header info: Cannot open volume for reading #2

Closed shnizzedy closed 3 years ago

shnizzedy commented 4 years ago

Describe the bug

split_zstat_volumes

RuntimeError: Command:
fslsplit /tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map_z.nii.gz temp_reg_map_z_ -t
Standard output:

Standard error:
** ERROR (nifti_image_read): short header read '/tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map_z.nii.gz'
** ERROR: nifti_image_open(/tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map_z): bad header info
ERROR: failed to open file /tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map_z
Cannot open volume /tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map_z for reading!
Return code: 1

split_raw_volumes

RuntimeError: Command:
fslsplit /tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map.nii.gz temp_reg_map_ -t
Standard output:

Standard error:
** ERROR: nifti_convert_nhdr2nim: bad dim[0]
** ERROR (nifti_image_read): cannot create nifti image from header '/tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map.nii.gz'
** ERROR: nifti_image_open(/tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map): bad header info
ERROR: failed to open file /tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map
Cannot open volume /tmp/resting_preproc_sub-A00013809_ses-DS2/temporal_regression_sca_0/_scan_rest/_selector_CSF-2mmE-M_aC-CSF+WM-2mm-DPC5_G-M_M-SDB_P-2_BP-B0.01-T0.1/_mask_CC200_mask_file_..cpac_templates..CC200.nii.gz/temporal_regression/temp_reg_map for reading!
Return code: 1

Expected behavior

Screenshots

Quite a few iterations of these two crashfiles are generated before the process times out:

all crashfiles

Brainlife process popover screenshot

Versions

Additional context

This run was with this repository @ 4c5237d, which

  1. hardlinks instead of symlinks https://github.com/shnizzedy/brainlife-C-PAC/blob/4c5237d5fab7f0da07d5a91ef72ee9ae1d231637/bl2bids#L46
  2. looks potentially less far up the filetree https://github.com/shnizzedy/brainlife-C-PAC/blob/4c5237d5fab7f0da07d5a91ef72ee9ae1d231637/bl2bids#L120-L121 which (running C-PAC @ feature/allow-symlinks-in-BIDS-dir) seems to help with #1, but raises this issue

The volumes it complains about look like this: