python2.6 crashed with SIGSEGV in glGetError()

Bug #408212 reported by arky
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
pyopengl (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: python2.6

Crashes on running the following script.

ProblemType: Crash
Architecture: i386
CrashCounter: 1
Date: Mon Aug 3 11:14:52 2009
Dependencies:
 findutils 4.4.2-1
 gcc-4.4-base 4.4.1-1ubuntu1
 libc6 2.9-23ubuntu1
 libgcc1 1:4.4.1-1ubuntu1
 zlib1g 1:1.2.3.3.dfsg-13ubuntu1
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/python2.6
Package: python2.6-minimal 2.6.2-0ubuntu3
ProcCmdline: python opengl-text.py
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-4.23-generic
SegvAnalysis:
 Segfault happened at: 0x32d1e6 <glGetError+6>: jmp *0x414(%eax)
 PC (0x0032d1e6) ok
 source "*0x414(%eax)" (0x1000003cc) not located in a known VMA region (needed readable region)!
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: python2.6
StacktraceTop:
 glGetError () from /usr/lib/libGL.so.1
 ffi_call_SYSV ()
 ffi_call (cif=0xbfc16fe0, fn=0x32d1e0 <glGetError>,
 _call_function_pointer (pProc=0x32d1e0 <glGetError>,
 _CallProc (pProc=0x32d1e0 <glGetError>, argtuple=0xb804902c,
Title: python2.6 crashed with SIGSEGV in glGetError()
Uname: Linux 2.6.31-4-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev pulse video

Revision history for this message
arky (arky) wrote :
visibility: private → public
Revision history for this message
arky (arky) wrote :

Here the correct script that produced the bug and the stacktrace

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt (retraced)

StacktraceTop:glGetError () from /usr/lib/libGL.so.1
ffi_call_SYSV ()
ffi_call () from /usr/lib/python2.6/lib-dynload/_ctypes.so
_CallProc () from /usr/lib/python2.6/lib-dynload/_ctypes.so
?? () from /usr/lib/python2.6/lib-dynload/_ctypes.so

Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt (retraced)
Changed in python2.6 (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
tfmoraes (tfmoraes) wrote : Re: [karmic] python2.6 crashed with SIGSEGV in glGetError()
Revision history for this message
tfmoraes (tfmoraes) wrote :

I posted a simpler python script. I tried to run the this script with the last ubuntu 9.10 alpha version using a intel 965 and a nvidia 8600 GT with driver nv and the same error occurs. Then I tried with the proprietary nvidia driver and the error doesn't occurs. I think the error is in libgl1-mesa-glx. In Fedora 11 with mesa-7.6 version, this doesn't occurs too.

arky (arky)
summary: - [karmic] python2.6 crashed with SIGSEGV in glGetError()
+ python2.6 crashed with SIGSEGV in glGetError()
Revision history for this message
tfmoraes (tfmoraes) wrote :

Ubuntu 9.04 and 9.10 64 bits don't have this problem.

Revision history for this message
Matthias Klose (doko) wrote :

reassigning to python-opengl.

on amd64:

$ python crash_opengl.py
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
GLUT font error 'NoneType' object has no attribute '_handle'
Traceback (most recent call last):
  File "crash_opengl.py", line 4, in <module>
    glutInit([''])
  File "/usr/lib/pymodules/python2.6/OpenGL/GLUT/special.py", line 316, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
TypeError: 'NoneType' object is not callable

on i386:
Program received signal SIGSEGV, Segmentation fault.
0x008cc216 in glGetError () from /usr/lib/libGL.so.1
(gdb) bt
#0 0x008cc216 in glGetError () from /usr/lib/libGL.so.1
#1 0x00edce7f in ffi_call_SYSV () at /build/buildd/python2.6-2.6.2/Modules/_ctypes/libffi/src/x86/sysv.S:61
#2 0x00edccac in ffi_call (cif=0xbfffea30, fn=0x8cc210 <glGetError>, rvalue=0xbfffe9c0, avalue=0xbfffe9a0)
    at /build/buildd/python2.6-2.6.2/Modules/_ctypes/libffi/src/x86/ffi.c:213
#3 0x00ed729d in _call_function_pointer (pProc=0x8cc210 <glGetError>, argtuple=0xb7fa902c, flags=<value optimized out>, argtypes=0x0,
    restype=0x833d084, checker=0x0) at /build/buildd/python2.6-2.6.2/Modules/_ctypes/callproc.c:815
#4 _CallProc (pProc=0x8cc210 <glGetError>, argtuple=0xb7fa902c, flags=<value optimized out>, argtypes=0x0, restype=0x833d084, checker=0x0)
    at /build/buildd/python2.6-2.6.2/Modules/_ctypes/callproc.c:1162

affects: python2.6 (Ubuntu) → pyopengl (Ubuntu)
Changed in pyopengl (Ubuntu):
status: New → Confirmed
Revision history for this message
amdlin (amdlintuxos) wrote :

This bug affects me too.

usver@eee-pc-901:~/Documents/python/pygame/pyopenGL/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/GLUT$ python ./gears.py
Traceback (most recent call last):
  File "./gears.py", line 258, in <module>
    glutInit(sys.argv)
  File "/usr/local/lib/python2.6/dist-packages/PyOpenGL-3.0.1b2-py2.6.egg/OpenGL/GLUT/special.py", line 323, in glutInit
    _base_glutInit( ctypes.byref(count), holder )
TypeError: 'NoneType' object is not callable
usver@eee-pc-901:~/Documents/python/pygame/pyopenGL/PyOpenGL-Demo-3.0.1b1/PyOpenGL-Demo/GLUT$

Revision history for this message
amdlin (amdlintuxos) wrote :

Sorry forgot to mention coniguration:
Ubuntu 9.10, i386, asus eee-901 laptop

Revision history for this message
amdlin (amdlintuxos) wrote :

me again, i don't know is this fix or not, but now it works for me.
all that i did is just installed

Installed the following packages:
freeglut3 (2.4.0-9)
glutg3 (3.7-25)
libglut3 (3.7-25)

Hope that will help others
Now demos from pyopengl works!

Revision history for this message
Davide Aversa (thek3nger) wrote :

Python crash with SIGSEV on my pc too. It happens with all OpenGL/GLUT script. For example:

from OpenGL.GLUT import *
from OpenGL.GL import *

def init():
    glClearColor(0,0,0,0)
    glMatrixMode(GL_PROJECTION)
    glLoadIdentity()
    glOrtho(0,1,0,1,-1,1)

def display():
    glClear(GL_COLOR_BUFFER_BIT)
    glColor3f(1,1,1)
    glBegin(GL_POLYGON)
    glVertex3f(0.25, 0.25, 0)
    glVertex3f(0.75, 0.25, 0)
    glVertex3f(0.75, 0.75, 0)
    glVertex3f(0.25, 0.75, 0)
    glEnd()
    glFlush()

if __name__ == '__main__' :
    glutInit()
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)
    glutInitWindowSize(250, 250)
    glutInitWindowPosition(100, 100)
    glutCreateWindow("Hello World")
    init()
    glutDisplayFunc(display)
    glutMainLoop()

Revision history for this message
dino99 (9d9) wrote :

This version is outdated and no more supported

Changed in pyopengl (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.