Automatically Restart Crashed Or Hanged Applications

Don’t you hate it when programs hang or crash? I find it especially annoying when a background application like an IM client or a bandwidth monitor silently crashes – sometimes I only notice the problem hours later when I’ve already missed a bunch of messages. I’m sure you’ve encountered a few “Not responding” errors and some irritatingly crash-prone applications yourself.

If you have an unstable program that you absolutely need to run at all times, but don’t want to waste your time monitoring and manually restarting it every time it croaks, I might have something interesting for you.

Restart on Crash is an monitoring tool that will watch the applications that you specify and automatically relaunch any program that hangs or crashes. You can add any number of applications to monitor, enable/disable them individually and edit the command line that will be used to restart an application.

Restart on Crash doesn’t require installation and stores all it’s configuration data in a “settings.ini” file in the program’s folder, so it’s portable. It should be compatible with most NT-based Windows versions.

Download Restart on Crash (1.4 MB)

Screenshots & Documentation

Main application window

The main window

  • To add a new application to monitor, click the “Add” button or press the Ins key.
  • To delete on or more applications from the list, select them and click “Delete” or press Del.
  • To edit the per-application configuration, double-click the corresponding row. This will open the editing dialog (see below).
  • You can also access the RoC configuration by clicking “Settings” and view the activity log by clicking “Show Log”. The log contains information about crashed/hanged applications, executed commands, and so on.
Editing the monitor settings for an application

Editing the monitor settings for an application

Well, this one should be pretty self-explanatory 🙂 One detail to keep in mind is that enabling the “It isn’t running” option will make Restart On Crash treat the application as if it has crashed even if you have purposefully it closed it. You can get around this by disabling the monitoring of the application before you close it.

The configuration dialog. Yes, that's it.

The configuration dialog. Yes, that’s it.

“Grace period” is how long Restart on Crash will wait before trying to terminate/restart an application that it has just terminated/restarted. This is intended to prevent a scenario where RoC kills a hanged program, restarts it, decides it has hanged again (e.g. if the program is non-responsive while starting up) and wrongfully terminates it again.

Known Issues

  • If you configure RoC to automatically kill a hanged application, it will terminate all instances of that application when doing so. This may be fixed eventually.

Release Notes

2022-11-02

  • The “execute a command” feature can now launch shortcuts (.lnk files). Potentially, it can now run almost any type of file as long as file associations are set up correctly.

2019-12-17

  • Improved “application is not responding” detection.
  • Added a “Clear Log” button to the Log window.

2019-08-24

  • Added a “Restart Now” option to the application pop-up menu. It restarts the selected application immediately without waiting for the grace period to expire.
Related posts :

605 Responses to “Automatically Restart Crashed Or Hanged Applications”

  1. Jānis Elsts says:

    There is currently no facility for running an app for each user. I have virtually zero experience with that kind of an environment, so I can’t really suggest any workaround either. Sorry!

  2. Zach Malsberg says:

    Virustotal.com said Webroot detected “w32.trojan.miner” on this “RestartOnCrash.exe”

    May be false positive; until author comments, avoid using.

  3. Jānis Elsts says:

    I’m sure it’s a false positive. Still, to be safe, I updated the digital signature and re-uploaded the file. Now VirusTotal says it’s clean:
    https://www.virustotal.com/#/file/5edbccef61b88b03393f1cf8d84702afb77a1e66262b02f0f5e41c15658d7c32/detection

  4. Roberto says:

    Hello, Im experiencing an issue why is ROC terminate my software when it is still loading content, Im using a heavy content app inside my application but ROC understands there is a crash..

    I have modified the registry hangar string to wait 60000 miliseconds ( my application loads 600 images and videos and render it in real time and it take around 12 sec..

    How to configure ROC or may be there is another registry value that need to be modifired so ROC does not understand there is a crash.

    Please your help…

  5. Jānis Elsts says:

    Try increasing the “grace period” value in RoC settings and the “Wait X seconds and double check” value in application settings.

    I have modified the registry hangar string to wait 60000 miliseconds […]

    I’m not familiar with the term “registry hangar string”. Could you explain what it means?

  6. Bender says:

    What is the “Working directory” option?

  7. Jānis Elsts says:

    That would take a while to explain, so here’s a Wikipedia page instead:
    https://en.wikipedia.org/wiki/Working_directory

    In most cases, you don’t need to change the working directory.

  8. Zen says:

    if
    C:\A\App.exe
    C:\B\App.exe
    then it cannot monitor both applications.

  9. Hampster says:

    Is there a changelog? Seems like the app just updated.

  10. Jānis Elsts says:

    The update added a “minimize to the system tray on close” setting. That’s it.

  11. Hampster says:

    Alright rad, I just noticed the option. Thanks for app dude.

  12. Ace says:

    Merry Christmas! Thanks for the awesome App!

  13. Chris says:

    RoC isn’t able to close error windows that I’m encountering. In Windows 10 it says, “… has stopped working” and the button is labeled “Close program”. I would definitely pay for that feature!

  14. Steviant says:

    You can completely disable the annoying error report service that thrashes the CPU and wastes memory right when the system is deallocating resources by going to the registry key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting” and adding a new value Disabled=1.

    That will not only prevent the ridiculous error reporter dialogs, but will prevent slowdowns related to app crashes. WER is the kind of terribly thought out user-hostile implementation that is typical of Microsoft and makes programs like RoC neccesary in the first place.

  15. Jānis Elsts says:

    In theory, RoC should be able to close that window if you turn on the “Close all application.exe is not responding windows” option. Have you tried that and did it have any effect?

  16. Chris says:

    Yes I have that option enabled but it doesn’t close the prompt/window. Once I click on “Close program”, RoC restarts the application successfully.

  17. Chris says:

    Thanks Steviant. Disabling Windows Error Reporting worked!

  18. Chris says:

    If we want to support the author, what’s the best way?

  19. Jānis Elsts says:

    If you like, you could send something via PayPal. My account is: whiteshadow@w-shadow.com
    I don’t really have anything else set up.

  20. Trix says:

    It would be great to add a label to each monitored application.
    Because if you monitor the same application with different launch parameters in the command line, they all look the same in the list.
    Awesome app otherwise!

Leave a Reply