Thank to Rene, Claudio and Brian, On Wednesday 16 September 2009, Brian Fisher wrote: > Well that looks like a very complicated way to clear the screen, which also > involves blitting a surface to itself (you are blitting the > pygame.display.get_surface() to the pygame.display.get_surface() after > clearing the surface) >
Claudio said much the same thing. I must admit it looked over complicated when I put it in the email. This is my roughly my second attempt at something non-trivial with python so I am very much a learner. > The symptoms of your original bug report seem remarkably similar to a bug > that existed in SDL with blitting a surface to itself due to a change in > gcc 4.0 (it stopped restoring the direction flag). The exact problem in > that case was that the SDL code to blit a surface to itself was special > cased, and that special case assumed the direction flag was cleared when it > did a rep movsb. But since it wasn't with the new gcc, if the direction > flag had been set elsewhere, then the copy went in the other way and either > corrupted memory, resulting in that string state error message, or crashed Slack 13.0 64 bit: gcc 4.3.3 sdl 1.2.13 Slack 13.0 32 bit: gcc 4.3.3 sdl 1.2.13 Slack 12.0 (32 bit only) gcc 4.2.4 sdl 1.2.13 > > I don't recall how that old bug was (or was not) resolved for pygame, but > there is history on that bug on the list archive. > > Lenard probably remembers it much better than me. > > ... but you could also fix this by replacing thatvery convoluted > clearScreen body with a simple self.screen.fill((0,0,0)) Yes, works, I also ought to put that function somewhere more sensible as well... Thanks All, Pete -- Peter Chant http://www.petezilla.co.uk
