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, 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 <[EMAIL PROTECTED]> 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)>