Bad stack traces w/ DWT

Bill Baxter dnewsgroup at billbaxter.com
Fri May 16 19:59:25 PDT 2008


Very often the stack traces ddbg reports when using DWT are useless. 
Here's an example:

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION(0xc0000005) at 
(0x0000050c) thread(4320)
->us
#0 ?? () at treeeditor\Snippet111.d:128
#1 0x0044f74f in void dwt.widgets.EventTable.EventTable.sendEvent(class 
dwt.widgets.Event.Event, void*) () at treeeditor\Snippet111.d:128 from 
EventTable
#2 0x0043a5ee in void dwt.widgets.Widget.Widget.sendEvent(class 
dwt.widgets.Event.Event, void*) () at treeeditor\Snippet111.d:128 from 
Widget
#3 0x0043a6c4 in void dwt.widgets.Widget.Widget.sendEvent(int, class 
dwt.widgets.Event.Event, bool, void*) () at treeeditor\Snippet111.d:128 
from Widget
#4 0x0043a637 in void dwt.widgets.Widget.Widget.sendEvent(int, class 
dwt.widgets.Event.Event, void*) () at treeeditor\Snippet111.d:128 from 
Widget
#5 0x0042bb21 in char[] dwt.widgets.Text.Text.verifyText(char[], int, 
int, class dwt.widgets.Event.Event, void*) () at 
treeeditor\Snippet111.d:128 from Text
#6 0x0042b21e in bool dwt.widgets.Text.Text.sendKeyEvent(int, int, int, 
int, class dwt.widgets.Event.Event, void*) () at 
treeeditor\Snippet111.d:128 from Text
#7 0x0043a735 in bool dwt.widgets.Widget.Widget.sendKeyEvent(int, int, 
int, int, void*) () at treeeditor\Snippet111.d:128 from Widget
#8 0x0043b19b in class dwt.internal.win32.OS.LDWTRESULT 
dwt.widgets.Widget.Widget.wmChar(void*, int, int, void*) () at 
treeeditor\Snippet111.d:128 from Widget
#9 0x0044a730 in class dwt.internal.win32.OS.LDWTRESULT 
dwt.widgets.Control.Control.WM_CHAR(int, int, void*) () at 
treeeditor\Snippet111.d:128 from Control
#10 0x0042bd53 in class dwt.internal.win32.OS.LDWTRESULT 
dwt.widgets.Text.Text.WM_CHAR(int, int, void*) () at 
treeeditor\Snippet111.d:128 from Text
#11 0x00449f07 in int dwt.widgets.Control.Control.windowProc(void*, int, 
int, int, void*) () at treeeditor\Snippet111.d:128 from Control
#12 0x0042bd21 in int dwt.widgets.Text.Text.windowProc(void*, int, int, 
int, void*) () at treeeditor\Snippet111.d:128 from Text
#13 0x004222b6 in int dwt.widgets.Display.Display.windowProc(void*, 
uint, uint,
int, void*) () at treeeditor\Snippet111.d:128 from Display
#14 0x004221f9 in 
__D3dwt7widgets7Display7Display14windowProcFuncWPvkkiZi at 16 ()
at treeeditor\Snippet111.d:128 from Display
#15 0x7e418816 in ?? () at treeeditor\Snippet111.d:128 from USER32.dll
#16 0x7e4189cd in ?? () at treeeditor\Snippet111.d:128 from USER32.dll
#17 0x7e418a10 in ?? () at treeeditor\Snippet111.d:128 from USER32.dll
#18 0x0041f84e in bool 
dwt.widgets.Display.Display.readAndDispatch(void*) () at
treeeditor\Snippet111.d:128 from Display
#19 0x004041f6 in _Dmain () at treeeditor\Snippet111.d:128
#20 0x004ada70 in extern (C) int dmain2.main(int, char**) . void 
runMain(void*)
() from dmain2
#21 0x004adaa7 in extern (C) int dmain2.main(int, char**) . void 
runAll(void*) () from dmain2
#22 0x004ad7e8 in _main () from dmain2
#23 0x004b7435 in _mainCRTStartup () from constart
#24 0x7c816fd7 in ?? () from KERNEL32.dll


As you can see, almost every line reporting a file/line number says 
Snippet111.d:128, which is just the DWT main loop runner in main():

	while (!shell.isDisposed()) {
-->		if (!display.readAndDispatch ()) display.sleep ();
	}

Any possiblity for fixing this?  Any idea why?

--bb


More information about the Digitalmars-d-debugger mailing list