Fixelcfestats filename too long

Dear MRtrix experts,

I tried to run fixelcfestats using the following command:

fixelcfestats -negative fd fd_files.txt stats/designMatrix.txt stats/contrastPatLess.txt tracks_2_million_sift.tck stats_fd_PatLess

However, I get the following error:

fixelcfestats: [INFO] image “fd/D19_fd.mif” opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image “fd/D21_fd.mif”…
fixelcfestats: [DEBUG] reading key/value file “fd/D21_fd.mif”…
fixelcfestats: [DEBUG] sanitising image information…
fixelcfestats: [INFO] image “fd/D21_fd.mif” opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image “fd/directions.mif”…
fixelcfestats: [DEBUG] reading key/value file “fd/directions.mif”…
fixelcfestats: [DEBUG] sanitising image information…
fixelcfestats: [INFO] image “fd/directions.mif” opened with dimensions 42921x3x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image “fd/index.mif”…
fixelcfestats: [DEBUG] reading key/value file “fd/index.mif”…
fixelcfestats: [DEBUG] sanitising image information…
fixelcfestats: [INFO] image “fd/index.mif” opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [DEBUG] memory-mapping file “fd/directions.mif”…
fixelcfestats: [DEBUG] file “fd/directions.mif” mapped at 0x108617000, size 515052 (read-only)
fixelcfestats: [DEBUG] image “fd/directions.mif” loaded
fixelcfestats: [DEBUG] image “fd/directions.mif” initialised with strides = [ -1 42921 128763 ], start = 42920, using indirect IO
fixelcfestats: [DEBUG] initialising threads…
fixelcfestats: [DEBUG] launching 8 threads “loop threads”…
fixelcfestats: [100%] preloading data for “fd/directions.mif”…
fixelcfestats: [DEBUG] waiting for completion of threads “loop threads”…
fixelcfestats: [DEBUG] threads “loop threads” completed OK
fixelcfestats: [100%] preloading data for “fd/directions.mif”
fixelcfestats: [DEBUG] image “fd/directions.mif” initialised with strides = [ 3 1 128763 ], start = 0, using direct IO
fixelcfestats: [100%] loading template fixel directions and positions
fixelcfestats: [DEBUG] unmapping file “fd/directions.mif”
fixelcfestats: [DEBUG] image “fd/directions.mif” unloaded
fixelcfestats: [DEBUG] unmapping file “fixel_mask/directions.mif”
fixelcfestats: [DEBUG] image “fixel_mask/directions.mif” unloaded
fixelcfestats: [DEBUG] unmapping file “fd/index.mif”
fixelcfestats: [DEBUG] image “fd/index.mif” unloaded
fixelcfestats: [ERROR] File name too long

I don’t know what happened here: about which filename is it complaining?
The fixelfiles of all subjects seem to be loaded.
I tried to limit the file names included in the command, but that does not help…

Could someone help?
(can’t find this error in fixelcfestats script, so not sure in which step it occurred)

Thanks!

Kind regards,
Charlotte

Hi Charlotte,

Unfortunately that’s a slightly difficult one to diagnose. My suspicion is that “File name too long” is a message being generated by an underlying system call, which MRtrix3 is simply passing through to the user; that unfortunately makes it difficult to track as there’s no additional information in the error message with which to locate the relevant MRtrix3 code.

What would provide us with more information would be if you could follow the instructions on the advanced debugging documentation page. Couuld you also please provide the version of MRtrix3 you’re running.


I’m also intrigued by this:

fixelcfestats: [DEBUG] unmapping file "fixel_mask/directions.mif"
fixelcfestats: [DEBUG] image “fixel_mask/directions.mif” unloaded

There’s no reference to fixel_mask/ in your command invocation… did you use the -mask option but fail to include it in your copy&pasted command?

Rob

Agreed. A quick search reveals only 3 locations in the code where an OS error is reported like this with no additional context, all to do with basic filesystem queries. I’ve added a bit more information to these errors (well, at least the filename should be displayed), I’ll create a pull request for it in a minute.

In the meantime, @Charlotte: if you want to try this out, please open the file core/file/path.h, and modify lines 76, 86, and 96 from:

      throw Exception (strerror (errno));

