Menu

#31 pygsear program fails with segfault

open
nobody
None
5
2004-01-09
2004-01-09
Anonymous
No

mcgarrah-nospam@mcgarware.com

remove "-nospam"

---- begin error --

Pygame Parachute Traceback:
File "pygsear\Drawable.pyc", line 1523, in __init__
Fatal Python error: (pygame parachute) Segmentation
Fault

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

--- end error ---

I'm trying to use Py2exe with Python 2.3.3 and the
binary release of Py2exe that is on the sourceforge
website as of last night 1-9-2004 with the CVS version
of pygsear 0.52+ (a wrapper library for pygame) and the
stable release of both pygame and SDL for Windows.
I'm on a Win32 system - Windows XP Pro to be exact.

I've built a simple case that just loads the Game and
displays a screen.

Just unpack this zip file
http://www.darkmagic.org/mike/python/exeTest.zip

This contains a simple pygsear program based on the
How-To but adds excluding the splash screen to remove
the bitmap dependency.

To build with Py2exe (after installing py2exe):

$ cd exeTest
$ python setup.py py2exe
(bunch of log info returned)
$ cd dist/BaseGame
$ BaseGame.exe

When I attempt to run the resulting BaseGame.exe that
is produced by py2exe, I got the segfault listed above.

The line of code in question is a call to create a font
object. Everything for the SDL_ttf.dll appears to be in
place.

I've also included a exeTest2.zip that has a very simple
pygame program. That program will convert to an EXE
with py2exe so it appears to be something about
pygsear that's interacting strangely.

The pygame sample project is in
http://www.darkmagic.org/mike/python/exeTest2.zip

I'll be extending the above example to use SDL_ttf/fonts
and will include it as exeTest3.zip as soon as I get it
working to verify that it's not an SDL_ttf.dll FreeType
dependancy problem.

Does any of this ring a bell or send up flags to someone
else before I start digging significantly deeper. Py2exe
is diffcult code and I'm a novice in the Python world.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    This can be simplied even further to just the "fonty.py"
    example that ships with Pygame.

    http://www.darkmagic.org/mike/python/exeTest3.zip
    contains a sample project files that shows this.

    It has something to do with font usage that causes the
    failure.

     
  • Thomas Heller

    Thomas Heller - 2004-02-19

    Logged In: YES
    user_id=11105

    I hope you are still interested in this - sorry for the long
    delay.
    I seem to remember some problems when I made some tests with
    pygame - it is impossible for py2exe to track down
    dependencies between compiled extension modules. So you
    should probably use the '--includes' option to include more
    of the pygame extensions.

    Since Pete Shinners still uses py2exe for his SolarWolf, you
    might also get some hints from him, or maybe the support
    forums for pygame (are there any?).

    Best would be, if someone comes up with a list of which
    pygame extension needs which other one, it could be
    hardcoded into py2exe.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.