Reproducible Segfault

Issue #297 resolved
Xander Dunn
created an issue

Our project imports pygame and uses it for a game controller and to display images on screen. Every time we run, we get a segmentation fault that appears to occur randomly. It might be a few seconds into the run or ten minutes into the run.

We're on Ubuntu 14.04 with Python 3.4.3 and pygame installed at commit 575c7a7 (current HEAD).

Is there pygame debug logging I can turn on to help diagnose this?

Currently, at crash time the only output we get is:

Fatal Python error: (pygame parachute) Segmentation Fault

Comments (4)

  1. Lenard Lindstrom

    To see where the segfault occurs use gdb. Build Pygame with the debug version of Python 3.4 and run your application under gdb.

    python3-dbg setup.py install
    gdb python3-dbg
    (gdb) run <your application file>
    

    This should give a stack trace when the segfault occurs.

  2. Xander Dunn reporter

    Thanks for your help. Debugging with gdb lead me to the problem, but it ended up being in our code rather than pygame's. It seems the "pygame parachute" message was merely an artifact of our using pygame, not that it was caused by pygame.

  3. Log in to comment