[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Intermittent crashes caused by surfaces?



On Thursday 17 Oct 2002 1:50 am, Michael Benfield wrote:
>
> I ran your sample code. The process pretty quickly ballooned to over 600
> megs and was killed by my shell.

Sounds familiar.

> So I took a look at the Pygame code. On line 1466 of surface.c, when Pygame
> is going to free the surface, it first checks if SDL Video was initted. If
> so, it frees the surface, if not, it doesn't. So I just added a
> pygame.init() before your while loop and everything works fine. I'm not
> sure why the surface can't be freed otherwise. I'll do some experimenting
> later. Perhaps Mr. Shinners can shed some light.

I can't believe I forgot to initialise Pygame! The correctly written test
doesn't exhibit the problems that were reported with my game so I'll
either have to write another or upload the game somewhere for people to
try.

Thanks for pointing out my error, anyway!

-- 
David


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org