to:

      throw Exception ("can't query file \"" + path + ": " + strerror (errno));

Then save the file, issue ./build in the terminal to recompile the code, and try your command again. At least that will tell us which file is what trying to query when the error occurred…

Dear Robert and Donald,

Thank you for your fast responses!

@rsmith : You are right that my command was wrongly pasted, it included the fixel mask:

fixelcfestats -negative fd fd_files.txt designMatrix.txt contrastPatLess.txt tracks_2_million_sift.tck stats_fd_PatLess -debug -mask fixel_mask/directions.mif

But same problem occurs without providing the mask.

@jdtournier: I recompiled the adapted code and runned the fixelcfestats again.
Changing the command as suggested, gives me the following error:

fixelcfestats: [100%] loading template fixel directions and positions
fixelcfestats: [DEBUG] unmapping file “fd/directions.mif”
fixelcfestats: [DEBUG] image “fd/directions.mif” unloaded
fixelcfestats: [DEBUG] unmapping file “fixel_mask/directions.mif”
fixelcfestats: [DEBUG] image “fixel_mask/directions.mif” unloaded
fixelcfestats: [DEBUG] unmapping file “fd/index.mif”
fixelcfestats: [DEBUG] image “fd/index.mif” unloaded
D21_fd.mif: File name too longuery file "fd/C01_fd.mif

Rather odd that two different subject files are included in the error now?
Also ’ longuery file '…

Thanks a lot!!

OK, the message is being corrupted, which strikes me as a buffer overrun or something like that (i.e. a bug…). It would be good to figure out exactly where the error is occurring - which would require following the debugging instructions that @rsmith mentioned above…

Otherwise, we’ll be fumbling in the dark. But it does looks like this is happening at the point where the code goes through the supplied list of input data, so that narrows it down a bit. One possibility is that the input file might have been stored using a non-ASCII character encoding, and that this is what’s causing trouble (you can check with file fd_files.txt). Otherwise, Ill have a quick look through the code now, see if I can identify what the problem might be…

Also: it looks like your original debug output is not complete? Can you post the full output right from the start? I appreciate it might be quite long…

  1. The input file appears to be ASCII text :

file fd_files.txt
fd_files.txt: ASCII text, with CR line terminators

  1. I am trying to start the advanced debugging…

./build select debug
./configure -debug -assert

seems to work fine, and creates the next subdirectories in mrtrix directory:

but as you can see in the image, cannot find bin/command in my files to build in the following step…

./build bin/command

Is it core/command.h file which I should use, to make use of advanced debugging?

  1. The complete output of fixelcfestats was as following:
