No stack trace available in Delphi 7 project

delphi package - automated exception handling
Post Reply
taymans
Posts: 10
Joined: Wed Sep 15, 2004 3:27 pm

No stack trace available in Delphi 7 project

Post by taymans »

I have a Delphi application that I regularly change and upgrade according to my needs. madExcept is included, and is very nice as when there is an untrapped exception, I can see the sources and line numbers.
However since several week (I don't know when this started as I don't have a lot of untrapped exceptions !), the trace does not show the source and line number stack anymore.
No idea why. Surely I changed something.
What do I have to check ?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Are you compiling in the IDE or via command line? Please raise a test exception and see what happens. Does madExcept not show up at all - or does it show up, but with a bad bug report? How does your MES (madExceptSettings) file look like?
taymans
Posts: 10
Joined: Wed Sep 15, 2004 3:27 pm

Post by taymans »

Compilation is done in the IDE
When an exception occurs, everything looks okay.
The box is shown etc...
The problem is the content of the bug report which does not show the stack of units and their line numbers

Here is the .mes :

[GeneralSettings]
AppendMapFileToBinary=1
HandleExceptions=1
CheckForFrozenMainThread=1
FreezeTimeout=300000
ShowExceptionBox=1
SynchronizeExceptionHandlers=1
SuspendAllRunningThreads=1
AutomaticallySaveBugReport=1
AutomaticallyRestartApplication=0
AutomaticallyCloseApplication=1
MailAddress=
MailSubject=Unexpected error
BugReportFile=d:\temp\madshi.log
AppendBugReports=1
BugReportFileSize=1000000
VersionVariable=U2000A.Version2000
[ExceptionBox]
TitleBar=%appname%
ExceptionMessage=Unexpected error in program
FrozenMessage=Program looks frozen
ShowButtonMailBugReport=0
ShowButtonSaveBugReport=1
ShowButtonPrintBugReport=0
ShowButtonShowBugReport=1
ShowButtonContinueApplication=0
ShowButtonRestartApplication=0
ShowButtonCloseApplication=1
MailBugReportText=mail bug report
SaveBugReportText=save bug report
PrintBugReportText=print bug report
ShowBugReportText=show bug report
ContinueApplicationText=continue application
RestartApplicationText=restart application
CloseApplicationText=close application
FocusedButton=0
AutomaticallyShowBugReport=0
[BugReport]
ListThreads=1
ListModules=1
Disassembly=1
HideUglyItems=0
FormatDisassembly=1
LimitDisassembly=10
[UnitInitOrder]
UnitInitOrder=ShareMem, HPMM, MultiMM
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Looks alright. Can you please post an example bug report from your app?
taymans
Posts: 10
Joined: Wed Sep 15, 2004 3:27 pm

bug report

Post by taymans »

Copy/Paste of such a bug report
I think this one is not exactly the interesting one because of the exception address...

date/time : 2004-12-16 14:06
computer name : NTS04
user name : stephane
operating system : Windows XP Service Pack 1 build 2600
system language : English
system up time : 2 hours 11 minutes
physical memory : 307·510 MB (free/total)
free disk space : (C:) 10,92 GB
executable : gm2000.exe
exec. date/time : 2004-11-25 16:42
version : Version etc etc etc ....
madExcept version : 2.5
exception class : EAccessViolation
exception message : Access violation at address 00000000. Read of address 00000000.

main thread ($d14):
00000000 ???
77fb4db8 ntdll.dll KiUserExceptionDispatcher
00756bc8 vcl70.bpl Controls.TWinControl.HandleNeeded
00756bd5 vcl70.bpl Controls.TWinControl.GetHandle
0076e675 vcl70.bpl Forms.TCustomForm.GetMonitor
0076ecd0 vcl70.bpl Forms.TCustomForm.SetWindowToMonitor
0076daf1 vcl70.bpl Forms.TCustomForm.SetVisible
007514d8 vcl70.bpl Controls.TControl.Click
007416d0 vcl70.bpl Stdctrls.TButton.Click
006f8231 vcl70.bpl Buttons.TBitBtn.Click
007515ae vcl70.bpl Controls.TControl.DoMouseDown
00751669 vcl70.bpl Controls.TControl.WMLButtonDblClk
00751340 vcl70.bpl Controls.TControl.WndProc
0075452b vcl70.bpl Controls.TWinControl.WndProc
77d44387 user32.dll DispatchMessageA
00774dab vcl70.bpl Forms.TApplication.ProcessMessage
00774de2 vcl70.bpl Forms.TApplication.HandleMessage
00771575 vcl70.bpl Forms.TCustomForm.ShowModal
0039332a galerie.dll GMRechercheAdresse
0076562f vcl70.bpl Menus.TMenu.DispatchCommand
0076ffef vcl70.bpl Forms.TCustomForm.WMCommand
00751340 vcl70.bpl Controls.TControl.WndProc
0075452b vcl70.bpl Controls.TWinControl.WndProc
0076e005 vcl70.bpl Forms.TCustomForm.WndProc
007541a8 vcl70.bpl Controls.TWinControl.MainWndProc
77d44387 user32.dll DispatchMessageA
00774dab vcl70.bpl Forms.TApplication.ProcessMessage
00774de2 vcl70.bpl Forms.TApplication.HandleMessage

