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

Re: [pygame] Another blitting surface to itself crash



Hi

this has worked on my machine: http://www.pygame.org/pcr/meltdown/index.php
(but now using 1.8 from the pygame.org site it crashes)

IIRC I was told, that when blitting a surface on itself the sourerect is important (I dont remember how it should be, sorry). Maybe this is the problem? I dont have time to test.

~DR0ID

Hugo Arts schrieb:
On Sat, Aug 2, 2008 at 6:30 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
There's another instance of blitting a surface to itself crashing on Windows
for a user, it's believed to be a 1.8.1 thing by the poster
http://pygame.motherhamster.org/bugzilla/show_bug.cgi?id=19

last time it came up marcus was thinking about making pygame throw an
exception on blitting a surface to itself, which still seems like a decent
solution to me. Anybody know any more background?


I was the one who submitted the bug last time. At the time there was
some resistance to the exception solution, since scrolling was seen as
a valid reason to blit surfaces onto themselves, as well as a certain
meltdown effect.

There is an easy workaround available (just copy the surface), but no
fix. As far as I could tell, the bug occurs only on windows.

We never got into the cause of the bug, the thread died down without
any real bug hunting done. I have no idea what could be causing this.
At the time I wrote this minimal script to reproduce, works also in
interactive mode:

import pygame
pygame.init()

a = pygame.Surface((10, 10))
a.blit(a, (0, 0))

Output:
Fatal Python error: (pygame parachute) Segmentation Fault


That's about all I know.

Hugo