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

Re: [pygame] pygame parachute and inconsistent interned sting state - but only on Slackware 13.0 32 bit



yes, I think you are right Brian.  Also your workaround should fix it.

That bug has been fixed in many versions of SDL... but obviously not
the one slackware has on 32bit.  It's been put into the SDL bug
tracker and is planned to be fixed for the SDL 1.2.14 release.  Until
then, will just have to avoid doing self screen blits.

cu,

On Wed, Sep 16, 2009 at 9:31 PM, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> 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)
>
> 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
>
> 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))
>
>
> On Wed, Sep 16, 2009 at 11:15 AM, Peter Chant <pete@xxxxxxxxxxxxxxx> wrote:
>>
>> D'oh so obvious.  What I regularly do whilst developing things, but not
>> when
>> bugs suddenly appear.
>>
>> FOUND IT!
>>     self.screen.blit(clear,(0,0))
>>
>>
>>  - look for the exclamation marks
>>
>>    def clearScreen(self):
>>        print "In clearScreen"
>>        print "About to call pygame.display_get_surface()"
>>        clear = pygame.display.get_surface()
>>        print "About to fill surface to clear it"
>>        clear.fill((0,0,0))
>>        print "About to self.screen.blit - !!!! this crashes"
>>        self.screen.blit(clear,(0,0))
>>        print "just blitted - !!!!! does not get to here"
>>
>>
>> self.screen is initialised by the output of another class.
>>  self.screen = h.screen
>>
>> in class h
>>
>>  self.screen=pygame.display.get_surface()
>>
>
>