Forum Discussion
Don't you just hate it when c#.NET apps spawn Delphi modules?
Since you already gather a lot of info about the crash, try terminating the application at a point after you get your info, but before it locks up TestComplete/TestExecute.
Tell those programmers to fix it! Fix it! Fix it!
- Colin_McCrae10 years agoCommunity Hero
Don't think the problem lies with my application.
The whole of TestComplete freezes up (other applications are OK) once this dialog box appears.
I found this:
My error dialog is coming from Werfault.exe. So it would appear that TestComplete still has problems with this. I'm going to see if I can find a way round it by killing everything process and service level after taking the information from the initial dialog. (The one prior to the WerFault one .... which is fine)
TC 11.20. Win 7 Pro 64 bit.
- Colin_McCrae10 years agoCommunity Hero
Killing everything at process level does the trick.
And is fine. As the application is about to stop/die at that point anyway. All the information of any worth is in the first Dialog and is captured and logged. The one causing the problems is just the "Has encountered a problem and needs to close" window. No useful info in it so no loss if I never see it ....
- HKosova10 years ago
Alumni
Hi Colin,
WerFault is one of those Windows components that cannot be automated through UI (similar to UAC), that's what causes the hanging. The way to deal with Werfault is to let TestComplete intercept the crash - which it does automatically during test runs. TestComplete will capture the crash dump, add it to the log, and suppress the WerFault window. So there is no need to interact with WerFault from tests.
For example, if an application crashes like this:
and the test looks like this:function Test() { TestedApps.CrashDemo.Run(); Sys.Process("CrashDemo").WinFormsObject("Form1").WinFormsObject("button1").ClickButton(); // Crash! // Note we don't handle the Werfault window in any way Delay(5000); // This line won't actually be executed, because the test will stop after the crash Sys.Process("CrashDemo").WinFormsObject("Form1").Close(); }then test will be stopped after the crash, and the log will have a link to the crash dump:
Could you please try and see if automatic crash interception works for your app?