programmed loop crash recovery

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 02/06/2009 at 15:53, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   11 
Platform:      Mac OSX  ; 
Language(s) :   C.O.F.F.E.E  ;

---------
Greetings,
   I've used this once before and just helped a friend out today- might be obvious to many or already posted, but I can't find it. If you're coding away in a coffee expression or coffee node in an Xpresso tag you might create an infinite loop, hit save, before you execute, crash, and when you try to reload, depending on the rest of the code prior to the loop, may always crash c4D as it tries to process the loop on loading.
   You don't need to go all the back to the previously saved iteration of the file. You can open the .c4d file in a text editor, scroll through the garbled binary to your recognizable coffee code, cut and paste it and save the file. If you try to load this, it will only load the first character, click through it in your text editor and you'll notice it takes to clicks to move between adjacent characters. Open the file in Xcode for example and you can see that every other character contains an invisible character, visible in Xcode as "¿". Just search and replace with nothing to delete these, save the file, load it into a new Coffee tag or whatever in your previous iteration, and FIX THE BAD LOOP before you hit execute.
   As a novice coder, I find it helpful to put a purposeful syntax error into my code before I save the file, then fix it and hit execute, if you crash, you can save yourself to the last iteration- of the file only seconds old.
   Others may have suggestions for salvaging the entire C4D file with the Bad Loop, but I usually only need the code...
Cheers,
Graham