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 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 correspoding 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.
Related posts :

240 Responses to “Automatically Restart Crashed Or Hanged Applications”

  1. JimDD says:

    Apologies, answering my own question…I needed to start RestartonCrash with Run as administrator. I set the RestartOnCrash shortcut Properties > Advanced to Run as administrator and I’m all set.

  2. JimDD says:

    Answering my own question – I set the RestartOnCrash shortcut Properties > Advanced to Run as administrator, and all is good.

  3. Dan P says:

    Small ask — can you add a log entry to your log when the USER closes down RestartOnCrash?

    Use case: Want to upgrade one of the apps that RoC is monitoring. I close the RoC app, update the app and then restart RoC. The log entries make this appear as a crash.

    It would be fantastic if you put a log entry in the RoC Log that said “Orderly shutdown of RoC Application by user”.

    Thanks for considering.

  4. Dan P says:

    Thanks for the v1.3.3 update!

  5. Steve says:

    Virustotal Scan:
    Jottis Malwarescanner:

  6. liang says:

    When “Working directory” have quotation mark, it will got error at restart.

  7. John says:

    Nice work…first app out of 12 that actually works and is not full of bloat

  8. Timboo says:

    restart on crash likes to crash it’s self for me using windows server 2012 :(

  9. Lupin says:

    The program seems to ignore the command line arguments of the processes. If I enter a process to monitor with command line arguments it will always be listed as crashed (although it is started correctly). In my case I have several instances of ffmpeg and VLC for example for a streaming setup on a remote PC with the only differences between the processes being the command line arguments. One of them stops once in a while.

  10. Jānis Elsts says:

    That is correct. The program looks at the list of running processes to determine if the target process still exists. There is no way to reliably retrieve the command line of another process.

  11. Lupin says:

    Ok, that’s a bummer. At least for ffmpeg I got around this by copying and renaming the exe multiple times. It’s annoying, since there has to be one for each process I need and if updating ffmpeg it’s a PITA. I don’t know with how many other programs this will work. But since it’s a Windows limitation there’s not much you can do.

    Another thing I came accross: could you add an option to disable the monitoring completely? I don’t mean to set the checkmark of all applications in the list to disabled, just suspend monitoring until the option is set otherwise. The default would be to monitor and run the enabled applications, at least if there’s already a settings.ini as not to break existing setups. The option should be overrideable by a command line argument (which I would set for the shortcut I put into autostart for example). The point is that when starting RoC manually via Explorer it’s most likely to add or edit applications and in that case at least I didn’t want all the applications I enabled to start up. But when RoC is started automatically via autostart for example it will be to monitor the applications.

  12. […] problem with crashes and hang is that you need to restart the application every time this happens. Restart on Crash is a freeware tool which will watch the applications that you specify and automatically relaunch […]

  13. […] is a helpful application monitoring tool that offers to restart programs that crash or hang. The download is available at the developer’s […]

  14. grateful user says:

    Great little tool. One (basic) question:

    The option to “run RoC when windows starts” sees to work as expected
    Where is this enacted though? I couldn’t see it installing itself in the list of services or scheduled tasks, and the startup folder remained empty…?

  15. Jānis Elsts says:

    It adds the application to the registry. Specifically, this key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run.

  16. grateful user says:

    Cheers – I never new that key existed :-)

  17. grateful user says:

    Out of interest, are there any known circumstances under which this utility may fail to see an active program?

    I have a java app that uses JR7

    If I run tasklist from cmd the process I am trying to monitor shows as “java.exe”
    However, when running your utility, and pointing it at “C:\Program Files……\jre7\bin\java.exe” this process seems never to be detected, resulting in continuous restarts….

    Happy NY!

  18. Jānis Elsts says:

    I haven’t encountered that kind of problem before.

    Does it show up in the list that’s displayed when you click “Select a running application…” in the “Add New Application” window? What filename does it show if you select it?

    Maybe it could be related to permissions. Is this Java app running as an administrator? If so, is RoC also running as an admin?

  19. grateful user says:

    Ok – it was “error in front of keyboard”

    It seems that when java is installed, rather than adding itself to the system PATH, it automatically adds a copy of the java executable to WINDOWS/system32

    That means that when I was looking for the java.exe process being run from the jre7 directory, I was actually looking in the wrong place

    Now all is working fine :-)

  20. […] wieder neu­ge­startet werden. Nervig. Nun bin ich auf ein Tool mit dem ein­deu­tigen Namen Re­start On Crash ge­stoßen, dass die ganze Pro­zedur au­to­ma­tisch ab­wi­ckelt. Dabei lassen sich […]

Leave a Reply