Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to immediately terminate crashed application?

I have an application that sometimes causes exceptions. And I need to restart it if it crashed. But the problem is, that I have Windows 7 here and when application crashes, Windows shows me nice dialog box with a suggestion to close the application. But the application itself is still running until I click "Close". How to get rid of this Window and make application terminate immediately without any dialog boxes?

like image 490
Vladislav Rastrusny Avatar asked Dec 24 '10 23:12

Vladislav Rastrusny


People also ask

How do I close a crashed program without task manager?

All you have to do is press CTRL + ALT + F4 together to close the programs all in one step. One thing to keep in mind is that it does not give you any time to save the process. So you might want to re-think before going for it to clear your hung programs.


1 Answers

Ideally you would catch all exceptions in the most outer scope of your program. However, sometimes you don't have the luxury of making such changes and the crash dialogs prevent you from recovering from a crash. In these cases you can consider disabling Windows Error Reporting, either entirely or for a specific program.

On Windows 7: Start Orb -> Control Panel -> Action Center -> Maintenance -> Check for solutions to problem reports -> Settings

Update: to completely disable the error reporting UI change the DontShowUI registry setting:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\DontShowUI

like image 84
Rick Sladkey Avatar answered Nov 16 '22 02:11

Rick Sladkey