I am using GUI2Exe to compile my python/pygame, game to a .exe
I have a problem with the font module.
using python 2.7 and the py2exe option in GUI2Exe I have updated python, pygame and py2exe with the 2.7 versions. My program runs fine but after I compile it with py2exe I get this.
Here is the error I get:
Fatal Python error: (pygame parachute) Segmentation Fault
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
My game starts off as a console and that part runs. But as soon as the display starts I get the crash.
Thanks
Had similar problems and that one too. Found a way to solve them:
After few weeks (had this problem even before) I'm happy to say that I solved this problem! :)
1st part of my problem (https://i.stack.imgur.com/WpkjR.png): I solved it by editing setup.py script with adding "excludes" part in it. That resulted in successful making of executable file!
Modified setup.py script:
So, if you have similar issues, just put those "missing" modules into this "excludes" line.
2nd part:
After I succeeded in making of executable file, I had next problem: "The application has requested the Runtime to terminate it in unusual way. Please contact...". After days and days of searching and thinking how to solve this another problem, I found a way to do it. I couldn't believe that the problem was so absurd. The problem was in my code, with font definition:
After changing "None" to some system font name (for an example "Arial" (must be a string)), and compiling, I couldn't believe that my .exe file worked!
Of course, you can use your own font, but you must specify its path and define it in your program.
So for all of you who are experiencing this issues, try this steps and I hope that you will succeed. I really hope that this will help you, because I've lost days and weeks trying to solve these problems. I even tried making my .exe file with all versions of python and pygame, with many other .exe builders and setup scripts, but without luck. Besides these problems, I had many other problems before but I found answers to them on stackoverflow.com.
I'm happy that I found a way to solve this problems and to help you if you are faced with the same ones.
Small tips (things I've also done):
Used Python 2.7 x64, pygame and py2exe.