Re: [AD] crash! unhandled exception wip414 win2k msvc

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> Well, it was 0x017E7000, not that that really means much.
>
> Incidentally, if I disable MMX it crashes on the line:
>
>  movb (%esi), %al
>
> instead, so it's definately not an MMX problem.

Indeed. Thanks for these detailed informations. %esi points to the source data 
passed to the color converters, which come from the first backbuffer.

Here's the background:

- when the color depth matches that of the desktop, the driver uses a unique 
internal backbuffer (a DirectDraw video surface). Refreshing is done by 
blitting the backbuffer to the primary surface with IDirectDrawSurface2_Blt()

- when the color depth doesn't match, the driver uses a first backbuffer (a 
DirectDraw system bitmap) whose color depth is that of Allegro and a second 
backbuffer (a DirectDraw video surface) whose depth is that of the primary 
surface. Refreshing is done by converting-blitting from the first backbuffer 
to the second one with the asm color converters, then blitting from the 
second backbuffer to the primary surface with IDirectDrawSurface2_Blt()
[actually in safe mode only; in direct updating mode, the driver directly 
converts-blits from the first backbuffer to the primary surface].

In the first case, Allegro doesn't crash probably because the blitter 
IDirectDrawSurface2_Blt() can handle being interrupted when performing its 
task. In the second case, we lock the surfaces (IDirectDrawSurface2_Lock) 
before starting to convert-blit; so once the lock is obtained, the code can't 
handle being interrupted (i.e the surfaces can't become invalid).

-- 
Eric Botcazou



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/