- The first one is the most problematic. It just means that the code ran to long. I don't see a direct reason for it. It could be that the 'takeSnapShot()' command is the culprit. When I look in the Oolite code I think that the time it takes to save the picture is included in the time a JS function is allowed to run.
Interesting, perhaps it works the same for ALL commands within one function, it's just that 'takeSnapShot()' uses a lot of time and is at the end of a long function. Perhaps if you put it in a function of it's own the error will disappear as the time for the previous stuff won't be added to it.
I have the same problem in my numeric hud script using frame callbacks with lots of remove and award equipment commands. It's very rare considering the number of times it goes through a digit function but you can expect sometimes a dozen errors or so for script ran too long in a couple of trips between systems and all the combat that changes gauges heavily. It's very very rare as there are up to 23 digits to draw every second frame 60 times per second. In over 20000 digit function passes only 12 errors. I made it as efficient as I could without rewriting the digit functions completely to break the numbers further into functions for individual value checks while drawing 1 digit. That might actually result in the whole oxp scipt taking more time causing the fps to drop slightly just so that an individual script function doesn't run too long.
Perhaps the time allowed for script functions should go up a little. Or maybe there is something internal/hardcoded that can very temporarily increase the time it takes for script functions to run. The reason I think this is that I would expect if I'm getting errors of this nature that they would be more consistent and most of the time instead of intermittent.
If putting the 'takeSnapShot()' in its own function doesn't fix the problem then the script time needs to be increased or there is an internal problem, maybe one that affects the time of all script functions intermittently. Just a thought.
Take an idea from one person and twist or modify it in a different way as a return suggestion so another person can see a part of it that can apply to the oxp they are working on.
CommonSense 'Outside-the-Box' Design Studios Ltd.