modules:
00320000 jastay.dll C:\WINDOWS\System32
00340000 galerie.dll C:\WINDOWS\System32
00400000 gm2000.exe 4.8.0.256 c:\gm2000\exe
006d0000 vcl70.bpl 7.0.4.453 C:\WINDOWS\System32
00d20000 borlndmm.dll 7.0.4.453 C:\Program Files\Borland\Delphi7\Bin
10000000 PGPhk.dll 8.0.3.0 C:\WINDOWS\system32
1f7b0000 odbc32.DLL 3.520.9030.0 C:\WINDOWS\System32
1f850000 odbcint.dll 3.520.7713.0 C:\WINDOWS\System32
40000000 rtl70.bpl 7.0.4.453 C:\WINDOWS\System32
40220000 vclx70.bpl 7.0.4.453 C:\WINDOWS\System32
40260000 vcljpg70.bpl 7.0.4.453 C:\WINDOWS\System32
40280000 vclie70.bpl 7.0.4.453 C:\WINDOWS\System32
40330000 dbrtl70.bpl 7.0.4.453 C:\WINDOWS\System32
406d0000 indy70.bpl C:\WINDOWS\System32
40800000 vcldb70.bpl 7.0.4.453 C:\WINDOWS\System32
40850000 bdertl70.bpl 7.0.4.453 C:\WINDOWS\System32
4bde0000 IDAPI32.DLL 5.2.0.2 C:\Program Files\Common Files\Borland Shared\BDE
4c9e0000 IDR20009.DLL 5.2.0.2 C:\Program Files\Common Files\Borland Shared\BDE
4d3e0000 SQLMSS32.DLL 5.2.0.2 C:\Program Files\Common Files\Borland Shared\BDE
4e8e0000 BANTAM.DLL 1.0.0.8 C:\Program Files\Common Files\Borland Shared\BDE
5ad70000 uxtheme.dll 6.0.2800.1106 C:\WINDOWS\System32
5edd0000 olepro32.dll 5.0.5014.0 C:\WINDOWS\System32
70a70000 SHLWAPI.dll 6.0.2800.1106 C:\WINDOWS\system32
71950000 comctl32.dll 6.0.2800.1106 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805
71aa0000 WS2HELP.dll 5.1.2600.0 C:\WINDOWS\system32
71ab0000 WS2_32.dll 5.1.2600.0 C:\WINDOWS\system32
71ad0000 wsock32.dll 5.1.2600.0 C:\WINDOWS\system32
71b20000 mpr.dll 5.1.2600.0 C:\WINDOWS\system32
71c20000 NETAPI32.dll 5.1.2600.1106 C:\WINDOWS\System32
71f80000 security.dll 5.1.2600.0 C:\WINDOWS\System32
73000000 winspool.drv 5.1.2600.1106 C:\WINDOWS\System32
73310000 DBNMPNTW.DLL 2000.81.9030.0 C:\WINDOWS\System32
73320000 NTWDBLIB.DLL 1998.11.13.0 C:\WINDOWS\System32
74720000 MSCTF.dll 5.1.2600.1106 C:\WINDOWS\System32
74d30000 oledlg.dll 5.1.2600.0 C:\WINDOWS\System32
763b0000 comdlg32.dll 6.0.2800.1106 C:\WINDOWS\system32
76b40000 winmm.dll 5.1.2600.1106 C:\WINDOWS\system32
76d10000 msv1_0.dll 5.1.2600.1106 C:\WINDOWS\system32
76f90000 SECUR32.dll 5.1.2600.1106 C:\WINDOWS\System32
77120000 oleaut32.dll 3.50.5016.0 C:\WINDOWS\system32
771b0000 OLE32.DLL 5.1.2600.1106 C:\WINDOWS\system32
77340000 COMCTL32.dll 5.82.2800.1106 C:\WINDOWS\system32
773d0000 SHELL32.dll 6.0.2800.1106 C:\WINDOWS\system32
77c00000 version.dll 5.1.2600.0 C:\WINDOWS\system32
77c10000 MSVCRT.DLL 7.0.2600.1106 C:\WINDOWS\system32
77c70000 GDI32.dll 5.1.2600.1106 C:\WINDOWS\system32
77d40000 user32.dll 5.1.2600.1106 C:\WINDOWS\system32
77dd0000 ADVAPI32.dll 5.1.2600.1106 C:\WINDOWS\system32
77e60000 kernel32.dll 5.1.2600.1106 C:\WINDOWS\system32
77f50000 ntdll.dll 5.1.2600.1106 C:\WINDOWS\System32
78000000 RPCRT4.dll 5.1.2600.1140 C:\WINDOWS\system32

