Re: [AD] DirectDraw - create_sub_bitmap() or save_bitmap() faulty ?

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


> Sorry, but it doesn't crash in DEBUGMODE !
> I tried to recompile everything, it crashes with alleg_s.lib and not with
> alld_s.lib.
>
> With alleg_s.lib in DirectX Windowed mode, Windows says:
>
> --------------------------------------------------------------------------
>------ OMAR_BUG a causé une défaillance de page dans
>   le module OMAR_BUG.EXE à 019f:00434735.
> Registres :
> EAX=00000000 CS=019f EIP=00434735 EFLGS=00210246
> EBX=00000000 SS=01a7 ESP=0069f4ba EBP=0069f4c4
> ECX=00000000 DS=01a7 ESI=008c71d4 FS=5c9f
> EDX=00000000 ES=01a7 EDI=00000000 GS=0000
> Octets à CS : EIP :
> 8b 44 82 40 c3 89 f6 f7 42 2c 00 00 00 02 74 13
> État de la pile :
> 0043fc17 000001a7 6a100000 59f7008c 6a100040 0000008c 00000000 80710000
> 0ca00044 806c009d 14d10044 30447801 00000a00 00080000 00010000 f95e0000

EDI=00000000 looks suspicious. Could you try the attached patch? It only 
pertains to fullscreen DirectX mode.

-- 
Eric Botcazou
--- /cvs/allegro/src/win/asmlock.s	Mon Sep 16 01:10:44 2002
+++ allegro/src/win/asmlock.s	Sat Apr  5 17:17:56 2003
@@ -35,13 +35,11 @@
       jnz Locked
 
       /* lock the surface */
-      pushl %ecx
-      pushl %eax
+      pushal
       pushl %edx
       call *GLOBL(ptr_gfx_directx_autolock)
       popl %edx
-      popl %eax
-      popl %ecx
+      popal
 
    Locked:
       /* get pointer to the video memory */
@@ -62,13 +60,11 @@
       jz No_unlock
 
       /* unlock surface */
-      pushl %ecx
-      pushl %eax
+      pushal
       pushl %edx
       call *GLOBL(ptr_gfx_directx_unlock)
       popl %edx
-      popl %eax
-      popl %ecx
+      popal
 
       /* clear the autolock flag */
       andl $~BMP_ID_AUTOLOCK, BMP_ID(%edx)


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