The Death Crash || Prevention?
-
The Death Crash
I just had one of those cases where the project crashes and returns with all of the scripts completely wiped. Scary.
Good thing I was just practicing some filesystem api's in a scratch project....
I also just seen somebody in the forum had this happen to them with one of their projects that they were almost done with. Even scarier...
Looking back, I was trying to make a script for sliderPack presets so I was writing to an object on my desktop for testing.
Everything was working fine until I I started changing the the key variable 'presetFileName' before writing to object again.
var newObject = {}; newObject[presetFileName] = theseValues;
I pressed the button assigned to run the script..
crashy
...and i returned to awiped
project file.
My Questions:
-
What might I have been doing that specifically causes the project to be wiped clean?
(I have crashes all the time but never wiped clean)
-
Based on what I've described, how can I take precautions to lessen the likelyness of this happening again?
Thanks ahead of time for any input!
-
-
@Chazrox said in The Death Crash || Prevention?:
I just had one of those cases where the project crashes and returns with all of the scripts completely wiped.
Are you using the develop branch?
Had you compiled your scripts?
-
@d-healey Im on develop branch and I was in a scratch project that was basically empty with the exception of a button and a sliderpack.
As far as I know, im sure I F5'd before I pressed the button again.
Could that have been the problem that the script ran before commiting the change?
Wouldn't that mean it would have just ran the script that was already working? -
@Chazrox said in The Death Crash || Prevention?:
Could that have been the problem that the script ran before commiting the change?
Not sure what you mean by committing the change.
Scripts are saved when you press F5 so if you didn't do that it wouldn't be saved.
-
@d-healey I have a button running the script at the time. I was using the button the script was working. I made some changes in the script and pressed the button again.
What I mean by running the script is pressing the button before pressing F5 again after changing the script.
Would it have read the changes in the code editor or ran what was last commited?
-
@Chazrox If you'd pressed F5 even once and saved your project then the script shouldn't have been wiped. Sounds like a bug, if you can find a way to reproduce it that would be helpful.
-
@d-healey I did save an .xml and even tho I made multiple changes and saves to that file and pressed F5 a bunch of times. It just decided to do that. The saved .xml file is in fact wiped.
its a habbit to cmd+s, AND cmd+shift+s after every change.
-
@Chazrox said in The Death Crash || Prevention?:
The saved .xml file is in fact wiped.
The project xml is wiped and the script file is wiped?
-
@d-healey the .xml file is still there and shows in my saved menu but when I open the .xml file in a text editor its empty.
-
@Chazrox said in The Death Crash || Prevention?:
the .xml file is still there and shows in my saved menu
There are two xml files, one for the UI data and one for the module tree. When you say it's empty, do you mean it's a completely empty file?
What about the script file?
-
The files I checked were in these directories:
Project Folder/ Presets/ Project.hip
Project Folder/ XMLPresetBackups / project.xml
Project Folder/ Scripts / ScriptProcessors / project.xmlthe script looks like this in those files:
include("SliderPackPRINTERbyRGLIDES.js"); function onNoteOn() { } function onNoteOff() { } function onController() { } function onTimer() { } function onControl(number, value) { }
the include.js here is also wiped.
No shade on @rglides because he gave me a working script so we're clear. lol. I was tinkering.
-
@Chazrox said in The Death Crash || Prevention?:
Project Folder/ Scripts / ScriptProcessors / project.xml
There shouldn't be an xml in the Scripts folder.
-
@d-healey sorry thats a .js file. Its still Empty. Everything with the project name on it is reset to default.
-
Ok so it looks like there is a critical bug here. Are you able to recreate the crash?
-
@d-healey super critical. Good thing I back up the entire project folder after ever new function added. I'll lose a few hours of work at most. I'll see about recreating that.