Debugging a null pointer dereference

Marcus Meissner marcus at jet.franken.de
Sun Jan 15 03:09:29 CST 2006


On Sat, Jan 14, 2006 at 08:41:50PM +0100, Christer Palm wrote:
> Hi!
> I'm new to this list, but a long time Wine user and regular WWN reader.
> 
> The other day I decided to try out Semiolog, a free as-in-beer piece of 
> software to create labels from electric equipment manufacturer Hager, 
> under wine. The software can be downloaded from here: 
> http://www.hager.se/files/download/0/482_1/0/SemiologSue40a.exe
> 
> Unfortunately it doesn't work. So although I haven't been doing any 
> Windows programming in the last 15 years I decided to try to do 
> something useful and try find out why it doesn't work. I figured that 
> this application would be a good thing to try to get to work as it is 
> supposedly rather trivial.
> 
> So what follows is a description of a newbies attempt at some wine 
> debugging:
> 
> 
> The application installs and starts up just fine, but when I try to 
> create a new document, I get a null pointer dereference in mfc42.dll.
> 
> After messing around with with the mfc42 runtime, I managed to get a 
> backtrace with debugging information, which looks like this:

> =>1 0x5f4056dd CEnumOleVerb::~CEnumOleVerb+0x37 [oleverb.cpp:61] in 
> mfc42 (0x5f4056dd)

You should find out what it does before.

Capture a WINEDEBUG=+relay,+seh trace (redirect output to a logfile).

Then look at this trace, search for the winedbg call and scroll back
until the RaiseException with c00000005 code (likely only some dozen
lines above the initial debugger start).

The look backwards from this to see where it might have got this NULL
pointer... :/

If its bad, it could have got it from millions of lines ago. :/

Ciao, Marcus



More information about the wine-devel mailing list