Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm using cx_Freeze to package my PyGame game. I'm running Ubuntu Linux, so I used the source package. However, I got the following error when I run cxfreeze game.py:

Fatal Python error: (pygame parachute) Segmentation Fault
Aborted

How can I fix this? I have seen other similar questions but no good answers.

share|improve this question
    
A segmentation fault is a fairly severe memory-allocation-based error, which Python generally abstracts from the user. It is very uncommon for one to get this kind of error. cxfreeze is definitely doing something odd. Without seeing its source code, however, we can't know what. –  Southpaw Hare Jan 17 '13 at 0:50

1 Answer 1

You can fix this by finding out what exactly causes the "pygame parachute".

Your first step to find this out is to add detailed logging to your code. Start off with poor man's print() logging:

print("importing pygame")
import pygame
print("initialising pygame")
pygame.init()
...

With that sort of code you might get an error message like

initialising pygame
Fatal Python error: (pygame parachute) Segmentation Fault
Aborted

which helps you to isolate where the problem happened.

Second, cx_freeze is rather tricky. cxfreeze game.py might not be enough to get a working executable. It is a far better practice to set up a setup.py file. See the source code of the Fabula setup file as an example:

http://code.ohloh.net/file?fid=pqI6bOZhHyHchm4NLxcwxsSxVdA&cid=S_RYKZr4PdY

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.