Bug in StackTrace (in both 2.5.9.0 and new 2.5.11.1)
-
- Posts: 9
- Joined: Wed Mar 04, 2009 12:52 am
Bug in StackTrace (in both 2.5.9.0 and new 2.5.11.1)
Dear Mathias,
I sent you same bug report back in April and looks like this bug still exists in newly released 2.5.11.1
Can you please take a look?
Bug description:
Our main application creates forms from dynamically loaded packages.
When it is time to unload them it runs StackTrace to make sure none of functions/procedures of the loaded form are active.
It works under WinXP but under Win 2000 and Vista stack trace does not see loaded package / class at all.
Steps to reproduce:
1) Compile Host.dproj (we are using Delphi 2009)
2) Run Host.exe
3) Click menu File -> Load Child From BPL
4) Once child form loaded click on button ‘Do Something for 10 seconds’
5) Click menu File -> Exit – it will produce Dialog with Stack Trace
6) Only on Windows XP currently executed procedure TBaseForm.buttonDoSomethingFor10SecsClick will be displayed.
Please see screen shot of WinXP.GIF vs Vista.gif and Win2000.GIF for details.
Windows XP (correct behavior)
http://www.clevercomponents.com/store/alex/WinXP.GIF
Vista (incorrect - not Child.BPL with TBaseForm.buttonDoSomethingFor10SecsClick)
http://www.clevercomponents.com/store/alex/Vista.gif
Please see http://www.clevercomponents.com/store/a ... ostBPL.zip for example sources with screen shots (XP vs 2000 vs Vista).
Thank you,
Alex
I sent you same bug report back in April and looks like this bug still exists in newly released 2.5.11.1
Can you please take a look?
Bug description:
Our main application creates forms from dynamically loaded packages.
When it is time to unload them it runs StackTrace to make sure none of functions/procedures of the loaded form are active.
It works under WinXP but under Win 2000 and Vista stack trace does not see loaded package / class at all.
Steps to reproduce:
1) Compile Host.dproj (we are using Delphi 2009)
2) Run Host.exe
3) Click menu File -> Load Child From BPL
4) Once child form loaded click on button ‘Do Something for 10 seconds’
5) Click menu File -> Exit – it will produce Dialog with Stack Trace
6) Only on Windows XP currently executed procedure TBaseForm.buttonDoSomethingFor10SecsClick will be displayed.
Please see screen shot of WinXP.GIF vs Vista.gif and Win2000.GIF for details.
Windows XP (correct behavior)
http://www.clevercomponents.com/store/alex/WinXP.GIF
Vista (incorrect - not Child.BPL with TBaseForm.buttonDoSomethingFor10SecsClick)
http://www.clevercomponents.com/store/alex/Vista.gif
Please see http://www.clevercomponents.com/store/a ... ostBPL.zip for example sources with screen shots (XP vs 2000 vs Vista).
Thank you,
Alex
Hi Alex,
I did this:
(1) downloaded your demo project
(2) started delphi 2009 (all update packs etc installed)
(3) loaded host.dpr, enabled madExcept, compiled, closed project
(4) loaded child.dpk, enabled madExcept, compiled, closed project
(5) copied host.exe, child.bpl, rtl120.bpl and vcl120.bpl into a new folder
(6) copied the new folder to a Windows 2000 VM and ran the demo
(7) copied the new folder to a Windows 7 VM and ran the demo
(8) executed the demo on my XP development PC
The callstack was correct and complete on all XP, 2000 and Windows 7. I'm not sure why things are not working for you. But I cannot reproduce the problem here on my development PC.
I did this:
(1) downloaded your demo project
(2) started delphi 2009 (all update packs etc installed)
(3) loaded host.dpr, enabled madExcept, compiled, closed project
(4) loaded child.dpk, enabled madExcept, compiled, closed project
(5) copied host.exe, child.bpl, rtl120.bpl and vcl120.bpl into a new folder
(6) copied the new folder to a Windows 2000 VM and ran the demo
(7) copied the new folder to a Windows 7 VM and ran the demo
(8) executed the demo on my XP development PC
The callstack was correct and complete on all XP, 2000 and Windows 7. I'm not sure why things are not working for you. But I cannot reproduce the problem here on my development PC.
-
- Posts: 9
- Joined: Wed Mar 04, 2009 12:52 am
I compiled and placed binaries at http://www.clevercomponents.com/store/a ... naries.zip can you please try them?madshi wrote:Hi Alex,
The callstack was correct and complete on all XP, 2000 and Windows 7. I'm not sure why things are not working for you. But I cannot reproduce the problem here on my development PC.
I tried with enabled/disabled madExcept options but it did not made any difference.
It worked on XP every single time and did not worked on Vista.
We are not using VM can this be a cause?
Tried on several Vista PC's and one Server 2003 - same results (incorrect callstack):(
-
- Posts: 9
- Joined: Wed Mar 04, 2009 12:52 am
-
- Posts: 9
- Joined: Wed Mar 04, 2009 12:52 am
-
- Posts: 9
- Joined: Wed Mar 04, 2009 12:52 am
-
- Posts: 9
- Joined: Wed Mar 04, 2009 12:52 am
I'm sorry for the extremely late reply.
I've checked this problem out now. It seems that madExcept's "clever" stack trace filtering is too agressive in this specific case. madExcept goes through the raw call stack and disassembles all functions which are referenced anywhere. Then madExcept checks which function could have called which other function in the callstack etc. Based on this logic madExcept tries to decide which callstack items are likely to be correct and which are likely to be incorrect. It seems that in Vista this logic gets confused by your sample project, for whatever reason.
I'm planning to revisit this whole stack filtering logic for the next major madExcept version. For now changing it would be very difficult without running in danger of breaking it for other cases.
You can work around the issue by setting the "dumbTrace" parameter to "true", when calling "StackTrace". That way the callstack will be much less filtered by madExcept, which means that you'll get a lot more noise in the callstack, but you will also get the missing line in Vista.
I've checked this problem out now. It seems that madExcept's "clever" stack trace filtering is too agressive in this specific case. madExcept goes through the raw call stack and disassembles all functions which are referenced anywhere. Then madExcept checks which function could have called which other function in the callstack etc. Based on this logic madExcept tries to decide which callstack items are likely to be correct and which are likely to be incorrect. It seems that in Vista this logic gets confused by your sample project, for whatever reason.
I'm planning to revisit this whole stack filtering logic for the next major madExcept version. For now changing it would be very difficult without running in danger of breaking it for other cases.
You can work around the issue by setting the "dumbTrace" parameter to "true", when calling "StackTrace". That way the callstack will be much less filtered by madExcept, which means that you'll get a lot more noise in the callstack, but you will also get the missing line in Vista.
-
- Posts: 9
- Joined: Wed Mar 04, 2009 12:52 am