Comment 6 for bug 275492

Revision history for this message
Arnaud Jeansen (ajeans) wrote :

I spent some time on it tonight (first time at reading python :().

It seems that at two points in the codebase, a pygame surface cannot be blit because the surface is still locked (there is an unlock() before the blit, but it seems to fail). Those two points are the copyright surface (this is the one that makes the game fail early), and the timeframe surface.

After some mindless trial and error, the problem appears to be related to the use of "enumerate" in for loops (it seems to keep some reference on the "alpha" 2D array which itself is linked to the surface). Because of the remaining link, the unlock() fails. I have a local change that replaces "enumerate" by "range" in some for loops, and it seems to correct the problem (I could start and play several games with pygame 1.8.1).

I will try to come up with a debdiff and maybe even a version in a PPA (Christmas vacation may make this more difficult).