Dear Surfers,

I am trying to launch tksurfer/tkmedit in the stable 5_0_0 environment in the Martinos network, but this fails with glut segmentation errors. FS version 6 tksurfer works on the same machine and data, but I need to create some figures that match version 5. We already tried with a different user and a few years older linux box, same issues. Any suggestions would be greatly appreciated! 
For example, is there a variable that we could set to point to an older OpenGL version? 
(My LD_LIBRARY_PATH has not been set, and my PATH does not include anything pointing to /usr/lib or /usr/lib64)

Details:

on machine rukki (locally at terminal):

setenv USE_STABLE_5_0_0
source /usr/local/freesurfer/nmr-stable50-env
cd $MY_SUBJECTS_DIR

Checking version:
freesurfer
...
You are running this version of FreeSurfer:
  freesurfer-Linux-centos4_x86_64-stable-v5.0.0-20110319

echo $FREESURFER_HOME
/usr/local/freesurfer/stable5_0_0

cp -r $FREESURFER_HOME/subjects/fsaverage $MY_SUBJECTS_DIR/.
chmod -R 777 fsaverage

[rukki:sphsm10-ffx] (nmr-stable5.0-env) tksurfer fsaverage lh inflated

subject is fsaverage
hemi    is lh
surface is inflated
surfer: current subjects dir: <$MY_SUBJECTS_DIR>
surfer: not in "scripts" dir ==> using cwd for session root
surfer: session root data dir ($session) set to:
surfer:     <$MY_SUBJECTS_DIR>
Reading image info <$MY_SUBJECTS_DIR>/fsaverage)
Reading <$MY_SUBJECTS_DIR>/fsaverage/mri/orig.mgz
surfer: Reading header info from /<$MY_SUBJECTS_DIR>/fsaverage/mri/orig.mgz
[rukki:sphsm10-ffx] (nmr-stable5.0-env)

... after which there is no screen output. The file xdebug_tksurfer was generated:

[rukki:sphsm10-ffx] (nmr-stable5.0-env) more .xdebug_tksurfer

Segfault
Initializing glut
xDebug stack (length: 1)
  00: 
  00: Initializing glut

Segfault
Initializing glut
[rukki:sphsm10-ffx] (nmr-stable5.0-env)

[rukki:sphsm10-ffx] (nmr-stable5.0-env) echo $DISPLAY
:3

setenv DISPLAY :0 does not fix the issue (results in GLUT: Fatal Error in tksurfer.bin: could not open display: 0)

I also tried fsaverage4, fsaverage5, fsaverage6, and bert, copied from the same folder into my $SUBJECTS_DIR, same result.

The issue is not specific to tksurfer:

tkmedit -f fsaverage/mri/T1.mgz


===================================
ERROR: A segfault has occurred. This is not your fault,
  : but is most likely an unrecoverable error and has
  : made the program unstable.
  :
  : Please send the contents of the file .xdebug_tkmedit
  : that should be in this directory to freesurfer@nmr.mgh.harvard.edu
  :
  : Now exiting...
  :
[rukki:sphsm10-ffx] (nmr-stable5.0-env)

more .xdebug_tkmedit
tkmedit started: Wed Aug  7 16:54:21 2024

      tkmedit.bin -f fsaverage/mri/T1.mgz 

$Id: tkmedit.c,v 1.341.2.1 2010/08/04 20:47:28 greve Exp $ $Name: stable5_0_0 $
Set user home dir to ($MY_SUBJECTS_DIR)
Set subject home dir to fsaverage/mri/T1.mgz

Segfault
Importing volume with MRIread
xDebug stack (length: 5)
          04: Volm_ImportData( this=0x3447db0, isSource=./fsaverage/mri/T1.mgz )
          04: Importing volume with MRIread
        03: LoadVolume( iType=0, isName=fsaverage/mri/T1.mgz, ibConform = 0 )
        03: Reading data into volume
      02: ParseCmdLineArgs( argc=3, argv=tkmedit.bin )
      02: Loading volume fsaverage/mri/T1.mgz
    01: main()
    01: Parsing command line arguments
  00: 
  00: 
[rukki:sphsm10-ffx] (nmr-stable5.0-env)

My OpenGL version:
[rukki:sphsm10-ffx] (nmr-stable5.0-env) glxinfo | grep "OpenGL version"
OpenGL version string: 4.6.0 NVIDIA 550.54.14
The other machine we tried had OpenGL version 4.6.0 NVIDIA 535.54.03

Thank you!

Best regards,

Tommi


---
Tommi Raij, MD, PhD
Director, TMS Clinical Research
MGH/MIT Athinoula A. Martinos Center for Biomedical Imaging
Bldg 149, 13th st
Charlestown, MA 02129