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

Re: [pygame] Another blitting surface to itself crash



maybe it is memory alignment?  Maybe the mmx/sse routines require 8
byte alignment or something?


On Mon, Aug 18, 2008 at 4:55 PM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> Thanks Nicholas,
>
> That is kind of interesting, and kind of confusing. Hugo Arts got a Pygame
> parachute on XP that was traced to SDL itself. I get a Fatal Python error,
> as do you. But unless you use a vintage Windows system as I do then it would
> seem the type of error is independent of Windows version. It behaves as a
> memory violation, but where. And it is MinGW specific.
>
> I ran gdb on a small C program that does a self blit. I saw no place where
> pointers go astray. The obvious way in which MinGW and VC code differs is
> some inline assembly happens with MinGW. But a test on the inlined assembly
> code involved with an overlapping blit showed no problems. I must be making
> a faulty assumption somewhere.
>
> Lenard
>
>
> Nicholas Dudfield wrote:
>>
>> Lenard,
>>
>> "Fatal Python error: Inconsistent interned string state."
>>
>>
>> On Mon, Aug 18, 2008 at 8:17 AM, Lenard Lindstrom <len-l@xxxxxxxxx
>> <mailto:len-l@xxxxxxxxx>> wrote:
>>
>>    Yes, debug print statements show the crash happens when the SDL
>>    blit funcion SDL_BlitSurface is called. Did you get a Pygame
>>    parachute or a Python interned string violation?
>>
>>    Lenard
>>
>>
>>    Nicholas Dudfield wrote:
>>
>>        Ok, I have been informed there is are PyGame blits not derived
>>        from SDL, so that explains that.
>>
>>        {pygame_AlphaBlit, pygame_Blit} from clip above looks like
>>
>>        Seems oblivious (sic) now it's pointed out.
>>
>>
>>        On Sat, Aug 16, 2008 at 4:37 PM, Nicholas Dudfield
>>        <ndudfield@xxxxxxxxx <mailto:ndudfield@xxxxxxxxx>
>>        <mailto:ndudfield@xxxxxxxxx <mailto:ndudfield@xxxxxxxxx>>> wrote:
>>
>>           I had a little play with the test_blit_to_self.py:
>>           SDL VERSION:
>>
>>           1.2.13 prebuilts
>>
>>           PYGAME:
>>
>>           Mingw compiled, svn r 1619
>>
>>           OBSERVATIONS:
>>
>>           Unmodified the test wouldn't run at all as noted earlier.
>>
>>           I don't know if it's any help but I noticed after
>>        commenting out
>>           the "blitting screen to self" section that I could get the
>>           "blitting surface to self" test and "blitting surface to
>>        screen"
>>           to run the full 100 cycles if I instantiated the Surface
>>        `a` with
>>           pygame.SRCALPHA flags.
>>
>>           Also, if using BLEND_RGB_ADD flags "blitting screen to self"
>>           worked. Also screen.copy() worked as a source... but eh.
>>
>>           CONCLUSIONS:
>>
>>           s.blit(s, (0,0)) works if SRCALPHA bits set for s
>>           screen.blit(screen, step, None, pygame.BLEND_RGB_ADD)
>>
>>           Is that any help for you guys in debugging?? I have no C-fu
>>        or I
>>           would have a tinker myself.
>>
>>
>>
>
>
> --
> Lenard Lindstrom
> <len-l@xxxxxxxxx>
>
>