Help with debugging needed

Stefan Dösinger stefandoesinger at gmx.at
Sat Aug 13 16:12:05 CDT 2005


Hi,
> > So my questions are:
> > *Am I right with my suspection that the problems are caused by a
> > incorrect return?
>
> It's possible. I'm working on a problem like that with palm desktop. But
> you won't know until you debug it :) It could be nasty to fix though.
I was lucky with setting a brakepoint in the wine code. The crash happens in 
the DDraw implementation. The return from 
Main_DirectDraw_Release(ddraw_main.c:154) leads to a random adress. The call 
which leads to this is "HeapFree(GetProcessHeap(), 0, This);" in 
Main_DirectDrawSurface_Destroy, surface_main.c:154. If I comment out this 
call, Empire Earth continues loading and crashes more or less randomly at 
some later points.

I've edited the IDirectDrawSurfaceImpl structure and added a 2048 byte block 
at the beginning and the end. This makes the crashes reliable: With the 
HeapFree call, the ret jumps to NULL, and without the call Empire Earth 
crashes little later.

This looks like a really nasty heap corruption to me, and I'm afraid it's 
beyond my knowledge. Can anyone of the ddraw/d3d people help me?

> > *How can I get a disassembly of Low-Level
> > Engine.?Deactivate at GERasterizer@@UAEJXZ or simmilar functions. I didn't
> > find this symbol.
>
> If I had to guess, I'd say these functions are in the game itself, most
> likely in one or more DLLs. Your best bet here is to use a good
> disassembler. My personal favorite is IDA. You can find a demo version
> here: http://www.datarescue.be/downloaddemo.htm. This version works just
> fine for this sort of thing.
Yes it's a part of the game in a Dll called "low-level engine.dll". The IDA 
disassembler looks really great, I'm considering ordering it. But it's quite 
expensive.

Thanks for your help so far,
Stefan



More information about the wine-devel mailing list