Oolite reliable crash: Timers! SOLVED via Windows-Workaround
Moderators: winston, another_commander, Getafix
Well, since DEP is the reason why Oolite crashed, I'd suspect that both XP & Vista do detect when they themselves make the program crash.
One possibility is the usual windoze 'are you sure' annoyance. After seeing that type of message a few billion times, many of us simply go 'yeah, yeah, whatever'... I know I've done that myself in the past, just to go 'noooooh....' 3 milliseconds later.
Messages will be put up to point at this particular problem.
In the meantime: Screet, you've pointed out how serious it could be.
Could you please put - SOLVED as the title of this thread, so people who experience these otherwise mysterious crashes wth 1.73.4 in windows might have a chance to find the solution you found?
One possibility is the usual windoze 'are you sure' annoyance. After seeing that type of message a few billion times, many of us simply go 'yeah, yeah, whatever'... I know I've done that myself in the past, just to go 'noooooh....' 3 milliseconds later.
Messages will be put up to point at this particular problem.
In the meantime: Screet, you've pointed out how serious it could be.
Could you please put - SOLVED as the title of this thread, so people who experience these otherwise mysterious crashes wth 1.73.4 in windows might have a chance to find the solution you found?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
The strange thing is, they usually open an alert box and notify the user, giving the option to disable DEP for that particular program. Somehow, this mechanism does not happen for Oolite (tested with XP32 and Vista64). Instead, Oolite simply closes as if there was no crash.Kaks wrote:Well, since DEP is the reason why Oolite crashed, I'd suspect that both XP & Vista do detect when they themselves make the program crash.
You mean, changing the title of the initial message? Can do that...but I'd really like if someone with access to the devs bug-tracker or todo list would add something there that (if possible) the thing should be fixed in the code. That would not only make things easier for first-time ooliteers, but also can help devs to catch problems in the future, should there arise some.Kaks wrote:In the meantime: Screet, you've pointed out how serious it could be.
Could you please put - SOLVED as the title of this thread, so people who experience these otherwise mysterious crashes wth 1.73.4 in windows might have a chance to find the solution you found?
Screet
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
This feature appeared for the first time under Windows XP SP2, but probably defaults to "all programs" in later Windows versions. I have it on my system running XP SP3, but it is by default set to "essential Windows programs and services only". From what I read on MSDN, there are ways to overcome it programmatically, but I am not sure how they would be applied to the Oolite code. I would prefer to have the game code deal with this problem, but for now it may be a good idea to make it a notification in the readme file for Windows.
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
Re: ...
This is not a fix, it's a hack, at best a workaround.Lestradae wrote:For me personally this is solved now, thanks everyone, but I really, really think this should either be solved somehow from the core game side or it should be told to Windows users in a really big sticky or flag that they should disable this for the Oolite.exe!
A solution is where the screwing around with windows settings is not required.
The solution is achieved by updating the OXPs so that the scripts that start a timer, also stop the timer when the player enters witchspace.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
Re: ...
As Eric did point out, this would also require new triggers for OXPs as loading a commander does not provide a message to the scripts.pmw57 wrote:The solution is achieved by updating the OXPs so that the scripts that start a timer, also stop the timer when the player enters witchspace.
Screet
Hmmm. How about this approach:
Scripts may not use JS timers, but register for receiving timer info from Oolite? Oolite itself should know when an object (and thus it's script) is being removed, thus allowing to make this safe in all conditions.
It could also help since this would only require one general timer within Oolite which calls a method that checks which scripted timer requests should be triggered.
Screet
Scripts may not use JS timers, but register for receiving timer info from Oolite? Oolite itself should know when an object (and thus it's script) is being removed, thus allowing to make this safe in all conditions.
It could also help since this would only require one general timer within Oolite which calls a method that checks which scripted timer requests should be triggered.
Screet
-
- ---- E L I T E ----
- Posts: 389
- Joined: Sat Sep 26, 2009 2:14 pm
- Location: Christchurch, New Zealand
Re: ...
Isn't there an existing workaround for that, where the startUp event contains the init code, with the restart method passing to the startUp event?Screet wrote:As Eric did point out, this would also require new triggers for OXPs as loading a commander does not provide a message to the scripts.
http://wiki.alioth.net/index.php/OXP_mi ... ring_on_JS
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
even the Grim Reaper keeps his distance.
-- Paul Wilkins
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: ...
That problem will solve itself with 1.74 were scripts are completely restarted when loading a new commander. But I think we are dealing with two different problems.Screet wrote:As Eric did point out, this would also require new triggers for OXPs as loading a commander does not provide a message to the scripts.pmw57 wrote:The solution is achieved by updating the OXPs so that the scripts that start a timer, also stop the timer when the player enters witchspace.
Screet
A) Timers in ship scripts that are active when the script itself is removed. That could crash oolite 1.72 but ahruman changed that into a situation with 1.73 were this timer bug was logged instead of crashing Oolite.
B) A protection feature in some window versions that also leads to crashes when the script that generated the timer is still present.
And now B is discovered we can think about solutions for that.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
You know that there have been a few bugs found where I did post solutions on that thread and that as of today there's a version 0.7 out? For example, the fuel collector and some RMB missiles have been fixed. The fuel collector was able to crash via attempting to log something and RMB missiles had a potential for AI stack overflow.drew wrote:Er... woot! Work's for me as well! OSE wip 0.69 started working too!
Screet
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
That’s what a JS timer is.Screet wrote:Hmmm. How about this approach:
Scripts may not use JS timers, but register for receiving timer info from Oolite?
I’m not clear on what Oolite is doing to trigger DEP, but the most logical explanation would be that in some circumstances it’s calling an invalid function pointer or a method on a freed object. This requires some serious debugging, by someone who’s familiar with Windows.
E-mail: [email protected]
What's all this vendetta against timers for anyway?
Timers in worldscripts are not a problem in the slightest, and timers in ship-scripts we know the limitation and we code for it using the event for the player jumping.
If js scripts can't use timers, you may as well remove the whole damn thing and go back to legacy.
Timers in worldscripts are not a problem in the slightest, and timers in ship-scripts we know the limitation and we code for it using the event for the player jumping.
If js scripts can't use timers, you may as well remove the whole damn thing and go back to legacy.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Yes, both creating a timer without a valid method or creating one and then removing the scripted object (probably removing the script in the process) does seem to cause trouble. Trying to execute code for a deleted object, at least in C++, will cause DEP to trigger.Ahruman wrote:I’m not clear on what Oolite is doing to trigger DEP, but the most logical explanation would be that in some circumstances it’s calling an invalid function pointer or a method on a freed object. This requires some serious debugging, by someone who’s familiar with Windows.
If Oolite has to handle the timers already...maybe it's just requiring some cleanup when it invalidates the source of the script which created the timer by removing the timer instantly.
Screet