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

Re: [pygame] Intermittent crashes caused by surfaces?



On Thu, 17 Oct 2002, David Boddie wrote:


I had a problem when using HW surface on windows. I dont know if it's
related. My game started out smooth but then gradually started to slow
down, I tracked it down to a surface rotate I did in my game, I
fixed it by deleting the current image before setting it to the new
rotated surface.


BTW. Does anyone know of any array changes between Numeric version 21
and 22. My gamemap loses it's first row when using 22.

Cheers.
/Fredrik
 
> 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
> 

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org