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

Re: [pygame] Dead display surfaces



now that you've stubbed out a lot of your classes, do you have a some
reduced set of code that exhibits the problem that you can post?

also have you tried other apps that use clock.tick() on the same machine?

On 9/26/06, Luke Miller <dodgyville@xxxxxxxxx> wrote:
Hi, I sometimes flip the whole display when I'm changing the background
(responding to a menu event).

I should point out that the game seems to run fine (but v. fast) when
clock.tick is commented out, but it crashes when clock.tick is in
operation...


On 26/09/06, Luke Paireepinart <rabidpoobear@xxxxxxxxx> wrote: > Luke Miller wrote: > > Well, I've done a lot more testing, including replacing my classes > > with stubs to see what is causing my Dead Display. > > > > For some reason, commenting out the following line inside my main loop > > seems to solve my problem: > > clock.tick(FRAME_RATE) > > (where clock is a pygame.time.Clock() object and FRAME_RATE = 16) > > > > My program is a complicated game, with a lot of blits, updates and a > > few flips,

updates and flips are considered new frames, aren't they?

> > often between frames. Is it possible that if the screen receives lots
> > of blits between clock ticks that pygame might kill the display?
> >
> >
> >
> > On 25/09/06, *Pete Shinners* < pete@xxxxxxxxxxxx
> > <mailto:pete@xxxxxxxxxxxx>> wrote:
> >
> >     On Sun, 2006-09-24 at 15:17 +1000, Luke Miller wrote:
> >     > What is a "Dead Display" surface in pygame, and what might cause
it?
> >
> >     I think the only thing that should cause it is calling
> >     pygame.display.quit () or pygame.quit() and then accessing the
Surface
> >     for the screen. Presumably some error condition could cause this,
> >     but I
> >     can't think of anything that should.
> >
> >
> >     >>> import pygame
> >     >>> pygame.display.init ()
> >     >>> screen = pygame.display.set_mode ((100, 100))
> >     >>> pygame.event.pump()
> >     >>> print screen
> >     <Surface(100x100x32 SW)>
> >     >>> pygame.display.quit()
> >     >>> print screen
> >     <Surface(Dead Display)>
> >
> >
> >
> >
>
>