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

Re: [pygame] Another blitting surface to itself crash



Hi René,

It could be glibc makes fewer assumptions that Microsoft's C runtime. When I get a chance to recompile SDL.dll and test it maybe it would be an idea to update the Pygame 1.8.1 installer to include the patched SDL.dll as well as an SDL_mixer.dll that fixes the quit/init bug:

http://article.gmane.org/gmane.comp.python.pygame/14947/match=mixer+quit+restart


Lenard


René Dudfield wrote:
nice work :)

By the sounds of it, that flag might be cleared by linux/glibc?  That
would make sense if it's working ok on linux.


On Wed, Aug 20, 2008 at 7:24 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
I believe I found the bug. And it was already fixed for SDL 1.3 (I cannot
confirm it is also fixed for 1.2.13 in SVN since the site is down.) There
should be a licensing requirement to do assembly level programming :-). The
optimized reverse blit uses an i386 string move instruction. The direction
of the copy is controlled by a register flag. A cleared flag causes a
forward copy, the data pointers are incremented. A set flag causes a reverse
copy, decrementing data pointers. The flag was set by the SDL copy code, but
not cleared afterwards. And the flag doesn't reset itself apparently. So the
set flag sat there like an armed bomb until the next string copy instruction
was executed.

Lenard


Lenard Lindstrom wrote:
That seems to be it. Try out the modified SDL.dll for Pythons 2.4. and
2.5:

http://www3.telus.net/len_l/pygame/SDL-self-blit.zip

md5sum:
59a283f9383d6b5512c236d98e39c97b *SDL-self-blit.zip

Lenard


Lenard Lindstrom wrote:
I will. But it will be hand-customized.

Lenard


Brian Fisher wrote:
Hey Lenard,
Can you build SDL with mingw in a way that the inlined assembly won't be
used? (i.e. so that it uses the same source that VisualC does to build)