GetStackTrace -> weird result in Release mode

delphi package - automated exception handling
Post Reply
Batteken
Posts: 65
Joined: Tue May 30, 2006 6:01 am

GetStackTrace -> weird result in Release mode

Post by Batteken »

Hello,

when I call GetStackTrace in my application in release mode, the result is 'weird'. The trace is not the logical order of the application.
When I do it under debug mode, the stack trace is 'normal'.

Any reason ?

Example of 'bad' one:

598117ec madExcept_.bpl madStackTrace PrepareStackTrace
59811813 madExcept_.bpl madStackTrace PrepareStackTrace
59811877 madExcept_.bpl madStackTrace PrepareStackTrace
59856c60 madExcept_.bpl madExcept GetCrashStackTrace
59856cf8 madExcept_.bpl madExcept GetCrashStackTrace
32234750 CC32280MT.DLL _memcpy
321c2753 CC32280MT.DLL std char_traits
76fb8202 ntdll.dll bsearch
76f8d7fb ntdll.dll RtlFindActivationContextSectionGuid
76fb8202 ntdll.dll bsearch
7613249e ws2_32.dll recv
0465018b LVDCL_DATATYPES.DLL xmemory 223 std._Destroy_range
32234750 CC32280MT.DLL _memcpy
321c2753 CC32280MT.DLL std char_traits
04a42b04 LVDCL_XML.DLL LCTinyXMLDocument.cpp 147 LCTinyXMLParagraph.SetValueAsString
32234750 CC32280MT.DLL _memcpy
76fb81cd ntdll.dll bsearch
32234750 CC32280MT.DLL _memcpy
32234869 CC32280MT.DLL _memmove
3223491b CC32280MT.DLL _memset
047338af LVDCL_DATATYPES.DLL istream 238 std.basic_istream
04735c17 LVDCL_DATATYPES.DLL istream 369 std.basic_istream
32234750 CC32280MT.DLL _memcpy
321c2753 CC32280MT.DLL std char_traits
06657042 BENDINGDLL.DLL LCGripperSolution.cpp 912 LCGripperSolution.Read
32234750 CC32280MT.DLL _memcpy
3223491b CC32280MT.DLL _memset
32234750 CC32280MT.DLL _memcpy
32234869 CC32280MT.DLL _memmove
321c278b CC32280MT.DLL std char_traits
046b7a2b LVDCL_DATATYPES.DLL ostream 252 std.basic_ostream
32234750 CC32280MT.DLL _memcpy
321c2753 CC32280MT.DLL std char_traits
32234750 CC32280MT.DLL _memcpy
04cbf2c7 LVDCL_GEOMETRY.DLL LCGeometry.cpp 5353 LCGeometry.RemoveSmallLoops
32234750 CC32280MT.DLL _memcpy
04c775e3 LVDCL_GEOMETRY.DLL LCElement.cpp 3981 LC2DElmList.MakeClosed
04d16092 LVDCL_GEOMETRY.DLL _try_vector_delete_ldtc_
76fc0483 ntdll.dll vswprintf_s
76fc0442 ntdll.dll swprintf_s
77022106 ntdll.dll RtlIpv6AddressToStringW
75bb89a0 RPCRT4.dll NdrConformantStructUnmarshall
75bb6b22 RPCRT4.dll NdrNonEncapsulatedUnionUnmarshall
75ba635b RPCRT4.dll NdrClientCall2
6978bff9 MSDATL3.dll ?WriteIntoExtBuffer@CExtBuffer@@QAGJPBXK@Z
76fc0483 ntdll.dll vswprintf_s
76fc0442 ntdll.dll swprintf_s
77021f06 ntdll.dll RtlIpv4AddressToStringExW
76fb81cd ntdll.dll bsearch
6b97c3f7 TextShaping.dll ShapingGetGlyphPositions
50cec3f4 vcl280.bpl Vcl Controls.TWinControl.MainWndProc
50cec409 vcl280.bpl Vcl Controls.TWinControl.MainWndProc
76fb4e7b ntdll.dll KiUserCallbackDispatcher
50ce7d62 vcl280.bpl Vcl Controls.TControl.WndProc
50cece79 vcl280.bpl Vcl Controls.TWinControl.WndProc
50e234c8 vcl280.bpl Vcl Forms.TCustomForm.WndProc
02e0cbe8 cxLibraryRS28.bpl Dxcustomfluentdesignform TdxCustomFluentDesignForm.WndProc
04041f01 dxRibbonRS28.bpl Dxribbonform TdxCustomRibbonForm.WndProc
02d0a1d3 cxLibraryRS28.bpl Cxcontrols TcxWindowProcLinkedObject.DefaultProc
02de775f cxLibraryRS28.bpl Dxshadowwindow TdxShadowWindow.OwnerWindowWndProc
02d0a1d3 cxLibraryRS28.bpl Cxcontrols TcxWindowProcLinkedObject.DefaultProc
03ba28f1 dxBarRS28.bpl Dxbar TdxBarManager.OwnerWindowProc
02d0a453 cxLibraryRS28.bpl Cxcontrols TcxWindowProcLinkedObjectList.WndProc
50cef075 vcl280.bpl Vcl Controls.TWinControl.CMChanged
50ce7d62 vcl280.bpl Vcl Controls.TControl.WndProc
50cece79 vcl280.bpl Vcl Controls.TWinControl.WndProc
32234750 CC32280MT.DLL _memcpy
046b7a2b LVDCL_DATATYPES.DLL ostream 252 std.basic_ostream
32234750 CC32280MT.DLL _memcpy
321c2753 CC32280MT.DLL std char_traits
046b7a2b LVDCL_DATATYPES.DLL ostream 252 std.basic_ostream
76f8cc92 ntdll.dll LdrGetDllFullName
32234750 CC32280MT.DLL _memcpy
321c2753 CC32280MT.DLL std char_traits
32234869 CC32280MT.DLL _memmove
321c278b CC32280MT.DLL std char_traits
046b7a2b LVDCL_DATATYPES.DLL ostream 252 std.basic_ostream
32234750 CC32280MT.DLL _memcpy
321c2753 CC32280MT.DLL std char_traits
0474d051 LVDCL_DATATYPES.DLL LCEvent.h 241 LCEvent1Param.$bcall$qr7LCTimer
0474cf53 LVDCL_DATATYPES.DLL LCTimer.cpp 103 LCTimer.DoTimer
0474c128 LVDCL_DATATYPES.DLL LCTimer.cpp 27 TimerProc
768e5abb USER32.dll DispatchMessageW
50e2d697 vcl280.bpl Vcl Forms.TApplication.ProcessMessage
50e2d6da vcl280.bpl Vcl Forms.TApplication.HandleMessage
50e2da19 vcl280.bpl Vcl Forms.TApplication.Run
32259d2d CC32280MT.DLL __wstartup
76acfa27 KERNEL32.dll BaseThreadInitThunk

regards,
Bart
madshi
Site Admin
Posts: 10528
Joined: Sun Mar 21, 2004 5:25 pm

Re: GetStackTrace -> weird result in Release mode

Post by madshi »

Calling GetStackTrace() properly is difficult because you need to provide accurate parameters to make it work correctly. Which is why madExcept provides 2 wrappers:

http://help.madshi.net/madExceptUnit.ht ... StackTrace

1) madExcept.GetCrashTackTrace() works well for getting a stack trace within a try..except block. It won't work outside of a try..except block.

2) madExcept.GetThreadStackTrace() should work well for getting a stack trace outside of a try..except block.

If that still doesn't work well for you, are we talking about a 32bit or 64bit process?
Post Reply