[visionegg] Re: segmentation fault
- From: Andrew Straw <astraw@xxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx, dick@xxxxxxxxxxxxxxx
- Date: Thu, 14 Oct 2004 10:47:57 -0700
Hi,
In Python, a seg fault is really bad -- it means something died at the C
level, which exactly what Python is supposed to insulate you from. So,
clearly there's something going on at a low level that's wrong. I'm not
sure this is a Vision Egg specific problem, but here's what I'd do.
First, check the usual suspects:
You don't have any binary Python modules/packages compiled for the wrong
version of Python do you? (You didn't copy site-packages/something from
a different version of Python or otherwise hope to mix-and-match between
precompiled binaries, did you?)
If you built some packages from source and then upgraded them, did you
clear out the previously installed binaries?
Finally, if the above all checks out, I hunt down seg faults by
bracketing the offending line with print statements and re-running the
code iteratively to home in on the single Python line. This is necessary
because the seg fault bypasses the normal Python exception handling
machinery. (Although pygame apparently tries to catch even these
problems, I don't understand the "pygame parachute" mechanism and
therefore I'm still a bit suspicious.)
If you can identify the exact line in Grating.py where the segfault
occurs, we have some hope. Line 307 of the most up-to-date Gratings.py
is a call to PyOpenGL's glTexImage1D. So that may put the blame on
PyOpenGL, but I can't understand why a call to glTexImage1D would do a
free().
If you find the problem, please let us know.
Your check_config list looks good.
Cheers!
Andrew
richard srebro wrote:
Trying to run grating I get a segmentation fault.
Running on FC2
This is the traceback
Pygame Parachute Traceback:
Segmentation fault
[dick@fovea dick]$ python grating.py
2004-10-07 13:42:58,003 (4768) INFO: Script grating.py started Vision
Egg 1.0-cvs with process id 4768.
2004-10-07 13:43:18,933 (4768) INFO: Requesting window 640 x 700 24 bpp
(8 8 8 0 RGBA).
2004-10-07 13:43:19,028 (4768) INFO: OpenGL 1.2 Mesa 5.0.2, Mesa DRI
Intel(R) 845G 20021115 x86/MMX+/SSE2, 2d3D, Inc
2004-10-07 13:43:19,032 (4768) INFO: Video system reports 32 bpp (8 8 8
8 RGBA).
2004-10-07 13:43:19,036 (4768) WARNING: Could not sync buffer swapping
to vblank because you are running linux but not known/supported drivers
(only nVidia and recent Mesa DRI Radeon currently supported).
Pygame Parachute Traceback:
File "/usr/lib/python2.3/site-packages/VisionEgg/Gratings.py", line
307, in __init__
free(): invalid pointer 0x9581468!
Segmentation fault
This is my config
[dick@fovea visionegg-1.0-cvs]$ python check-config.py
check-config.py for Vision Egg 1.0
[2003/09/22 05:37:03 CVS revision 1.20]
Beginning configuration check.
VisionEgg version 1.0-cvs
VisionEgg modules in /usr/lib/python2.3/site-packages/VisionEgg
VisionEgg system directory /usr/VisionEgg
VisionEgg user directory /home/dick/VisionEgg
Config file found at /usr/VisionEgg/VisionEgg.cfg
SYNCLYNC_PRESENT = 0
VISIONEGG_ALWAYS_START_LOGGING = 0
VISIONEGG_CONFIG_FILE = /usr/VisionEgg/VisionEgg.cfg
VISIONEGG_FRAMELESS_WINDOW = 0
VISIONEGG_FULLSCREEN = 0
VISIONEGG_GAMMA_FILE =
VISIONEGG_GAMMA_INVERT_BLUE = 2.1
VISIONEGG_GAMMA_INVERT_GREEN = 2.1
VISIONEGG_GAMMA_INVERT_RED = 2.1
VISIONEGG_GAMMA_SOURCE = none
VISIONEGG_GUI_INIT = 1
VISIONEGG_GUI_ON_ERROR = 1
VISIONEGG_HIDE_MOUSE = 0
VISIONEGG_LOG_FILE = VisionEgg.log
VISIONEGG_LOG_TO_STDERR = 1
VISIONEGG_MAXPRIORITY = 0
VISIONEGG_MONITOR_REFRESH_HZ = 200.0
VISIONEGG_PREFERRED_BPP = 24
VISIONEGG_REQUEST_ALPHA_BITS = 0
VISIONEGG_REQUEST_BLUE_BITS = 8
VISIONEGG_REQUEST_GREEN_BITS = 8
VISIONEGG_REQUEST_RED_BITS = 8
VISIONEGG_SCREEN_H = 480
VISIONEGG_SCREEN_W = 640
VISIONEGG_SYNC_SWAP = 1
VISIONEGG_SYSTEM_DIR = /usr/VisionEgg
VISIONEGG_TKINTER_OK = 1
VISIONEGG_USER_DIR = /home/dick/VisionEgg
Version checklist:
Python version 2.3.3 (OK)
extra Python info: (#1, May 7 2004, 10:31:40) [GCC 3.3.3 20040412 (Red
Hat Linux 3.3.3-7)]
Numeric version 23.1 (OK)
PyOpenGL (package "OpenGL") version 2.0.1.07 (OK)
pygame version 1.6 (OK)
Python Imaging Library (package "Image") version 1.1.4 (OK)
Optional module(s):
Pyro version 3.4 (OK)
Any help very much appreciated.
Thanks
Dick
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
--
Andrew D. Straw Post-doctoral scholar
,-. Dickinson Lab
\_/ California Institute of Technology
8||} Mailcode 138-78
/ \ Pasadena CA 91125, USA
`-^
email: astraw@xxxxxxxxxxx
office: +1 626 395 5828
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- References:
- [visionegg] segmentation fault
- From: richard srebro
Other related posts:
- » [visionegg] segmentation fault
- » [visionegg] Re: segmentation fault
Trying to run grating I get a segmentation fault. Running on FC2
This is the traceback
Pygame Parachute Traceback: Segmentation fault [dick@fovea dick]$ python grating.py 2004-10-07 13:42:58,003 (4768) INFO: Script grating.py started Vision Egg 1.0-cvs with process id 4768. 2004-10-07 13:43:18,933 (4768) INFO: Requesting window 640 x 700 24 bpp (8 8 8 0 RGBA). 2004-10-07 13:43:19,028 (4768) INFO: OpenGL 1.2 Mesa 5.0.2, Mesa DRI Intel(R) 845G 20021115 x86/MMX+/SSE2, 2d3D, Inc 2004-10-07 13:43:19,032 (4768) INFO: Video system reports 32 bpp (8 8 8 8 RGBA). 2004-10-07 13:43:19,036 (4768) WARNING: Could not sync buffer swapping to vblank because you are running linux but not known/supported drivers (only nVidia and recent Mesa DRI Radeon currently supported). Pygame Parachute Traceback: File "/usr/lib/python2.3/site-packages/VisionEgg/Gratings.py", line 307, in __init__ free(): invalid pointer 0x9581468! Segmentation fault
This is my config [dick@fovea visionegg-1.0-cvs]$ python check-config.py check-config.py for Vision Egg 1.0 [2003/09/22 05:37:03 CVS revision 1.20] Beginning configuration check. VisionEgg version 1.0-cvs
VisionEgg modules in /usr/lib/python2.3/site-packages/VisionEgg VisionEgg system directory /usr/VisionEgg VisionEgg user directory /home/dick/VisionEgg
Config file found at /usr/VisionEgg/VisionEgg.cfg
SYNCLYNC_PRESENT = 0 VISIONEGG_ALWAYS_START_LOGGING = 0 VISIONEGG_CONFIG_FILE = /usr/VisionEgg/VisionEgg.cfg VISIONEGG_FRAMELESS_WINDOW = 0 VISIONEGG_FULLSCREEN = 0 VISIONEGG_GAMMA_FILE = VISIONEGG_GAMMA_INVERT_BLUE = 2.1 VISIONEGG_GAMMA_INVERT_GREEN = 2.1 VISIONEGG_GAMMA_INVERT_RED = 2.1 VISIONEGG_GAMMA_SOURCE = none VISIONEGG_GUI_INIT = 1 VISIONEGG_GUI_ON_ERROR = 1 VISIONEGG_HIDE_MOUSE = 0 VISIONEGG_LOG_FILE = VisionEgg.log VISIONEGG_LOG_TO_STDERR = 1 VISIONEGG_MAXPRIORITY = 0 VISIONEGG_MONITOR_REFRESH_HZ = 200.0 VISIONEGG_PREFERRED_BPP = 24 VISIONEGG_REQUEST_ALPHA_BITS = 0 VISIONEGG_REQUEST_BLUE_BITS = 8 VISIONEGG_REQUEST_GREEN_BITS = 8 VISIONEGG_REQUEST_RED_BITS = 8 VISIONEGG_SCREEN_H = 480 VISIONEGG_SCREEN_W = 640 VISIONEGG_SYNC_SWAP = 1 VISIONEGG_SYSTEM_DIR = /usr/VisionEgg VISIONEGG_TKINTER_OK = 1 VISIONEGG_USER_DIR = /home/dick/VisionEgg
Version checklist:
Python version 2.3.3 (OK) extra Python info: (#1, May 7 2004, 10:31:40) [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] Numeric version 23.1 (OK) PyOpenGL (package "OpenGL") version 2.0.1.07 (OK) pygame version 1.6 (OK) Python Imaging Library (package "Image") version 1.1.4 (OK)
Optional module(s):
Pyro version 3.4 (OK)
Any help very much appreciated.
Thanks
Dick
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
====================================== The Vision Egg mailing list Archives: http://www.freelists.org/archives/visionegg Website: http://www.visionegg.org/mailinglist.html
- [visionegg] segmentation fault
- From: richard srebro