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 :

226 Responses to “Automatically Restart Crashed Or Hanged Applications”

  1. Marco says:

    Hello! two days ago I had a problem with this program: VNC crashed again and RoC wasn’t able to recover it. When I was able to come back to my PC, I saw an error message saying that VNC was already running on the machine. This means that RoC was not able to totally kill the previous locked instance and when trying to run a new one, it produced the error. Besides, since the error is a window of VNC, after that RoC was assured that VNC was working, since there was a window to witness that…

    How can this be avoided? Thanks.

  2. White Shadow says:

    I imagine this could be worked around by making RoC check the window title to make sure it really is the right one. Alas, I don’t have the time to implement that.

  3. RazZziel says:

    Is there any version for Linux? Is the source code available? I’d like to fix some small bug, like that when you start it minimized, it starts minimized to the task bar, not to the system tray.

  4. Marco says:

    White Shadow: I think it would be enough to have a timer to set a wait time since when an application is terminated and when it’s restarted once again. My problem was probably due to the fact that when RoC tried to start the application, it was not terminated, yet.

    This should be very fast to implement, and I’ll be more than happy to test the new version. Thanks.

  5. [...] D’altra parte per evitare di dover riavviare manualmente gli applicativi utilizzati più di frequente, possiamo affidarci a “Restart on crash“.  [...]

  6. Sam says:

    Will please consider putting an option in the system tray menu that will close all the apps RoC is monitoring, including RoC itself. This would be very handy. Of course, by “close” I mean the normal close not the force close that RoC uses on crashed programs.

    thanks

  7. Sam says:

    What ways are there to be informed of updates to RoC?

  8. Andy says:

    Source code would be great; I would love to make some customizations as well. You’d need to pick a licensing scheme. GNU General Public License would be a good choice… no one could make money from your labor and any changes would be sent back to you.

    Andy

  9. Sam says:

    To solve the minimize to task bar, although it’s suppose to minimize to system tray, you need to send the post message “0×112, 0xF020″ to the RoC window. Since I”m not really a programmer, I had to get AutoHotkey to do this for me.

    PostMessage, 0×112, 0xF020,,, Restart On Crash

  10. Suraj says:

    Great work W-Shadow. its working fine, and amazing softwear….

    Thanks!

  11. [...] Restart on Crash es un programa portable y gratuito que proporciona la funcionalidad de reiniciar los programas después de un accidente mediante el control y supervisión después de una caída del programa. Usted puede agregar cualquier número de aplicaciones para controlar, activar o desactivar individualmente y editar la línea de comandos que se utiliza para reiniciar una aplicación. [...]

  12. saurabh agrawal says:

    Roc…..wonderfull software !!!….Where can i find its documentation…????

  13. Leo says:

    hi there,i tried your format to solved my crashed program but can’t find it,though i used your steps you gave.please help,
    My computer tells me this program has crash.
    What should i do now. Thanks.

  14. Mino says:

    FINALLY i found this, and works great!
    it’s wonderfull software!!!
    THANKS!

    ..and sorry for my bad english :p

  15. me says:

    Feature request: start prog. in high priority.

  16. Stephan says:

    Not responding : [00000FC0] , cant i know where it crash in my program ?
    thanks, great program !

  17. Stephan says:

    is it posible to download the code (or buy) , i want to include in my visual basic program .

  18. alex says:

    Waaaaaaaa….this is a cool software that could solve my question !!

    thanks a lot !!

Leave a Reply