Charlottes-MBP:DWI csleur0$ fixelcfestats -negative fd fd_files.txt designMatrix.txt contrastPatLess.txt tracks_2_million_sift.tck stats_fd_PatLess -debug -mask fixel_mask/directions.mif
mkdir: /Volumes/DriveChar/Fossa_Posteriors/DWI/MergedFiles2/normalised/FBA/stats: File exists
fixelcfestats: [DEBUG] No config file found at "/etc/mrtrix.conf"
fixelcfestats: [DEBUG] No config file found at "/Users/csleur0/.mrtrix.conf"
fixelcfestats: [INFO] opening image "fd/index.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/index.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/index.mif" opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [DEBUG] memory-mapping file "fd/index.mif"...
fixelcfestats: [DEBUG] file "fd/index.mif" mapped at 0x10ca6a000, size 11043432 (read-only)
fixelcfestats: [DEBUG] image "fd/index.mif" loaded
fixelcfestats: [DEBUG] image "fd/index.mif" initialised with strides = [ -2 246 31734 1 ], start = 244, using direct IO
fixelcfestats: number of fixels: 42921
fixelcfestats: [INFO] opening image "fixel_mask/directions.mif"...
fixelcfestats: [DEBUG] reading key/value file "fixel_mask/directions.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fixel_mask/directions.mif" opened with dimensions 42921x3x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [DEBUG] memory-mapping file "fixel_mask/directions.mif"...
fixelcfestats: [DEBUG] file "fixel_mask/directions.mif" mapped at 0x10d526000, size 515052 (read-only)
fixelcfestats: [DEBUG] image "fixel_mask/directions.mif" loaded
fixelcfestats: [DEBUG] image "fixel_mask/directions.mif" initialised with strides = [ -1 42921 128763 ], start = 42920, using indirect IO
fixelcfestats: Fixel mask contains 17859 fixels
fixelcfestats: [INFO] opening image "fd/index.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/index.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/index.mif" opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [DEBUG] memory-mapping file "fd/index.mif"...
fixelcfestats: [DEBUG] file "fd/index.mif" mapped at 0x10d7a4000, size 11043432 (read-only)
fixelcfestats: [DEBUG] image "fd/index.mif" loaded
fixelcfestats: [DEBUG] image "fd/index.mif" initialised with strides = [ -2 246 31734 1 ], start = 244, using direct IO
fixelcfestats: [INFO] opening image "stats_fd_PatLess/index.mif"...
fixelcfestats: [DEBUG] reading key/value file "stats_fd_PatLess/index.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "stats_fd_PatLess/index.mif" opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [DEBUG] memory-mapping file "stats_fd_PatLess/index.mif"...
fixelcfestats: [DEBUG] file "stats_fd_PatLess/index.mif" mapped at 0x10e235000, size 11043432 (read-only)
fixelcfestats: [DEBUG] image "stats_fd_PatLess/index.mif" loaded
fixelcfestats: [DEBUG] image "stats_fd_PatLess/index.mif" initialised with strides = [ -2 246 31734 1 ], start = 244, using direct IO
fixelcfestats: [DEBUG] unmapping file "stats_fd_PatLess/index.mif"
fixelcfestats: [DEBUG] image "stats_fd_PatLess/index.mif" unloaded
fixelcfestats: [DEBUG] unmapping file "fd/index.mif"
fixelcfestats: [DEBUG] image "fd/index.mif" unloaded
fixelcfestats: [INFO] opening image "fd/index.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/index.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/index.mif" opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [INFO] opening image "fd/C01_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C01_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C01_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C02_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C02_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C02_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C04_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C04_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C04_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
...
...
...
fixelcfestats: [INFO] opening image "fd/D03_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D03_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D03_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D04_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D04_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D04_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D05_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D05_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D05_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D06_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D06_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D06_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D07_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D07_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D07_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D08_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D08_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D08_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D09_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D09_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D09_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D10_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D10_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D10_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D11_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D11_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D11_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D12_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D12_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D12_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D13_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D13_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D13_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D14_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D14_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D14_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D15_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D15_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D15_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D16_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D16_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D16_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D17_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D17_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D17_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D18_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D18_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D18_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D19_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D19_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D19_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D21_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D21_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D21_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/directions.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/directions.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/directions.mif" opened with dimensions 42921x3x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/index.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/index.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/index.mif" opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [DEBUG] memory-mapping file "fd/directions.mif"...
fixelcfestats: [DEBUG] file "fd/directions.mif" mapped at 0x10d7a4000, size 515052 (read-only)
fixelcfestats: [DEBUG] image "fd/directions.mif" loaded
fixelcfestats: [DEBUG] image "fd/directions.mif" initialised with strides = [ -1 42921 128763 ], start = 42920, using indirect IO
fixelcfestats: [INFO] opening image "stats_fd_PatLess/directions.mif"...
fixelcfestats: [DEBUG] reading key/value file "stats_fd_PatLess/directions.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "stats_fd_PatLess/directions.mif" opened with dimensions 42921x3x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [DEBUG] memory-mapping file "stats_fd_PatLess/directions.mif"...
fixelcfestats: [DEBUG] file "stats_fd_PatLess/directions.mif" mapped at 0x10d82a000, size 515052 (read-only)
fixelcfestats: [DEBUG] image "stats_fd_PatLess/directions.mif" loaded
fixelcfestats: [DEBUG] image "stats_fd_PatLess/directions.mif" initialised with strides = [ -1 42921 128763 ], start = 42920, using indirect IO
fixelcfestats: [DEBUG] unmapping file "stats_fd_PatLess/directions.mif"
fixelcfestats: [DEBUG] image "stats_fd_PatLess/directions.mif" unloaded
fixelcfestats: [DEBUG] unmapping file "fd/directions.mif"
fixelcfestats: [DEBUG] image "fd/directions.mif" unloaded
fixelcfestats: [INFO] opening image "fd/index.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/index.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/index.mif" opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [INFO] opening image "fd/C01_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C01_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C01_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C02_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C02_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C02_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C04_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C04_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C04_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C05_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C05_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C05_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C06_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C06_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C06_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C07_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C07_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C07_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C08_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C08_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C08_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C09_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C09_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C09_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C10_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C10_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C10_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C11_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C11_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C11_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C12_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C12_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C12_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C13_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C13_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C13_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C14_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C14_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C14_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C16_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C16_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C16_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C17_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C17_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C17_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C18_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C18_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C18_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C19_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C19_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C19_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C20_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C20_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C20_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/C21_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/C21_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/C21_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D01_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D01_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D01_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D02_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D02_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D02_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D03_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D03_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D03_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D04_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D04_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D04_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D05_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D05_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D05_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D06_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D06_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D06_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D07_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D07_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D07_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D08_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D08_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D08_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D09_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D09_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D09_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D10_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D10_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D10_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D11_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D11_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D11_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D12_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D12_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D12_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D13_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D13_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D13_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D14_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D14_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D14_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D15_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D15_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D15_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D16_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D16_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D16_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D17_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D17_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D17_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D18_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D18_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D18_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D19_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D19_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D19_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/D21_fd.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/D21_fd.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/D21_fd.mif" opened with dimensions 42921x1x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/directions.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/directions.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/directions.mif" opened with dimensions 42921x3x1, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998, datatype Float32LE
fixelcfestats: [INFO] opening image "fd/index.mif"...
fixelcfestats: [DEBUG] reading key/value file "fd/index.mif"...
fixelcfestats: [DEBUG] sanitising image information...
fixelcfestats: [INFO] image "fd/index.mif" opened with dimensions 123x129x87x2, voxel spacing 2.66262x2.7682000000000002x2.7807499999999998x1, datatype UInt32LE
fixelcfestats: [DEBUG] memory-mapping file "fd/directions.mif"...
fixelcfestats: [DEBUG] file "fd/directions.mif" mapped at 0x10d8b0000, size 515052 (read-only)
fixelcfestats: [DEBUG] image "fd/directions.mif" loaded
fixelcfestats: [DEBUG] image "fd/directions.mif" initialised with strides = [ -1 42921 128763 ], start = 42920, using indirect IO
fixelcfestats: [DEBUG] initialising threads...
fixelcfestats: [DEBUG] launching 8 threads "loop threads"...
fixelcfestats: [100%] preloading data for "fd/directions.mif"... 
fixelcfestats: [DEBUG] waiting for completion of threads "loop threads"...
fixelcfestats: [DEBUG] threads "loop threads" completed OK
fixelcfestats: [100%] preloading data for "fd/directions.mif"
fixelcfestats: [DEBUG] image "fd/directions.mif" initialised with strides = [ 3 1 128763 ], start = 0, using direct IO
fixelcfestats: [100%] loading template fixel directions and positions
fixelcfestats: [DEBUG] unmapping file "fd/directions.mif"
fixelcfestats: [DEBUG] image "fd/directions.mif" unloaded
fixelcfestats: [DEBUG] unmapping file "fixel_mask/directions.mif"
fixelcfestats: [DEBUG] image "fixel_mask/directions.mif" unloaded
fixelcfestats: [DEBUG] unmapping file "fd/index.mif"
fixelcfestats: [DEBUG] image "fd/index.mif" unloaded
D21_fd.mif: File name too longuery file "fd/C01_fd.mif

OK, looking through the full output, it looks like this is the line causing the error. And looking at the output of your file command more closely:

I think the issue is that the line endings in your input file list are stored as carriage returns (CR), not the expected linefeed (LF). As far as I can tell, macOS switched from CR to the Unix standard LF with macOS X back in 2012… See if you can open it in your text editor, and find some setting somewhere to tell your editor to save the file with Unix linefeeds – or use a command line approach like the one suggested here.


Ah, yes, you need to substitute command for the command name you’re interested in debugging - this might need clarifying on the instructions… In your case, this would be:

./build bin/fixelcfestats

Thanks a lot Donald! This indeed solved the problem!!!