View Full Version : threaded apps with openGl & tcl-tk

03-13-2003, 07:25 AM
I wrote a tcl package in C. This package uses linux threads (pthreads). If I load the package and at the same time use another package based on openGL (for example togl) I get segmentation fault. My system is running Gnu-Linux RedHat 7.3 and I use the nvidia drivers version 3123.

Does anyone know if it is possible (and how) to combine multithreaded apps with openGL apps in tcl?
Thank you!


This is what I get using gdb:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 13175)]
0x409d4102 in glGetError () from /usr/lib/libGL.so.1

or in other cases

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 13647)]
0x40337788 in __nvsym17113 () from /usr/lib/libGL.so.1

and the backtrace:

#0 0x40337788 in __nvsym17113 () from /usr/lib/libGL.so.1
#1 0x4015f710 in __DTOR_END__ () from ./togl.so
#2 0x0805b0e8 in ?? ()
#3 0x080bc2c8 in ?? ()
Cannot access memory at address 0x2

03-14-2003, 08:03 AM
I've done some other attempts:
- pthread with tcl: OK
- openGL with tcl: OK
- pthread with openGL (in C): OK
- pthread and openGL in the same C app, but called from tcl: BAD!
- pthread in one C app and openGL in
another, but both called from tcl: BAD!
- same thing but creating two different interpretes in tcl: BAD!

I don't know what I should do now. If someone knows of a forum that might be more suitable for this kind of posts, please tell me.