Segmentation fault in opengl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenFovea |
New
|
Medium
|
Unassigned |
Bug Description
There is a segmentation fault if you test fovea_toolbox/
The error is on line 229 in opengl.py (call to pcolor), but may be elsewhere, as segmentation faults can have multiple causes. It seems my version of matplotlib is a newer one : 0.99.3-1ubuntu1 (on ubuntu 10.10), which may be an explanation.
I have run the script through the GDB debugger, here is the complete log of the crash which may help us :
#0 0x00007fffebb09224 in __cxa_allocate_
#1 0x00007fffe81cbaf4 in py_to_agg_
from /usr/lib/
#2 0x00007fffe81d58fb in _path_module:
from /usr/lib/
#3 0x00007fffe81e08a7 in Py::ExtensionMo
#4 0x00007fffe81c8480 in method_
#5 0x00000000004a51ae in PyEval_EvalFrameEx ()
#6 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#7 0x00000000004a4d59 in PyEval_EvalFrameEx ()
#8 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#9 0x00000000004a4d59 in PyEval_EvalFrameEx ()
#10 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#11 0x00000000004a4d59 in PyEval_EvalFrameEx ()
#12 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#13 0x0000000000535c4d in ?? ()
#14 0x000000000041c9d7 in PyObject_Call ()
#15 0x00000000004a38a1 in PyEval_EvalFrameEx ()
#16 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#17 0x00000000004a4d59 in PyEval_EvalFrameEx ()
#18 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#19 0x0000000000535b50 in ?? ()
#20 0x000000000041c9d7 in PyObject_Call ()
#21 0x000000000042570f in ?? ()
#22 0x000000000041c9d7 in PyObject_Call ()
#23 0x000000000047552f in ?? ()
#24 0x000000000046cd9f in ?? ()
#25 0x000000000041c9d7 in PyObject_Call ()
#26 0x00000000004a48c8 in PyEval_EvalFrameEx ()
#27 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#28 0x0000000000535c4d in ?? ()
#29 0x000000000041c9d7 in PyObject_Call ()
#30 0x000000000042570f in ?? ()
#31 0x000000000041c9d7 in PyObject_Call ()
#32 0x000000000047552f in ?? ()
#33 0x000000000046cd9f in ?? ()
#34 0x000000000041c9d7 in PyObject_Call ()
#35 0x00000000004a48c8 in PyEval_EvalFrameEx ()
#36 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#37 0x00000000004a4d59 in PyEval_EvalFrameEx ()
#38 0x00000000004a6bd1 in PyEval_EvalCodeEx ()
#39 0x00000000004a6ca2 in PyEval_EvalCode ()
#40 0x00000000004c702e in PyRun_FileExFlags ()
#41 0x00000000004c7244 in PyRun_SimpleFil
#42 0x00000000004180c1 in Py_Main ()
#43 0x00007ffff69dad8e in __libc_start_main () from /lib/libc.so.6
#44 0x00000000004172c9 in _start ()
Changed in openfovea: | |
importance: | Undecided → Medium |
I was able to make a minimalist test case for this bug :
import numpy numpy.array( [[1, 1],[1, 1]]))
from OpenGL.GL import *
from OpenGL.GLUT import *
from OpenGL.GLU import *
from matplotlib.pylab import pcolor
pcolor(
The segfault disappears if I put the 3 OpenGL imports after the matplotlib import !
BUT :
- If I add : from gtk.gtkgl.apputils import * at the top (before the other imports), the segfault reappears.
- If I add this line after the imports, I get a new type of error :
Traceback (most recent call last): numpy.array( [[1, 1],[1, 1]])) pymodules/ python2. 6/matplotlib/ pyplot. py", line 2077, in pcolor pymodules/ python2. 6/matplotlib/ pyplot. py", line 582, in gca pymodules/ python2. 6/matplotlib/ pyplot. py", line 276, in gcf pymodules/ python2. 6/matplotlib/ pyplot. py", line 254, in figure pymodules/ python2. 6/matplotlib/ backends/ backend_ tkagg.py" , line 91, in new_figure_manager gg(figure, master=window) pymodules/ python2. 6/matplotlib/ backends/ backend_ tkagg.py" , line 159, in __init__ _tkcanvas. create_ image(w/ 2, h/2, image=self. _tkphoto) python2. 6/lib-tk/ Tkinter. py", line 2159, in create_image 'image' , args, kw) python2. 6/lib-tk/ Tkinter. py", line 2150, in _create
File "test.py", line 12, in <module>
pcolor(
File "/usr/lib/
ax = gca()
File "/usr/lib/
ax = gcf().gca(**kwargs)
File "/usr/lib/
return figure()
File "/usr/lib/
**kwargs)
File "/usr/lib/
canvas = FigureCanvasTkA
File "/usr/lib/
self.
File "/usr/lib/
return self._create(
File "/usr/lib/
*(args + self._options(cnf, kw))))
_tkinter.TclError: bad screen distance "320.0"
I didn't know that the import order was important. But I think there is something really messed up in the imports.
FYI I did test the code on another PC, same thing.
Do we have the same Python Version ? I have the 2.6.6-2ubuntu2 version.