Automatically re-launch max patch upon crashing in XP.. A solution!!
So it took me ages before I worked out how to do this, the big problem was dealing with those XP dialogue boxes when you get a crash; they would insist on a user click before killing the thread! However now that I have finally come across a solution I thought I would share it with y’all.
How to setup an XP computer to automatically load a max patch on bootup and to automatically relaunch the max patch if it crashes.
1) Open the main patch in Max/MSP, go to edit mode, create a new message box and in it type
; max crash
Now lock the patch. Save the patch. This message box is now a ʻself-destructʼ button that we will use to make max/msp crash and burn (with a simulated memory access violation). Press it and make sure that the patch crashes.
2) Download ʻRestart on Crashʼ (RoC). Go to http://w-shadow.com/blog/2009/03/04/restart-on-crash/
4) open the patch in MaxRuntime.
5) open RestartOnCrash.exe
– click Add
– press ʻSelect a running application..ʼ
– select ʻMaxRT.exeʼ (this is Max/MSP runtime)
– in the ʻExecute a commandʼ window, add the path to the patch you want to launch in a separate pair of quotes. i.e. it should contain the path to MaxRT.exe in one pair of quotes, a space, and the path to the patch in another pair of quotes.
For example: "C:Program FilesCycling ʼ74Max 5.0MaxRT.exe" "C:Documents and SettingsFred DesktopCrazyPatch.maxpat"
6) Make sure the tick boxes ʻItʼs not responding to Windows messagesʼ AND ʻIt isnʼt runningʼ are both ticked. Also make sure both ʻKill the processʼ and ʻExecute a command:ʼ are both ticked. Press ok. If your patch isnʼt running RoC will now launch it.
7) Do a couple of tests.
a: Close the patch. It should be relaunched.
b: Press our magic ʻauto-destructʼ button. Weʼll get an error message, but the patch will be killed and restarted anyway. (Even without needing to press anything on the error dialogue box.. yeay!! The dialogue box will still be there, and we may build up a small collection of them, but they are harmless ;)
8) In ʻRestart On Crashʼ, press the Settings button. Tick ʻRun RoC when Windows startsʼ.
9) Quit everything and restart the computer. Voila! Victory!
NOTE: If the patch takes a long time to boot, RoC might kill it before it has fully booted. This might happen a couple of times while windows is booting, but once all of windows is up and running, it should do it fine. If the patch under normal circumstances takes over a minute to boot, increase the ʻGrace periodʼ value in the RoC general settings.
Forums > MaxMSP