Correction switching to mesa 3d libraries without dri acceleration and
glx support will cause this segmentation fault (more specifically the
ubuntu libgl1-mesa-swx11 package.) Without glx and dri, pyglet because
unuseable so this is still a very big bug. I got the newest dri
enabled libraries and we still have the bug albeit without so many
segmentation fault issues. So as far as I know the problem stems from
glXMakeCurrent, it returns false. This page shows that there are a
number of ways this call can fail:
http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/glx/xmakecurrent.html.
Unfortunately my belief is that that errors are stored in the same
queue that is queried by glGetError. This is unfortunate because the
actions of glGetError are undefined until a context is made current,
meaning that there seems to be know way to find out why this device
context is actually failing. I have a new backtrace with MESA_DEBUG
set to true and LIBGL_DEBUG set to verbose, doesn't really show
anything but might be interesting to somebody down the line I suppose.
libGL: XF86DRIGetClientDriverName: 5.3.0 r200 (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/r200_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 5, (OK)
drmOpenByBusid: drmOpenMinor returns 5
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL error:
Can't open configuration file /etc/drirc: No such file or directory.
libGL error:
Can't open configuration file /home/sean/.drirc: No such file or directory.
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
compression/decompression unavailable
Mesa warning: GL User Error: called without context: GetString
Mesa warning: GL User Error: called without context: GetError
Mesa warning: GL User Error: called without context: GetString
Mesa warning: GL User Error: called without context: GetError
Mesa warning: GL User Error: called without context: GetString
Mesa warning: GL User Error: called without context: GetError
Mesa warning: GL User Error: called without context: GetString
Mesa warning: GL User Error: called without context: GetError
Traceback (most recent call last):
File "pyglet_example.py", line 5, in <module>
win = window.Window(width=768, height=768)
File "/usr/local/lib/python2.6/dist-packages/pyglet/__init__.py",
line 307, in __getattr__
__import__(import_name)
File "/usr/local/lib/python2.6/dist-packages/pyglet/window/__init__.py",
line 1682, in <module>
gl._create_shadow_window()
File "/usr/local/lib/python2.6/dist-packages/pyglet/gl/__init__.py",
line 491, in _create_shadow_window
_shadow_window = Window(width=1, height=1, visible=False)
File "/usr/local/lib/python2.6/dist-packages/pyglet/window/xlib/__init__.py",
line 474, in __init__
super(XlibWindow, self).__init__(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/pyglet/window/__init__.py",
line 686, in __init__
self._create()
File "/usr/local/lib/python2.6/dist-packages/pyglet/window/xlib/__init__.py",
line 683, in _create
self.switch_to()
File "/usr/local/lib/python2.6/dist-packages/pyglet/window/xlib/__init__.py",
line 781, in switch_to
self._context.set_current()
File "/usr/local/lib/python2.6/dist-packages/pyglet/gl/__init__.py",
line 344, in set_current
setattr(self, attr, check(self._info))
File "/usr/local/lib/python2.6/dist-packages/pyglet/gl/__init__.py",
line 317, in <lambda>
lambda info: ('ATI' in info.get_renderer() and
TypeError: argument of type 'NoneType' is not iterable
On Sat, May 30, 2009 at 2:34 AM, Shawn Krisman <[email protected]> wrote:
>
> switching to the new mesa3d libraries provided by karmic fixed it for me.
>
> On Fri, May 29, 2009 at 11:59 PM, Shawn Krisman <[email protected]>
> wrote:
>>
>> Yeap, I tried a program where a context was created and glGetError() was
>> called and it worked fine. The reason I tried this was because when I call
>> gl.glGetError inside of the python code I also got a segmentation fault. Now
>> it makes sense since the context was never made current. I see that the
>> pyglet checks to see if there was opengl errors automatically. Now i'm very
>> confused, because glMakeCurrent returned zero, but glGetError did not detect
>> anything. Anything else I can do?
>>
>> On Fri, May 29, 2009 at 11:26 PM, Tristam MacDonald <[email protected]>
>> wrote:
>>>
>>> On Fri, May 29, 2009 at 11:18 PM, Shawn Krisman <[email protected]>
>>> wrote:
>>>>
>>>> The problem seems to run alot deeper than pyglet, probably as expected.
>>>> This guy:
>>>>
>>>> #include <GL/glx.h>
>>>> #include <GL/gl.h>
>>>>
>>>> int main(int argc, char* argv[]) {
>>>> glGetError();
>>>> return 0;
>>>> }
>>>>
>>>> causes a segmentation fault on my computer. I feel like the issue is
>>>> related to drivers, but i'm not sure who to write a bug report too.
>>>
>>> That particular program is all but guaranteed to segfault. No OpenGL
>>> functions are allowed to be called until a valid context is made current.
>>> --
>>> Tristam MacDonald
>>> http://swiftcoder.wordpress.com/
>>>
>>> >>>
>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---