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

[pygame] Intermittent crashes caused by surfaces?



I've been writing a game which works fine on my laptop (running
Linux-2.2.19, Python 2.1.1 and Pygame 1.5.3), but I have received
reports of intermittent crashing on Windows 2000 with Python 2.1.3,
Python 2.2.2b2 and various recent versions of Pygame and SDL.

Suspecting surface (de)allocation problems, I wrote the following test
script to see if allocation was being slowed down over time. It caused
the X server to restart...



#!/usr/bin/env python

# Warning: Do not run this alongside important applications and data.

import pygame
from pygame.locals import *

import time

while 1:

    print "Start:", time.gmtime(time.time())
    a = []
    for i in range(0,100):

        a.append(pygame.Surface( (32,32), SRCALPHA ))

    for i in range(0,100):

        a.pop(0)
    print "Stop:", time.gmtime(time.time())
    print



Has anyone else experienced problems like this?

-- 
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