Fmriprep error: file NULL does not exist only during SyN registration

I was running fmriprep on Docker and ran into a critical error during the second level of stage 2 (SyN) registration

*** Running SyN registration (varianceForUpdateField = 3.0000e+00, varianceForTotalField = 0.0000e+00) ***

XXDIAGNOSTIC,Iteration,metricValue,convergenceValue,ITERATION_TIME_INDEX,SINCE_LAST
 1DIAGNOSTIC,     1, -5.742062330246e-01, inf, 1.4745e+01, 1.4745e+01, 
 1DIAGNOSTIC,     2, -5.980803370476e-01, inf, 2.4077e+01, 9.3316e+00, 
...
 1DIAGNOSTIC,    49, -7.555900216103e-01, 2.056119847111e-04, 4.6569e+02, 9.3191e+00, 
 1DIAGNOSTIC,    50, -7.561954259872e-01, 2.010169700952e-04, 4.7518e+02, 9.4927e+00, 
XXDIAGNOSTIC,Iteration,metricValue,convergenceValue,ITERATION_TIME_INDEX,SINCE_LAST
 1DIAGNOSTIC,     1, -5.390903949738e-01, inf, 5.5130e+02, 7.6116e+01, 
 1DIAGNOSTIC,     2, -5.437822341919e-01, inf, 6.2457e+02, 7.3271e+01, 
 1DIAGNOSTIC,     3, -5.489709377289e-01, inf, 6.9603e+02, 7.1456e+01, 
 1DIAGNOSTIC,     4, -5.531517863274e-01, inf, 7.6829e+02, 7.2266e+01, 
 1DIAGNOSTIC,     5, -5.571273565292e-01, inf, 8.4199e+02, 7.3695e+01, 
 1DIAGNOSTIC,     6, -5.606788396835e-01, inf, 9.1499e+02, 7.3001e+01, 
 1DIAGNOSTIC,     7, -5.638772845268e-01, inf, 9.8722e+02, 7.2227e+01, 
 1DIAGNOSTIC,     8, -5.664517879486e-01, inf, 1.0596e+03, 7.2401e+01, 
 1DIAGNOSTIC,     9, -5.687999129295e-01, inf, 1.1322e+03, 7.2537e+01, 
 1DIAGNOSTIC,    10, -5.709271430969e-01, inf, 1.2051e+03, 7.2960e+01, 
Standard error:
 file NULL does not exist .
 file NULL does not exist . 
 file NULL does not exist . 

This seems weird to me because all the files seem to have already been specified at the start of the antsRegistration:

  Reading mask(s).
    Registration stage 0
      Fixed mask = /home/fmriprep/.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-BrainCerebellumExtraction_mask.nii.gz
      No moving mask
    Registration stage 1
      Fixed mask = /home/fmriprep/.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-BrainCerebellumExtraction_mask.nii.gz
      No moving mask
    Registration stage 2
      Fixed mask = /home/fmriprep/.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_desc-BrainCerebellumExtraction_mask.nii.gz
      No moving mask
  number of levels = 4
  number of levels = 4
  number of levels = 3
  fixed image: /home/fmriprep/.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_T1w.nii.gz
  moving image: /tmp/work/fmriprep_wf/single_subject_040_wf/anat_preproc_wf/brain_extraction_wf/inu_n4/mapflow/_inu_n40/sub-040_acq-mprage_run-001_T1w_maths_corrected.nii.gz
  fixed image: /home/fmriprep/.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_T1w.nii.gz
  moving image: /tmp/work/fmriprep_wf/single_subject_040_wf/anat_preproc_wf/brain_extraction_wf/inu_n4/mapflow/_inu_n40/sub-040_acq-mprage_run-001_T1w_maths_corrected.nii.gz
  fixed image: /home/fmriprep/.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_T1w.nii.gz
  moving image: /tmp/work/fmriprep_wf/single_subject_040_wf/anat_preproc_wf/brain_extraction_wf/inu_n4/mapflow/_inu_n40/sub-040_acq-mprage_run-001_T1w_maths_corrected.nii.gz
  fixed image: /tmp/work/fmriprep_wf/single_subject_040_wf/anat_preproc_wf/brain_extraction_wf/lap_tmpl/tpl-OASIS30ANTs_res-01_T1w_maths.nii.gz
  moving image: /tmp/work/fmriprep_wf/single_subject_040_wf/anat_preproc_wf/brain_extraction_wf/lap_target/sub-040_acq-mprage_run-001_T1w_maths_corrected_maths.nii.gz

I was wondering if it could have been a memory issue so I used the --low-mem tag and increased the allocated memory, but this still seems to be happening.

The command I used is as follows:

time docker run -it --rm 
-v /e/zac/proj_restingstate/fslicense.txt:/opt/freesurfer/license.txt 
-v /e/zac/proj_restingstate/processed_data:/data:ro 
-v /e/zac/proj_restingstate/processed_data/output_fmriprep:/out 
poldracklab/fmriprep:latest /data/output_heudiconv/ /out participant 
--participant_label {001..001} -vv --nthreads 8 --mem 12000 --low-mem --fs-license-file /opt/freesurfer/license.txt --skip_bids_validation

This seems weird to me because it seems to run fine until halfway through the registration which should mean that the files specified should have been working fine? Am I missing something here?

Thank you for your time reading this!

I had the same problem. How did you solve it!

Hi @Syerc and welcome to Neurostars!

This is a very old thread, so it would be great if you could please start a new topic under the “Software Questions” category, which will include a template of important information we will need to help debug.

Best,
Steven