Runtime error; told to contact MRtrix's support team

"tckgen.exe FOD.mif -seed_sphere -16.2,17,37.44,5 -include -18.2,4.6,8,3 cingulum_L.tck -number 5000
tckgen: [100%] 500000 generated, 831 selected
terminate called after throwing an instance of ‘MR::Exception’

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information."

Above is the tckgen command I used, got about 80% of the way through before it just randomly aborted.

Darn, that’s not going to be easy to figure out… I’m assuming this is a Windows build, right? Has this happened before or since…?

Also, note that the processing did complete: by default, tckgen will generate a maximum of 100× the number of tracks requested (to prevent it hanging when no tracks can genuinely be found). In your case, it stopped when it should have. But for some reason it crashed as it was terminating - maybe even before it got the chance to write out the tracks (you can check with tckinfo whether the count is what was reported on the command line).

For the developers: it looks like one of the threads is throwing an exception - this is the most likely reason for the abort. We’ll need to see whether there’s any way the threads might throw when the tracking terminates due to exceeding the max number…

Yeah, this is the Windows MSys2 build that you gave me from a PhD student at KUL in Belgium if I recall correctly.

Have not had any errors like it since or before. I even ran the same command (without changing any parameters) just for the giggles and it worked completely fine and ended without incident. tckinfo.exe (as well as just looking at the file size, 1kb) shows that it didn’t keep any of the tracks generated (count 0).

It seems like it’s an isolated incident, I’ve run about 50 more tractographies since on various brains, including some big full brain ones with ~500,000-1,000,000 tracks and I haven’t run into the same error again.

Yes, this is going to be almost impossible to track down… At least it’s not proving problematic in the long run, thankfully.

I might look at better ways to handle Exceptions thrown in threads when I have a minute - but I have to admit I can’t figure out why the actual error message wasn’t at least shown here… Oh well.