Mrview - segmentationfault (core dump) + Ubuntu 16.04

linux
installation
eigen

#21

Thats no all, a post is limited to 32,000 characters. I had 160,000. So…take the mail!

Sorry to Thijs, I admit…I didnt read that. I will now.


#22
building testing commands... OK
    running "5tt2gmwmi"... 0 of 1 passed    <-------- ERROR
    running "5tt2vis"... 0 of 1 passed    <-------- ERROR
    running "5ttedit"... 1 of 2 passed    <-------- ERROR
    running "amp2sh"... 0 of 1 passed    <-------- ERROR
    running "dirgen"... 4 of 4 passed
    running "dwi2adc"... 0 of 1 passed    <-------- ERROR
    running "dwi2fod"... 0 of 3 passed    <-------- ERROR
    running "dwi2mask"... 0 of 1 passed    <-------- ERROR
    running "dwi2noise"... 0 of 1 passed    <-------- ERROR
    running "dwiextract"... 0 of 2 passed    <-------- ERROR
    running "fixel2sh"... 0 of 1 passed    <-------- ERROR
    running "fixel2tsf"... 0 of 1 passed    <-------- ERROR
    running "fixeldivide"... 0 of 1 passed    <-------- ERROR
    running "fixelmult"... 0 of 1 passed    <-------- ERROR
    running "fixelthreshold"... 0 of 2 passed    <-------- ERROR
    running "fod2fixel"... 3 of 3 passed
    running "label2colour"... 1 of 3 passed    <-------- ERROR
    running "label2mesh"... 0 of 2 passed    <-------- ERROR
    running "labelconfig"... 0 of 2 passed    <-------- ERROR
    running "maskfilter"... 2 of 9 passed    <-------- ERROR
    running "mesh2pve"... 0 of 1 passed    <-------- ERROR
    running "meshconvert"... 10 of 10 passed
    running "mrcalc"... 0 of 4 passed    <-------- ERROR
    running "mrcat"... 0 of 6 passed    <-------- ERROR
    running "mrconvert"... 0 of 11 passed    <-------- ERROR
    running "mrcrop"... 0 of 2 passed    <-------- ERROR
    running "mrfilter"... 0 of 8 passed    <-------- ERROR
    running "mrmath"... 0 of 3 passed    <-------- ERROR
    running "mrpad"... 0 of 4 passed    <-------- ERROR
    running "mrresize"... 0 of 8 passed    <-------- ERROR
    running "mrstats"... 2 of 5 passed    <-------- ERROR
    running "mrthreshold"... 0 of 10 passed    <-------- ERROR
    running "mrtransform"... 2 of 6 passed    <-------- ERROR
    running "peaks2amp"... 0 of 1 passed    <-------- ERROR
    running "sh2amp"... 0 of 3 passed    <-------- ERROR
    running "sh2peaks"... 0 of 1 passed    <-------- ERROR
    running "sh2power"... 0 of 1 passed    <-------- ERROR
    running "sh2response"... 0 of 1 passed    <-------- ERROR
    running "shbasis"... 0 of 4 passed    <-------- ERROR
    running "shconv"... 0 of 2 passed    <-------- ERROR
    running "tck2connectome"... 0 of 3 passed    <-------- ERROR
    running "tckconvert"... 3 of 4 passed    <-------- ERROR
    running "tckgen"... 0 of 14 passed    <-------- ERROR
    running "tckmap"... 0 of 4 passed    <-------- ERROR
    running "tcknormalise"... 0 of 1 passed    <-------- ERROR
    running "tcksample"... 0 of 1 passed    <-------- ERROR
    running "tcksift"... 0 of 1 passed    <-------- ERROR
    running "tcksift2"... 0 of 1 passed    <-------- ERROR
    running "tensor2metric"... 0 of 8 passed    <-------- ERROR
    running "transformcalc"... 1 of 1 passed
    running "tsfdivide"... 1 of 1 passed
    running "tsfmult"... 1 of 1 passed
    running "tsfsmooth"... 1 of 1 passed
    running "tsfthreshold"... 2 of 2 passed
    running "voxel2fixel"... 0 of 1 passed    <-------- ERROR
    running "warpcorrect"... 0 of 1 passed    <-------- ERROR
    running "warpinit"... 0 of 1 passed    <-------- ERROR

#24

I’ve got mrview segfaulting on Eigen 3.2.92. So it’s definitely compatibility with the beta version of Eigen that’s the issue. Unfortunately my Windows machine claims my debug build doesn’t contain debugging symbols, so I can’t dig further right now. But you should be able to revert to the stable release of Eigen to fix the issue at your end, and the devs should be able to chase up the issues with the Eigen beta in our own time.


#25

Can you clarify the command…it cant finde the eigen library? What is-I$(pwd)?
Or do i have to install before? Maybe I am to tired to understand. :slight_smile:

