2

I made a game with Pygame which I successfully converted to an .exe file a while ago, but now that I've made a newer version of it, converting it with py2exe gives me the following error:

Adding python27.dll as a resource to C:/Python/dist/game.exe
Fatal Python error: <pygame parachute> Segmentation Fault

The application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

The funny thing is that this doesn't work for the old file anymore either. I already know of the issue with fonts, which I already resolved before first converting the game to an executable file. So it doesn't seem like it's an issue with the actual game and I can't figure out what else could be the problem. Also I'm not sure if the error is actually the python27.dll file (it's under C:\Windows\System32\python27.dll ) or another DLL that was supposed to be added after that. I can't remember adding any extra modules or anything since the last time I used py2exe either. In any case, I've also tried excluding the DLLs mentioned here, but that didn't help either. I'd also like to note I didn't switch computer for the time being or update it or something of the like.

Another attempt I have made was using Python2.7.7 instead of 2.7.6, but it didn't seem to work with either of them. The program goes as far as copying the python27.dll into the Python27/build folder, but it doesn't compile it into the game file afterwards.

This is the code I was using the whole time.

Python version: 2.7.7, Pygame version: 1.9.1, Py2exe version: 0.6.9

Community
  • 1
  • 1
MMM
  • 107
  • 1
  • 1
  • 9
  • Your setup file may help, as would information about the version of py2exe you're working with. If you search for python27.dll on your system are there several found? – g.d.d.c Jun 03 '14 at 15:19
  • @g.d.d.c Now that you mention it, there's one under C:\Windows\System32, one under Python27\build\bdist.win32\winexe\bundle-2.7 - is that a problem? As for the code, [here](http://pastebin.com/8u8526d3) you go. Also, I believe I have the latest version of py2exe. – MMM Jun 03 '14 at 15:33
  • Are those copies of python27.dll in various locations identical? It sounds like something may have altered your environment somehow and an invalid dll is interfering with py2exe (especially if not much else changed on your system). If you temporarily rename those out of the way do you get different results? – g.d.d.c Jun 03 '14 at 15:37
  • @g.d.d.c They're probably identical, at least the file size is the same for both. Renaming the python27.dll under Windows/System32 results in "python27.dll is missing" while renaming the one under Python27/build gives me the exact same thing, just that the python27.dll reappears in that folder, probably as a copy of the one under Windows. The only recent system change I can think of off the top of my head is an Avira update of a few hours ago which I don't think should cause any trouble with py2exe... – MMM Jun 03 '14 at 15:49
  • It may not hurt to rule out your AV -> add the build and dist dirs for py2exe to a path exclusion and try again. Mine's never seg-faulted, but nod32 prevents resource inclusion at one of the final stages of py2exe's processing and prevents it from finishing. – g.d.d.c Jun 04 '14 at 22:06
  • I just tried excluding these paths, but it seems that the AV was indeed not the problem. I've also tried it on a different computer with the same versions of Python, Pygame and py2exe but the exact same error appears. However, I wouldn't believe that the problem is with the actual programs because the exact same versions worked just a few weeks ago and I still have the executable of the earlier version of my game to prove that... What else could have changed? I haven't tracked anything else happening to the computer and it's very unlikely that anyone else even used it in the meantime. – MMM Jun 05 '14 at 21:18

0 Answers0