python - Parachute Segmentation Fault Error - pygame to py2exe -
i using gui2exe compile python/pygame, game .exe
i have problem font module.
using python 2.7 , py2exe option in gui2exe have updated python, pygame , py2exe 2.7 versions. program runs fine after compile py2exe this.
here error get:
fatal python error: (pygame parachute) segmentation fault application has requested runtime terminate in unusual way. please contact application's support team more information. my game starts off console , part runs. display starts crash.
thanks
had similar problems , 1 too. found way solve them:
after few weeks (had problem before) i'm happy solved problem! :)
1st part of problem (http://i.stack.imgur.com/wpkjr.png): solved editing setup.py script adding "excludes" part in it. resulted in successful making of executable file!
modified setup.py script:
from distutils.core import setup import py2exe setup(windows=['source_static.py'], options={ "py2exe": { "excludes": ["opengl.gl", "numeric", "copyreg", "itertools.imap", "numpy", "pkg_resources", "queue", "winreg", "pygame.srcalpha", "pygame.sdlmain_osx"], } } ) so, if have similar issues, put "missing" modules "excludes" line.
2nd part:
after succeeded in making of executable file, had next problem: "the application has requested runtime terminate in unusual way. please contact...". after days , days of searching , thinking how solve problem, found way it. couldn't believe problem absurd. problem in code, font definition:
font1 = pygame.font.sysfont(none, 13) after changing "none" system font name (for example "arial" (must string)), , compiling, couldn't believe .exe file worked!
font1 = pygame.font.sysfont("arial", 13) of course, can use own font, must specify path , define in program.
so of experiencing issues, try steps , hope succeed. hope you, because i've lost days , weeks trying solve these problems. tried making .exe file versions of python , pygame, many other .exe builders , setup scripts, without luck. besides these problems, had many other problems before found answers them on stackoverflow.com.
i'm happy found way solve problems , if faced same ones.
small tips (things i've done):
1st: update microsoft visual c++ library latest one.
2nd: if have images or fonts similar executable program needs, include them dist folder (where .exe file has been created).
3rd: when making .exe file, include needed files folder setup.py script (all files , directories main script uses).
used python 2.7 x64, pygame , py2exe.
Comments
Post a Comment