–> the configure works now!


#26

OK, good to hear. For reference, you can copy-paste the following into a terminal, having changed into the MRtrix3 folder - it should just work as-is…

wget http://bitbucket.org/eigen/eigen/get/3.2.8.tar.gz
tar xvfz 3.2.8.tar.gz 
rm -f 3.2.8.tar.gz
mv eigen-eigen-* eigen
EIGEN_CFLAGS="-isystem $(pwd)/eigen" ./configure
./build

Segmentation fault (core dumped)
Mrregister error
Mrregister error
Segmentation Fault in population template (mrregister)
Dwipreproc error: Inconsistent left-right order stored in sform and qform
#27

For reference, the problem as reported in @Ralf’s testing.log output is as per the original. For example:

mrconvert: /usr/include/eigen3/Eigen/src/Core/DenseStorage.h:128: Eigen::internal::plain_array<T, Size, MatrixOrArrayOptions, 32>::plain_array() [with T = double; int Size = 12; int MatrixOrArrayOptions = 0]: Assertion `(reinterpret_cast<size_t>(eigen_unaligned_array_assert_workaround_gcc47(array)) & (31)) == 0 && "this assertion is explained here: " "http://eigen.tuxfamily.org/dox-devel/group__TopicUnalignedArrayAssert.html" " **** READ THIS WEB PAGE !!! ****"' failed.

Basically nothing works, as you see from the actual output of ./run_tests above…


#28

My first tests with mrview are positiv.
I try a little arround!


#29

No worries, I’m not (too) emotionally attached to that post. :wink: …but the code tags are a super handy thing indeed!


#30

Morning…
So, I played a little arround with fixeling and indiscriminately mrtrixing and mrviewing stuff. And it works so far… :slight_smile:
Thanks for the help. I hope “Eigen” solves the problem.

So…MRTrix is working…what do I do next? :grin:


#31

Just ran into this yesterday evening as well (mrview segfaulting; also Ubuntu 16.04)… got me stumped for a while, until I stumbled upon these posts; the above of course fixing things. I was (unknowingly) also using the beta version of Eigen. I reckon quite a few people may start running into issues on Ubuntu 16.04; as our default installation instructions basically sets them up with the 3.3 beta of Eigen…

In my case, I was able to run mrview, but it kept segfaulting upon loading an image. Every once in a while (like 1 in 30 times or something) it did load the image; but it was a pretty consistent segfault in all other cases…

Segfaulting is one thing, but what’s more worrying is people using a beta version of the library that handles a lot of our mathematics…


#32

Yes, that is indeed a concern. There is in fact a pull request with the fixes required to get MRtrix3 working with Eigen 3.3 beta, maybe we need to merge and see what happens… I’ve got it to a state where it passes all tests, but I have a strong suspicion there’ll be other places where it’ll fall over. The good news is the changes shouldn’t affect operation with Eigen 3.2, and when there is a failure, it should manifest as an overt crash (rather than producing a wrong result, which would be far worse…). So I think merging would be perfectly safe - at least as safe as the current state anyway.

Yes, I’m also a bit worried about this. But I reckon their beta is probably pretty close to release, and very thoroughly unit tested (although I’d have to check that). In any case, if Ubuntu are happy to provide a beta package as their default, it should be fine - and we can blame them if it turns out otherwise… :wink:

I’m away at the moment, so if anyone is feeling keen, feel free to update the branch and merge.


#33

Hi,

Had the same issue, same fix. Just for the record. Also using Ubuntu 16.04

Thanks

Eduardo


#34

Thanks for reporting this. However, I pushed out a commit 9 days ago that should make it safe to use the beta (now release) 3.3 version of Eigen. How recently did you last update the MRtrix3 code (with git pull)? Note that you need to re-run ./configure and then ./build for the changes to take effect. If you found you needed to downgrade Eigen even using a version of MRtrix3 later than this commit, I’d like to know about it ASAP! A quick check would be to look into your release/config file, you should find the -mno-avx option listed in the cpp_flags entry.

I’m currently trying to fix the rest of the code so we don’t need to resort to that last hack (involves disabling certain CPU optimisations, which is not ideal). It’s actually a really complex problem, but I think I’ve got a workable solution. It’s almost there, hopefully I’ll have this working properly fairly soon. But in the meantime, it should at least be safe to use any version of Eigen with the changes I made 9 days ago. Let me know if that’s not the case!


#35

Hi Donald,

Sorry I didn’t check this before.

I had the version of Mrtrix from less than a month ago, because I had to format my PC, so at least is the version I downloaded less than a month ago. I did the Eigen cheat, but I can git the core MRTRIX and get back to you, but I think I will prefer to wait for your fix.

Thanks!

Ed


#36

Little late here, but the link in this post worked for me! I am new to a lot of this, so I am glad it was a quick fix.