[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Pygame Parachute



Sun, Sep 21, 2003 at 10:24:18AM -0700 in <3F6DDEC2.80307@shinners.org>,
Pete Shinners <pete@shinners.org> spake:
>Mark 'Kamikaze' Hughes wrote:
>>   The code in getTerrainChar() isn't doing anything at all to Pygame.  I
>> can't get a reliable repeat of this--it happens at different places, so
>> far not in my graphics code itself.  It's always taken 5 or 10 minutes
>> into play.  There's only one thread, though there is a Clock.
>>   Any ideas?
>this is almost always a case of some sort of reference count bug. this 
>can only happen in the "C" python modules. it probably is a pygame 
>bug, unless you suspect it is some other C module you are using? what 
>version of pygame are you on? something in your game must be 
>triggering a bug. if it is a pygame thing it's nothing that i've 
>noticed yet.

  I'm using Pygame-1.5.6 for Windoze.  I'm going to experiment with it
some more today, and then I'll put up the program so you can try it and
see what you can find.

  There's no other C modules, just Pygame.  I lock a sprite surface, do
a bunch of drawing on it (mostly polygons), and unlock it.  Later, it
gets blitted to screen and flipped out.

>the "pygame parachute" is an extension of an SDL feature. SDL has a 
>"SDL parachute" which safely makes sure the graphics and sound are 
>shutdown when the game crashes. pygame does this too, but also tries 
>to cleanly abort python, and even print a stack trace from the crash 
>(which regular python cannot do)

  The part that bothers me is that the stack trace shows Python isn't
usually making Pygame calls when it dies, though I've now got one that
was.  The code is being run from my event handler, maybe there's a
conflict in storing new events when the mouse or keyboard adds an event?
That's all I can think of that would be running in a separate process.

-- 
 <a href="http://kuoi.asui.uidaho.edu/~kamikaze/";> Mark Hughes </a>