Mrview - segmentationfault (core dump) + Ubuntu 16.04

Hi Mrtrixler,

I updated my machine to 16.04 Ubuntu and I installed mrtrix the latest Version.
Use the proprietary NVIDIA Driver (361.42).
I can start mrview. I can start mrview with loading anatomie.
What I am not able to do is to load a dt file or the data file or something.
It worked before with the older Versions of Ubuntu.
Any hints or help, before I have to go to Ubunt 14 or something?

Ralf

I’m not sure what you mean here… What is the problem exactly?

If I try to load other files then the anatomy file the “segmentation fault (core dumb)” is standing in the terminal and nothing happens…or mrview is closing, if I opened it before loading data and then loading data with the mrview dialog.
So MRview is crashing…
I cant say if it is the new Ubuntu or the new MRTrix Version.
How can I find out. It worked before the update.
It can be that I used the syntax branch before the ubdate, but I removed it.

Still you’re being too much unspecific with your question, but I would suggest to completely remove MRtrix, re-download it and build it from scratch in the new system.

OK, can you try: run mrview -debug, bring it to the point of crashing, then copy-pasting the terminal output here.

Also provide as much information about your graphics hardware and drivers as possible. Are you using the proprietary drivers, or the open-source ones?

Also, are these images that you’re trying to load unusual in any way? Maybe they’re very large or something?

Hi,

cant be more specific…like I said:

  • updated Ubuntu
  • Reinstalled MRTrix
  • Use the Use the proprietary NVIDIA Driver (361.42)
  • Only loadable is the MPRage
  • Other data crahes mrview

I tried some other nvidia drivers, but didnt work either. I thought somebody had the same issue with the new ubuntu version.
mrview -debug data.mif gives us:

mrview: [DEBUG] No config file found at "/etc/mrtrix.conf"
mrview: [INFO] reading config file "/home/ibmi/.mrtrix.conf"...
mrview: [DEBUG] reading key/value file "/home/ibmi/.mrtrix.conf"...
mrview: [INFO] GL renderer:  GeForce GTX 780 Ti/PCIe/SSE2
mrview: [INFO] GL version:   3.3.0 NVIDIA 361.42
mrview: [INFO] GL vendor:    NVIDIA Corporation
mrview: [DEBUG] loading font into OpenGL texture...
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 font_pos;
uniform float scale_x;
uniform float scale_y;
out vec2 tex_coord;
void main () {
  gl_Position = vec4 (pos[0]*scale_x-1.0, pos[1]*scale_y-1.0, 0.0, 1.0);
  tex_coord = font_pos;
}

mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
in vec2 tex_coord;
uniform sampler2D sampler;
uniform float red, green, blue;
out vec4 color;
void main () {
  color.ra = texture (sampler, tex_coord).rg;
  color.rgb = color.r * vec3 (red, green, blue);
}

mrview: [DEBUG] font loaded
mrview: [INFO] opening image "data_reg_ecc.mif"...
mrview: [DEBUG] reading key/value file "data_reg_ecc.mif"...
mrview: [DEBUG] sanitising image information...
Segmentation fault (core dumped)

OK, you’re running pretty much the same hardware and drivers as I am (although I’m a little ahead on the drivers, running 364). This doesn’t look like it would be the problem.

But looking at the debug output, it seems to crash out when loading the image, which is a code path common to the whole of MRtrix3. So I’d expect pretty much any MRtrix3 command to segfault with that file. Can you try a simple mrconvert with that file as input? If that works, and the only application affected genuinely is MRView, the most likely issue would be some form of memory corruption in MRView, causing unexpected errors down the track. This kind of error is best identified using valgrind, but that’s not something I would ask regular users to do, it’s a bit advanced… I won’t have any time to look into this for until after ISMRM unfortunately, but maybe one of the other devs can have a quick go…? Basic instructions in case anyone is interested in having a go:

