Print

Print


Thank so much Paul, this works and performance is great!

From: FSL - FMRIB's Software Library <[log in to unmask]> On Behalf Of Paul McCarthy
Sent: Monday, October 23, 2023 9:50 AM
To: [log in to unmask]
Subject: Re: [FSL] FSLeyes doesn't start, "Segmentation fault"

Hi Tanja,

Can you try running this in a terminal:

unset LIBGL_ALWAYS_INDIRECT
export LIBGL_ALWAYS_SOFTWARE=1

And then try running glxgears and FSLeyes.

I'm guessing you're using the Wayland server that is built into WSL2. I have seen a few instances where attempting to use the graphics card results in segmentation faults, so in these instances software-based rendering is the only option. If this works, you can add the unset/export lines at the bottom of your ~/.bashrc file.

If the above doesn't work, or results in very poor performance in FSLeyes, another option is to try a different X server such as vcxsrv or mobaxterm.

Paul
________________________________
From: FSL - FMRIB's Software Library <[log in to unmask]<mailto:[log in to unmask]>> on behalf of Tatjana Schmidt <[log in to unmask]<mailto:[log in to unmask]>>
Sent: 20 October 2023 16:16
To: [log in to unmask]<mailto:[log in to unmask]> <[log in to unmask]<mailto:[log in to unmask]>>
Subject: Re: [FSL] FSLeyes doesn't start, "Segmentation fault"


Hi Paul,



Thank you for the ideas! I'm not sure about the Wayland server, when I run



"loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type"



 I get "Type=tty".





LIBGL_ALWAYS_INDIRECT or LIBGL_ALWAYS_SOFTWARE weren't in my bash profile in the first place, I tried adding



unset LIBGL_ALWAYS_INDIRECT

glxinfo

glxgears



and



export LIBGL_ALWAYS_INDIRECT=1

glxinfo

glxgears



but neither worked: For the first version, once I change bashrc I get a long output that starts with "name of display: :0" and ends with "Segmentation fault" (I attached the output here), and when I then run fsleyes I get the same segmentation fault error message I got initially. For the second version, after changing bashrc I  get



name of display: :0

X Error of failed request:  BadValue (integer parameter out of range for operation)

  Major opcode of failed request:  148 (GLX)

  Minor opcode of failed request:  24 (X_GLXCreateNewContext)

  Value in failed request:  0x0

  Serial number of failed request:  58

  Current serial number in output stream:  59

Error: glXCreateContext failed



...and then once I run fsleyes I get



tanja@LAPTOP-PRVNU0UE:~$ fsleyes

 WARNING              idle.py  578: __idleLoop      - Idle task create crashed - wxAssertionError: C++ assertion ""tempContext"" failed at /home/conda/feedstock_root/build_artifacts/wxpython_1689356204926/work/ext/wxWidgets/src/unix/glx11.cpp(498) in wxGLContext(): glXCreateContext failed

Traceback (most recent call last):

  File "/home/tanja/fsl/lib/python3.11/site-packages/fsl/utils/idle.py", line 576, in __idleLoop

    task.task(*task.args, **task.kwargs)

  File "/home/tanja/fsl/lib/python3.11/site-packages/fsleyes/gl/__init__.py", line 742, in create

    self.__createWXGLContext(requestVersion=requestVersion)

  File "/home/tanja/fsl/lib/python3.11/site-packages/fsleyes/gl/__init__.py", line 975, in __createWXGLContext

    ctx = wxgl.GLContext(self.__canvas, **candidate)

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

wx._core.wxAssertionError: C++ assertion ""tempContext"" failed at /home/conda/feedstock_root/build_artifacts/wxpython_1689356204926/work/ext/wxWidgets/src/unix/glx11.cpp(498) in wxGLContext(): glXCreateContext failed





From: FSL - FMRIB's Software Library <[log in to unmask]<mailto:[log in to unmask]>> On Behalf Of Paul McCarthy
Sent: Friday, October 20, 2023 9:29 AM
To: [log in to unmask]<mailto:[log in to unmask]>
Subject: Re: [FSL] FSLeyes doesn't start, "Segmentation fault"



Hi Tanja,



What X/Wayland server are you using? Can you try different values for the LIBGL_ALWAYS_INDIRECT and LIBGL_ALWAYS_SOFTWARE variables? They should be in your ~/.bashrc file. You can find some more details in the FSLeyes documentation at https://open.win.ox.ac.uk/pages/fsl/fsleyes/fsleyes/userdoc/troubleshooting.html#ssh-x11-vnc-nomachine-etc-fsleyes-won-t-start



Paul





________________________________

From: FSL - FMRIB's Software Library <[log in to unmask]<mailto:[log in to unmask]>> on behalf of Tatjana Schmidt <[log in to unmask]<mailto:[log in to unmask]>>
Sent: 19 October 2023 10:31
To: [log in to unmask]<mailto:[log in to unmask]> <[log in to unmask]<mailto:[log in to unmask]>>
Subject: [FSL] FSLeyes doesn't start, "Segmentation fault"



Hi everyone,

I have a problem with opening FSLeyes, I'm using WSL2 and when I run "fsleyes" from the terminal it returns "/home/tanja/fsl/share/fsl/bin/fsleyes: line 2:  1353 Segmentation fault      /home/tanja/fsl/bin/python3.11 -I /home/tanja/fsl/bin/fsleyes "$@"", the number after "line 2" is a different one every time and I can't figure out what is wrong. I've seen this issue being discussed here a while ago but I didn't quite understand how it was resolved in the end. Does anyone have an idea what I could try?

Thanks a lot!
Tanja

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1

This message was issued to members of www.jiscmail.ac.uk/FSL<http://www.jiscmail.ac.uk/FSL>, a mailing list hosted by www.jiscmail.ac.uk<http://www.jiscmail.ac.uk/>, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/



________________________________

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1

________________________________

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1

________________________________

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1

This message was issued to members of www.jiscmail.ac.uk/FSL, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/