-
Notifications
You must be signed in to change notification settings - Fork 191
Fix segfault in global tractography. #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Dear experts, my Content of my |
|
Strange. Do you also get the error when building against Eigen 3.3? |
|
OK, had a quick look into this. It seems the issue is that Eigen's allocator in the older version is not fully C++11 compliant. To expand:
In C++11, this call would take a variadic argument passed directly through from the C++11 emplace_back() call, and all would be well (it's supposed to invoke the class's matching constructor, passing it the additional arguments). The older 51 pool.emplace_back(pos, dir);to: 51 pool.emplace_back (Particle (pos, dir));which should work for both versions... (?) I don't think there'll be any performance penalty thanks to copy elision. |
As reported in #992, the recent merge of #785 accidentally introduced a segfault in
tckglobal. This pull requests fixes this.The error was caused by two issues:
rowmethod for image access interfered with an out-of-bounds check on the third dimension (DWI volumes) in the data energy computation. This was easily fixed by limiting the bounds check to the spatial dimensions.std::dequeandstd::stackmembers of the object pool used to store track segments. This was fixed in 860c474 by setting the appropriate template arguments.Today's commits clean up the code without affecting performance.