$ ./configure -assert -debug debug
$ ./build debug/bin/mrview
$ valgrind debug/bin/mrview

Then load some images (it’ll be very slow), and see what error messages pop up on the terminal…

OK, I actually found a bit of time to see whether were any memory issues within MRView, as reported using valgrind - there’s nothing out of the ordinary. There’s the usual errors related to X11, the video drivers, and Qt, but nothing that has anything to do with the MRtrix3 code as such. The other errors are typically nothing to worry about, valgrind reports anything out of the ordinary, even if it’s not technically a problem…

So if you could check whether other MRtrix3 commands are affected, that would be good. The other thing to try is a completely fresh install, by removing your release folder completely and doing the ./configure && ./build again, just in case your MRtrix3 library is not in sync with the mrview executable.

This is the valgrind. I could not upload an rtf or some kind of document besides pictures. I could have named it *.js !

ibmi@ibmi-81645:~/mrtrix3$ valgrind debug/bin/mrview
==7371== Memcheck, a memory error detector
==7371== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==7371== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==7371== Command: debug/bin/mrview
==7371== 
==7371== Syscall param write(buf) points to uninitialised byte(s)
==7371==    at 0x7862A2D: ??? (syscall-template.S:84)
==7371==    by 0x77E4B2E: _IO_file_write@@GLIBC_2.2.5 (fileops.c:1263)
==7371==    by 0x77E6338: new_do_write (fileops.c:518)
==7371==    by 0x77E6338: _IO_do_write@@GLIBC_2.2.5 (fileops.c:494)
==7371==    by 0x77E432F: _IO_file_sync@@GLIBC_2.2.5 (fileops.c:874)
==7371==    by 0x77D97CE: fflush (iofflush.c:40)
==7371==    by 0x1C657BFB: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C659FD6: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C656935: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C402C56: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C4080E4: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x5AF46C: gl::Switch_CompileShader(unsigned int) (gl_core_3_3.cpp:1490)
==7371==    by 0x525A5A: MR::GUI::GL::Shader::Object<35633>::compile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (shader.h:58)
==7371==  Address 0x1d8603e8 is 24 bytes inside a block of size 4,096 alloc'd
==7371==    at 0x4C2DB8F: malloc (vg_replace_malloc.c:299)
==7371==    by 0x77D9184: _IO_file_doallocate (filedoalloc.c:127)
==7371==    by 0x77E74C3: _IO_doallocbuf (genops.c:398)
==7371==    by 0x77E6827: _IO_file_overflow@@GLIBC_2.2.5 (fileops.c:820)
==7371==    by 0x77E51BC: _IO_file_xsputn@@GLIBC_2.2.5 (fileops.c:1331)
==7371==    by 0x77DA6FA: fwrite (iofwrite.c:39)
==7371==    by 0x1C658146: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C6581B5: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C659E64: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C65A191: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C6569C6: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C402D43: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x1C656782: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C656905: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C43D967: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C43B34D: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C44094A: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x1C40D083: ??? (in /usr/lib/nvidia-361/libnvidia-glcore.so.361.42)
==7371==    by 0x5AFB85: gl::Switch_LinkProgram(unsigned int) (gl_core_3_3.cpp:1652)
==7371==    by 0x51F998: MR::GUI::GL::Shader::Program::link() (shader.h:117)
==7371==    by 0xA23F7E: MR::GUI::GL::Font::initGL() (font.cpp:164)
==7371==    by 0x5770C1: MR::GUI::MRView::Window::initGL() (window.cpp:1384)
==7371==    by 0x56C0E9: MR::GUI::MRView::Window::GLArea::initializeGL() (window.cpp:156)
==7371==    by 0x5562DCC: QGLWidget::glInit() (in /usr/lib/x86_64-linux-gnu/libQtOpenGL.so.4.8.7)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x210A528E: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x21096047: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x5F33EC0: QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A4EED6: QWidget::setFocus(Qt::FocusReason) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A02514: QApplication::setActiveWindow(QWidget*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A8045D: QApplication::x11ProcessEvent(_XEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5AAA541: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x8BE7126: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.0)
==7371==    by 0x8BE737F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.0)
==7371==    by 0x8BE742B: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4800.0)
==7371==    by 0x66E72AD: QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7)
==7371==    by 0x5AAA615: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x210A5F48: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x21096047: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x5F33EC0: QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5DD791E: QAbstractButton::setDown(bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5DD7CB4: QAbstractButton::mousePressEvent(QMouseEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E9E56E: QToolButton::mousePressEvent(QMouseEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A5448F: QWidget::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x59FCFDB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A040D5: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x66B690C: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7)
==7371==    by 0x5A036DC: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A813F1: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x210A4E1E: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x21096047: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x5F33EC0: QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A50CDB: QWidgetPrivate::show_helper() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A52C09: QWidget::setVisible(bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E5C8F5: QMenu::popup(QPoint const&, QAction*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E60B32: QMenu::exec(QPoint const&, QAction*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E9DC7F: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E9E1C0: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x66CB00F: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7)
==7371==    by 0x5DD7365: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5DD7CD2: QAbstractButton::mousePressEvent(QMouseEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x210A4EA3: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x21096047: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x5F33EC0: QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A4FDFC: QWidgetPrivate::hide_helper() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A52DCF: QWidget::setVisible(bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A500CB: QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E5D627: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E5DBF6: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E619E4: QMenu::mousePressEvent(QMouseEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A5448F: QWidget::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E61FFA: QMenu::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x59FCFDB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x210A528E: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x21096047: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x5F33EC0: QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E5DFFD: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E5E314: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E61D7B: QMenu::mouseMoveEvent(QMouseEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A538CF: QWidget::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5E61FFA: QMenu::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x59FCFDB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A040D5: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x66B690C: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7)
==7371==    by 0x5A036DC: QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x11FA9D86: ??? (in /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.33.6)
==7371==    by 0x11F8CE82: ??? (in /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.33.6)
==7371==    by 0x11F48F80: pixman_image_composite32 (in /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.33.6)
==7371==    by 0x111D2504: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x11217920: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x11209C32: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1120A6A4: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1120B5D2: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x111C5A8F: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x111D7126: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1120E7D6: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x111CE14B: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x11FA9FDD: ??? (in /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.33.6)
==7371==    by 0x11F8CE82: ??? (in /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.33.6)
==7371==    by 0x11F48F80: pixman_image_composite32 (in /usr/lib/x86_64-linux-gnu/libpixman-1.so.0.33.6)
==7371==    by 0x111D2504: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x11217920: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x11209C32: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1120A6A4: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1120B1E9: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x111C599E: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x111D70F1: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1120E6D5: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x111CDD2E: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x248942F8: ??? (in /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==7371==    by 0x24894EEB: rsvg_handle_get_pixbuf_sub (in /usr/lib/x86_64-linux-gnu/librsvg-2.so.2.40.13)
==7371==    by 0x24644E35: ??? (in /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so)
==7371==    by 0x114C1F9A: gdk_pixbuf_loader_close (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.2)
==7371==    by 0x114BDC7A: ??? (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.2)
==7371==    by 0x114BFBAC: gdk_pixbuf_new_from_stream_at_scale (in /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0.3200.2)
==7371==    by 0x1056FEBD: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30)
==7371==    by 0x10573051: gtk_icon_info_load_icon (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30)
==7371==    by 0x105731B5: gtk_icon_theme_load_icon (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30)
==7371==    by 0x1054BFF6: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30)
==7371==    by 0x10552099: ??? (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30)
==7371==    by 0x90E8148: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4800.0)
==7371== 
==7371== Syscall param writev(vector[...]) points to uninitialised byte(s)
==7371==    at 0x786873D: ??? (syscall-template.S:84)
==7371==    by 0xA295F28: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==7371==    by 0xA29631C: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==7371==    by 0xA2963A4: xcb_writev (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==7371==    by 0x84444AD: _XSend (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==7371==    by 0x820007F: XRenderAddGlyphs (in /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0)
==7371==    by 0x1123851E: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1121FFE6: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x112201EC: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x111C5B9E: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1123C5AF: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==    by 0x1120EE92: ??? (in /usr/lib/x86_64-linux-gnu/libcairo.so.2.11400.6)
==7371==  Address 0xe37a8b4 is 6,612 bytes inside a block of size 16,384 alloc'd
==7371==    at 0x4C2FB55: calloc (vg_replace_malloc.c:711)
==7371==    by 0x8434692: XOpenDisplay (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==7371==    by 0x10B07288: gdk_display_open (in /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0.2400.30)
==7371==    by 0x10AD6FCE: gdk_display_open_default_libgtk_only (in /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0.2400.30)
==7371==    by 0x1059E574: gtk_init (in /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0.2400.30)
==7371==    by 0x5DA4496: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A6AA2F: QGuiPlatformPlugin::systemIconThemeName() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5AB1F66: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A73A28: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A78762: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A012A1: QApplicationPrivate::construct(_XDisplay*, unsigned long, unsigned long) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A0154E: QApplication::QApplication(int&, char**, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371== 
==7371== Conditional jump or move depends on uninitialised value(s)
==7371==    at 0x210A4F28: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x21096047: ??? (in /usr/lib/x86_64-linux-gnu/qt4/plugins/accessiblebridge/libqspiaccessiblebridge.so)
==7371==    by 0x5F33EC0: QAccessible::updateAccessibility(QObject*, int, QAccessible::Event) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5A532B0: QWidget::~QWidget() (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5DA66B3: ??? (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x5EF1B22: QFileDialog::getOpenFileNames(QWidget*, QString const&, QString const&, QString const&, QString*, QFlags<QFileDialog::Option>) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371==    by 0x88CC1A: MR::GUI::Dialog::File::get_files(QWidget*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (file.cpp:73)
==7371==    by 0x59302B: MR::GUI::Dialog::File::get_images(QWidget*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (file.h:44)
==7371==    by 0x573123: MR::GUI::MRView::Window::image_open_slot() (window.cpp:721)
==7371==    by 0x78E2F2: MR::GUI::MRView::Window::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (window_moc.cpp:138)
==7371==    by 0x66CB00F: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7)
==7371==    by 0x59F6D61: QAction::triggered(bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7)
==7371== 
mrview: /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.
==7371== 
==7371== Process terminating with default action of signal 6 (SIGABRT)
==7371==    at 0x77A1418: raise (raise.c:54)
==7371==    by 0x77A3019: abort (abort.c:89)
==7371==    by 0x7799BD6: __assert_fail_base (assert.c:92)
==7371==    by 0x7799C81: __assert_fail (assert.c:101)
==7371==    by 0x5A240A: Eigen::internal::plain_array<double, 12, 0, 32>::plain_array() (DenseStorage.h:128)
==7371==    by 0x5A0481: Eigen::DenseStorage<double, 12, 3, 4, 0>::DenseStorage() (DenseStorage.h:187)
==7371==    by 0x59DF11: Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 4, 0, 3, 4> >::PlainObjectBase() (PlainObjectBase.h:457)
==7371==    by 0x59A471: Eigen::Matrix<double, 3, 4, 0, 3, 4>::Matrix() (Matrix.h:259)
==7371==    by 0x595C15: Eigen::Transform<double, 3, 18, 0>::Transform(Eigen::Transform<double, 3, 18, 0> const&) (Transform.h:262)
==7371==    by 0x59195B: MR::Header::Header(MR::Header&&) (header.h:66)
==7371==    by 0x5731FD: MR::GUI::MRView::Window::image_open_slot() (window.cpp:728)
==7371==    by 0x78E2F2: MR::GUI::MRView::Window::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (window_moc.cpp:138)
==7371== 
==7371== HEAP SUMMARY:
==7371==     in use at exit: 28,424,106 bytes in 60,000 blocks
==7371==   total heap usage: 751,380 allocs, 691,380 frees, 2,239,784,061 bytes allocated
==7371== 
==7371== LEAK SUMMARY:
==7371==    definitely lost: 17,142 bytes in 191 blocks
==7371==    indirectly lost: 93,533 bytes in 2,558 blocks
==7371==      possibly lost: 18,312,800 bytes in 806 blocks
==7371==    still reachable: 9,584,999 bytes in 54,400 blocks
==7371==                       of which reachable via heuristic:
==7371==                         length64           : 11,360 bytes in 167 blocks
==7371==                         newarray           : 6,640 bytes in 69 blocks
==7371==                         multipleinheritance: 1,584 bytes in 3 blocks
==7371==         suppressed: 0 bytes in 0 blocks
==7371== Rerun with --leak-check=full to see details of leaked memory
==7371== 
==7371== For counts of detected and suppressed errors, rerun with: -v
==7371== Use --track-origins=yes to see where uninitialised values come from
==7371== ERROR SUMMARY: 3165 errors from 12 contexts (suppressed: 0 from 0)
Killed
ibmi@ibmi-81645:~/mrtrix3$

I dont know if it helps. I installed mrtrix with apt get…I think its the old mrtrix 0.2…but mrview is working …

Fixed the formatting for you… (you can use the </> icon on the toolbar above the text entry to format as ‘code’).

Looks like you have a genuine problem there. I would definitely expect this to lead to problems with regular commands too, given that this happens during image load (reading the image header, to be precise). It’s complaining about data alignment, which will probably be CPU-dependent - hence the problem not showing up on our own testing - I certainly have no such issues on my system. However, this may or may not have been the actual problem that you’ve reported, since the assertion failure is only included in debug builds - this may not have caused the crash that you had with the release version.

More to follow shortly…

Would help if I installed your nvidia driver?

No, this is entirely unrelated to the graphics. This is almost certainly due to the memory alignment issues, which become apparent in your case presumably because you have an older CPU that doesn’t support SSE4 extensions (these don’t need aligned data), so Eigen falls back to SSE2 instructions that do require alignment. There’s only very specific cases where this issue would manifest, Eigen seems to take care of this very well most of the time. But the image open callback in MRView is precisely one of those cases that needs special handling.

OK, can you try this and see if that helps:

$ git fetch 
$ git checkout fix_alignment_for_transform_type
$ ./build

Hopefully that’ll sort out that particular issue, but I have a feeling you’ll be coming across a few more of these over the next few weeks… Please report any crashes that you encounter, we’ll see if we can apply the same fixes as here (assuming they work, of course…).

So we’ve been trying to reproduce this issue on our own systems, with no luck… To help us narrow this down, it would be great if you could give us a bit more information about your system. Specifically:

  • the output of lscpu (or cat /proc/cpuinfo if that doesn’t work)

  • the contents of your release/config file (in the MRtrix3 folder)

If you have the time, it would be great if you could also run the following:

$ git checkout master
$ ./configure -assert -debug
$ ./build
$ ./run_tests

and post the contents of the resulting testing.log file here.

To revert your installation back to how it was, once you’re done with the above:

$ ./configure
$ ./build

lscpu:

ibmi@ibmi-81645:~$ lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Model name:            Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
Stepping:              3
CPU MHz:               4273.281
CPU max MHz:           4400,0000
CPU min MHz:           800,0000
BogoMIPS:              8000.21
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts

Release/Config file:

#!/usr/bin/python
#
# autogenerated by MRtrix configure script
#
# configure output:
#
# MRtrix build type requested: release
#
# Detecting OS: linux
# Checking for C++11 compliant compiler [g++]: 5.3.1 - tested ok
# Detecting pointer size: 64 bit
# Detecting byte order: little-endian
# Checking for variable-length array support: yes
# Checking for non-POD variable-length array support: yes
# Checking for zlib compression library: 1.2.8
# checking for Eigen 3 library: 3.2.92
# Checking shared library generation: yes
# Checking for Qt moc: moc (version 4.8.7)
# Checking for Qt qmake: qmake (version 4.8.7)
# Checking for Qt rcc: rcc (version 4.8.7)
# Checking for Qt: 4.8.7

PATH = r'/home/ibmi/mrtrix3/release/bin:/home/ibmi/mrtrix3/scripts:/home/ibmi/mrtrix3/bin:/usr/share/fsl/5.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/fsl/5.0'
obj_suffix = '.o'
exe_suffix = ''
lib_prefix = 'lib'
lib_suffix = '.so'
cpp = [ 'g++', '-c', 'CFLAGS', 'SRC', '-o', 'OBJECT' ]
cpp_flags = [ '-std=c++11', '-pthread', '-fPIC', '-march=native', '-DMRTRIX_WORD64', '-isystem', '/usr/include/eigen3', '-Wall', '-O2', '-DNDEBUG' ]
ld = [ 'g++', 'OBJECTS', 'LDFLAGS', '-o', 'EXECUTABLE' ]
ld_flags = [ '-pthread', '-lz' ]
runpath = '-Wl,-rpath,$ORIGIN/'
ld_enabled = True
ld_lib = [ 'g++', 'OBJECTS', 'LDLIB_FLAGS', '-o', 'LIB' ]
ld_lib_flags = [ '-pthread', '-shared', '-pthread', '-lz' ]
eigen_cflags = [ '-isystem', '/usr/include/eigen3' ]
moc = 'moc'
rcc = 'rcc'
qt_cflags = [ '-m64', '-pipe', '-O2', '-Wall', '-W', '-D_REENTRANT', '-DQT_NO_DEBUG', '-DQT_SVG_LIB', '-DQT_OPENGL_LIB', '-DQT_GUI_LIB', '-DQT_CORE_LIB', '-DQT_SHARED', '-isystem', '/usr/share/qt4/mkspecs/linux-g++-64', '-isystem', '/usr/include/qt4/QtCore', '-isystem', '/usr/include/qt4/QtGui', '-isystem', '/usr/include/qt4/QtOpenGL', '-isystem', '/usr/include/qt4/QtSvg', '-isystem', '/usr/include/qt4', '-isystem', '/usr/X11R6/include' ]
qt_ldflags = [ '-m64', '-Wl,-O1', '-L/usr/lib/x86_64-linux-gnu', '-L/usr/X11R6/lib64', '-lQtSvg', '-lQtOpenGL', '-lQtGui', '-lQtCore', '-lGL', '-lpthread' ]
nogui = False

OK, that’s a very similar CPU to mine, it’s 64-bit, and has all the SSE4 extensions. MRtrix3 is compiled for a 64-bit architecture, everything seems to check out OK.

So the only thing I can think of now is that there might be a bug in the particular version of Eigen that you’re running: this is actually not their stable release version, but looks to me like their 3.3 beta. @NicholasDowson also reported issues compiling on 16.04 against that version of Eigen, and reverted back to the release version to build successfully. We issued a fix to compile on that version of Eigen only yesterday… But while it fixes the compilation issue, no one has actually verified that things worked properly with that version of Eigen…

So maybe your simplest bet is to follow the instructions we’d provided to use the stable release version of Eigen, see if that fixes the problem…

1 Like

I have the testing.log … but its 3000 lines. Should I post it or send it by mail.

Just post it enclosed in [code][/code] tags - as explained in detail in @ThijsDhollander’s formatting tips post. Thanks!