Mrview in Unbuntu 18.04 not working

I used MRtrix3 to do tractography, it went well. But after download freesurfer add recon-all, mrview cannot open again(not sure whether this was the reason). the error keeps:

mrview: [WARNING] unable to determine OpenGL version - operation may be unstable if actual version is less than 3.3
QOpenGLFramebufferObject: Unsupported framebuffer format.

mrview: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access

when I tried mrview -debug, it shows :

mrview: [DEBUG] No config file found at "/etc/mrtrix.conf"
mrview: [DEBUG] No config file found at "/home/dacaia/.mrtrix.conf"
mrview: [INFO] GL renderer: softpipe
mrview: [INFO] GL version: 1.4 (3.3 (Compatibility Profile) Mesa 21.0.0-devel (git-8f342ce8b0))
mrview: [INFO] GL vendor: Mesa/X.org
mrview: [WARNING] unable to determine OpenGL version - operation may be unstable if actual version is less than 3.3
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
QOpenGLFramebufferObject: Unsupported framebuffer format.
mrview: [SYSTEM FATAL CODE: SIGSEGV (11)] Segmentation fault: Invalid memory access

I am not sure whatā€™s going on and checked Qt, OpenGL and X11.

1.For the Qt, I reinstall it twice and in the config file, it shows nothing wrong in Qt.

MRtrix build type requested: release version
Detecting OS: linux
Looking for compiler [clang++]: clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Checking for C++11 compliance: ok
Checking shared library generation: ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: ok
Checking for non-POD variable-length array support: ok
Checking for ::max_align_t: 16 bytes
Checking for std::max_align_t: 16 bytes
Checking for Eigen3 library: 3.3.4
Checking for Eigen3 Unsupported: Present
Checking for zlib compression library: 1.2.11
Checking for "JSON for Modern C++" requirements: ok
Checking for TIFF library: LIBTIFF, Version 4.0.9
Checking for PNG library: Header: 1.6.34; library: 1.6.34
Checking for FFTW library: fftw-3.3.7-sse2-avx
Checking for Qt moc: moc (version 5.14.0)
Checking for Qt qmake: qmake (version 5.14.0)
Checking for Qt rcc: rcc (version 5.14.0)
Checking for Qt: 5.14.0

writing configuration to file './config': ok
  1. For the OpenGL, I updated display driver, and also try to install in another computer, keep the same error.

  2. I tried change Vcxstv to Xming, or select native OpenGL (fsl installation recommend to cancel this) and allow public access, the mrview window shows but cannot do any operation. The error is:

QOpenGLWidget: Failed to make context current
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed

so weird about this. Does anyone know how to deal with that?

Best,
Ting

Hello,

Does setting this variable help?

export LIBGL_ALWAYS_INDIRECT=0

Cheers,
Nick

Thanks for the quick response, Nick! I tried this but keep the same error for OpenGL thing.

Updateļ¼I reinstall many times without fsl. Mrview finally works!!

1 Like