date/time : 2004-12-17 13:47
computer name : NTS04
user name : stephane
operating system : Windows XP Service Pack 1 build 2600
system language : English
system up time : 42 minutes 53 seconds
physical memory : 326·510 MB (free/total)
free disk space : (C:) 10,89 GB
executable : gm2000.exe
exec. date/time : 2004-11-25 16:42
version : Version 4.9.0 build 264" du 14 décembre 2004 - Copyright Galerie Moderne 1998-2004
madExcept version : 2.5
exception class : EConvertError
exception message : '' is not a valid integer value.

main thread ($380):
4000c396 rtl70.bpl
4000d39c rtl70.bpl Sysutils.StrToInt
007514d8 vcl70.bpl Controls.TControl.Click
006f7aec vcl70.bpl Buttons.TSpeedButton.Click
007518c4 vcl70.bpl Controls.TControl.DoMouseUp
00751939 vcl70.bpl Controls.TControl.WMLButtonUp
00751340 vcl70.bpl Controls.TControl.WndProc
0075445d vcl70.bpl Controls.TWinControl.WndProc
00751110 vcl70.bpl Controls.TControl.Perform
007543c2 vcl70.bpl Controls.TWinControl.IsControlMouseMsg
007544ae vcl70.bpl Controls.TWinControl.WndProc
77d44387 user32.dll DispatchMessageA
00774dab vcl70.bpl Forms.TApplication.ProcessMessage
00774de2 vcl70.bpl Forms.TApplication.HandleMessage

thread $2c8:
7ffe0304 ???
77f76709 ntdll.dll NtWaitForMultipleObjects

