From: Lars Bruno Hansen (lhansen_at_fysik.dtu.dk)
Date: Thu Nov 13 2003 - 09:51:13 CST

John Stone wrote:

>Lars,
> Interesting, looks like some sort of Evil occured inside of Python/VTK
>once it started up. The only change I made to VMD was to add a bit of
>state tracking code and force it to call glXMakeCurrent() right before
>it executes any OpenGL commands. I'm wondering if VTK lacks its own
>matching calls and is seg faulting because it is then accessing VMD's
>OpenGL state (textures, vertex arrays, various things that could annihilate
>and unsuspecting OpenGL program...)
>
>Do you know if this Python VTK module has been made to get along with any
>other OpenGL code besides VMD? Its possible that BOTH VMD and VTK would
>require modifications to get them to work together in concert. While I can
>easily make VMD more mindful of its own OpenGL state, I'm not sure what to
>suggest if the crash is occuring inside of VTK or Python.
>
>In order to track the lost console messages you mentioned, try doing this
>when you run VMD next time:
> source /usr/local/bin/vmd (starts up as usual)
> quit (quit that VMD, just needed the env settings
> for the next run)
> /usr/local/lib/vmd/vmd_LINUX
>
>Once you start it manually as shown, rather than starting a separate xterm
>for the VMD console, you'll get all of the VMD output in the window you
>run that command from, so that when you re-test VTK and the crash occurs,
>you'll be able to see what console messages were printed. Give that a try
>and let me know what happens.
>
>
Dear John

Thanks, using this I get:
Fatal Python error: PyEval_RestoreThread: NULL tstate
Abort (core dumped)

I am not sure if the VTK module are designed to run with another OpenGL
session, I have been searching for this information, but have failed
to find anything.
VTK is running in a tkinter window. You can open several of these
windows from the same python session, but I am not sure if this imply that
another OpenGL session can run in the same thread,

with best regards
Lars

-- 
Lars Bruno Hansen, 
CAMP, Dept. of Physics, Building 307, DTU, DK-2800 Lyngby, Denmark
Phone: +45 45 25 32 16  Fax: +45 45 93 23 99
E-mail: lhansen_at_fysik.dtu.dk