"""Demostrates a pygame 1.7.1 bug. Programs ends with a 'pygame parachute'.
It happens in windows, in Linux I was tell it runs fine."""

import pygame
from pygame.locals import * 

pygame.init()
#screen = pygame.display.set_mode((800, 600),SWSURFACE)

screen = pygame.display.set_mode((800, 600),HWSURFACE,32)

a=pygame.Surface((64,64))
a.fill( (255,0,255) )
a.fill( (0,255,0), (0,0,8,32))
screen.blit(a,(screen.get_width()/2,screen.get_height()/2))
pygame.display.update()

print """\nDemostrates a pygame 1.7.1 bug. Programs ends with a 'pygame parachute'.
It happens in windows, in Linux I was tell it runs fine."""

print "\n *** press a key to crash with 'pygame parachute' error"  

while 1:
    event = pygame.event.poll()
    if (event.type == QUIT
        or (event.type==pygame.KEYDOWN and event.key==K_ESCAPE)):
        break
    elif event.type == KEYDOWN:
        for x in range(64):
            for y in range(64):
                x,y=0,0
                a.blit(a, (x,y), (0,y,64,1))
                screen.blit(a,(screen.get_width()/2,screen.get_height()/2))
        pygame.display.update()
    

