[ pyopengl-Bugs-2965754 ] Loading textures from another thread causes segfault

"SourceForge.net" <[email protected]> Mon, 08 Mar 2010 23:08:43 +0000
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #2965754, was opened at 2010-03-09 00:08
Message generated for change (Tracker Item Submitted) made by 
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2965754&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: v3.0.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Miguel Perez ()
Assigned to: Nobody/Anonymous (nobody)
Summary: Loading textures from another thread causes segfault

Initial Comment:
Whenever I try to load or unload textures from a different thread than the main one, I get a segmentation fault in an PyOpenGL call, even if PyOpenGL calls are properly protected by locking. Loading and unloading textures from a different thread is necessary for my project, a high-performance image viewer.

I'm using PyOpenGL 3.0.1~b2-1 with PyGame 1.8.1release-1.1+b1 from Debian Sid with an nVidia graphics card with the official driver (190.53) on GNU/Linux 2.6.31. I've also verified the problem with PyOpenGL and PyGame in Ubuntu GNU/Linux 8.04 Hardy with the official stable packages using an ATi embedded graphics card with the free software ati driver.

I've crafted a program to demonstrate it, which I'm attaching to this bug in tar+gzip format. Upon uncompressing the file you'll get a directory; inside it you'll find a Python program and a PNG image it'll load. First it'll load and move it around for 4 seconds in the main thread, which you'll see working fine. Then it'll do exactly the same, only the image is loaded in a second thread and shared with the first one. Before the first thread resumes control, however, it'll crash, right in glGenTextures.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=2965754&group_id=5988

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net