modules:
00320000 jastay.dll C:\WINDOWS\System32
00340000 galerie.dll C:\WINDOWS\System32
00400000 gm2000.exe 4.8.0.256 c:\gm2000\exe
006d0000 vcl70.bpl 7.0.4.453 C:\WINDOWS\System32
00d20000 borlndmm.dll 7.0.4.453 C:\Program Files\Borland\Delphi7\Bin
10000000 PGPhk.dll 8.0.3.0 C:\WINDOWS\system32
1f7b0000 odbc32.DLL 3.520.9030.0 C:\WINDOWS\System32
1f850000 odbcint.dll 3.520.7713.0 C:\WINDOWS\System32
40000000 rtl70.bpl 7.0.4.453 C:\WINDOWS\System32
40220000 vclx70.bpl 7.0.4.453 C:\WINDOWS\System32
40260000 vcljpg70.bpl 7.0.4.453 C:\WINDOWS\System32
40280000 vclie70.bpl 7.0.4.453 C:\WINDOWS\System32
40330000 dbrtl70.bpl 7.0.4.453 C:\WINDOWS\System32
406d0000 indy70.bpl C:\WINDOWS\System32
40800000 vcldb70.bpl 7.0.4.453 C:\WINDOWS\System32
40850000 bdertl70.bpl 7.0.4.453 C:\WINDOWS\System32
4bde0000 IDAPI32.DLL 5.2.0.2 C:\Program Files\Common Files\Borland Shared\BDE
4c9e0000 IDR20009.DLL 5.2.0.2 C:\Program Files\Common Files\Borland Shared\BDE
4d3e0000 SQLMSS32.DLL 5.2.0.2 C:\Program Files\Common Files\Borland Shared\BDE
4e8e0000 BANTAM.DLL 1.0.0.8 C:\Program Files\Common Files\Borland Shared\BDE
5ad70000 uxtheme.dll 6.0.2800.1106 C:\WINDOWS\System32
5edd0000 olepro32.dll 5.0.5014.0 C:\WINDOWS\System32
70a70000 SHLWAPI.dll 6.0.2800.1106 C:\WINDOWS\system32
71950000 comctl32.dll 6.0.2800.1106 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.10.0_x-ww_f7fb5805
71aa0000 WS2HELP.dll 5.1.2600.0 C:\WINDOWS\system32
71ab0000 WS2_32.dll 5.1.2600.0 C:\WINDOWS\system32
71ad0000 wsock32.dll 5.1.2600.0 C:\WINDOWS\system32
71b20000 mpr.dll 5.1.2600.0 C:\WINDOWS\system32
71c20000 NETAPI32.dll 5.1.2600.1106 C:\WINDOWS\System32
71f80000 security.dll 5.1.2600.0 C:\WINDOWS\System32
73000000 winspool.drv 5.1.2600.1106 C:\WINDOWS\System32
73310000 DBNMPNTW.DLL 2000.81.9030.0 C:\WINDOWS\System32
73320000 NTWDBLIB.DLL 1998.11.13.0 C:\WINDOWS\System32
74720000 MSCTF.dll 5.1.2600.1106 C:\WINDOWS\System32
74d30000 oledlg.dll 5.1.2600.0 C:\WINDOWS\System32
763b0000 comdlg32.dll 6.0.2800.1106 C:\WINDOWS\system32
76b40000 winmm.dll 5.1.2600.1106 C:\WINDOWS\system32
76d10000 msv1_0.dll 5.1.2600.1106 C:\WINDOWS\system32
76f90000 SECUR32.dll 5.1.2600.1106 C:\WINDOWS\System32
77120000 oleaut32.dll 3.50.5016.0 C:\WINDOWS\system32
771b0000 OLE32.DLL 5.1.2600.1106 C:\WINDOWS\system32
77340000 COMCTL32.dll 5.82.2800.1106 C:\WINDOWS\system32
773d0000 SHELL32.dll 6.0.2800.1106 C:\WINDOWS\system32
77c00000 version.dll 5.1.2600.0 C:\WINDOWS\system32
77c10000 MSVCRT.DLL 7.0.2600.1106 C:\WINDOWS\system32
77c70000 GDI32.dll 5.1.2600.1106 C:\WINDOWS\system32
77d40000 user32.dll 5.1.2600.1106 C:\WINDOWS\system32
77dd0000 ADVAPI32.dll 5.1.2600.1106 C:\WINDOWS\system32
77e60000 kernel32.dll 5.1.2600.1106 C:\WINDOWS\system32
77f50000 ntdll.dll 5.1.2600.1106 C:\WINDOWS\System32
78000000 RPCRT4.dll 5.1.2600.1140 C:\WINDOWS\system32

disassembling:
[...]
4000c37b mov edi, ecx
4000c37d mov esi, edx
4000c37f mov ebx, eax
4000c381 push esi
4000c382 push edi
4000c383 mov ecx, ebx
4000c385 mov dl, 1
4000c387 mov eax, [$4000b4bc] ; Sysutils.EConvertError.Create (rtl70.bpl)
4000c38c call +$94db ($4001586c) ; Sysutils.Exception.Create (rtl70.bpl)
4000c391 call -$632e ($40006068) ; System.@RaiseExcept (rtl70.bpl)
4000c396 » pop edi
4000c397 pop esi
4000c398 pop ebx
4000c399 ret
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Could you please retry with an up to date madExcept version? You're using 2.5 which is quite old. Current official version is 2.7e:

http://madshi.net/madCollection.exe
taymans
Posts: 10
Joined: Wed Sep 15, 2004 3:27 pm

Post by taymans »

Will try that this evening or tomorrow and keep U informed
taymans
Posts: 10
Joined: Wed Sep 15, 2004 3:27 pm

Solution found !

Post by taymans »

Indeed, I found what the problem was : in the Delphi linker options, the include TD32 info and debug symbols were not 'on' ...
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

The TD32 debug infos are only needed when using BCB. In Delphi you don't need them. It's even bad to turn them on in Delphi, cause your exe will grow enormously!
taymans
Posts: 10
Joined: Wed Sep 15, 2004 3:27 pm

Post by taymans »

If I toggle this TD32 debug info OFF, when an exception occurs, Madshi does not provide the source line numbers.
When I toggle it ON, it does.
So ?
madshi
Site Admin
Posts: 10764
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Please post the callstack of the main thread of both configurations (with/without TD32) here. Please only the callstack, not the whole bug report.

Can you please create a test exception which is inside of your own code? E.g. "raise Exception.Create('test');" or "integer(nil^) := 0".
taymans
Posts: 10
Joined: Wed Sep 15, 2004 3:27 pm

Post by taymans »

Looks finally okay but I still need to pay attention
Thanks !
Post Reply