Sorry to drag this on so long.
I used Gflags to start my application (‘enable’ from the DDK samples). If I
set ‘enable page heap’ as Wesley suggested the application will not even
start, it immediately shows a dialog box with ‘The application failed to
initialize properly (0x80000003). Click OK to terminate the application’.
Windbg is unable to break into the process at that point. If I select all
heap associated options in Glfags except ‘page heap’ the application will
start. I then attach Windbg and click on on of the items shown by the
‘enable’ example. Poof, I fall into windbg. !heap shows me this:
0:001> g
HEAP[enable.exe]: Heap block at 000754C0 modified at 00075722 past requested
size of 25a
Break instruction exception - code 80000003 (first chance)
eax=000754c0 ebx=00075722 ecx=0006f498 edx=0006f1ba esi=000754c0
edi=0000025a
eip=77f9eea9 esp=0006f394 ebp=0006f398 iopl=0 nv up ei pl nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00000202
ntdll!DbgBreakPoint:
77f9eea9 cc int 3
0:000> !heap
HEAPEXT: Unable to get address of NTDLL!NtGlobalFlag.
HEAPEXT: Unable to get address of NTDLL!RtlpHeapInvalidBreakPoint.
HEAPEXT: Unable to get address of NTDLL!RtlpHeapInvalidBadAddress.
HEAPEXT: Unable to get address of NTDLL!RtlpGlobalTagHeap.
HEAPEXT: Unable to get address of *NTDLL!RtlpGlobalTagHeap.
HEAPEXT: Unable to get address of NTDLL!RtlpHeapStopOn
HEAPEXT: Unable to get address of NTDLL!RtlpStackTraceDataBase
Index Address Name Debugging options enabled
1: 00070000 Process tail checking free checking validate parameters validate
on call
2: 001b0000 CSRPORT tail checking free checking validate parameters validate
on call
3: 006e0000 tail checking free checking validate parameters validate on call
4: 00700000 tail checking free checking validate parameters validate on call
5: 00c30000 tail checking free checking validate parameters validate on call
The crash happends in a call to ‘RtlZeroHeap’ called by
‘RtlpNtEnumerateSubKey’.
I don’t think this tells me anything more than before. Somehow during
process startup in the debugger I get a mismatch between the compiled and
linked code and the dlls that get loaded at runtime.
Quite annoying but I guess that’s part of being on the MS bandwagon
Thanks for everyone’s help and patience,
Sander
-----Original Message-----
From: Gary Little [mailto:xxxxx@Broadstor.com]
Sent: Wednesday, June 13, 2001 12:49 PM
To: NT Developers Interest List
Subject: [ntdev] RE: DDK application runs by itself but crashes in deb ugge
r
Sander,
Look at the GFLAGS.EXE utility in “c:\Program Files\Debugging Tools for
Windows”. That will turn on global flags a few of them deal with the heap.
Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@Broadstor.com
xxxxx@inland.net
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com