Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

The Oolite Extended Project - Fork, no oxp

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

pmw57 wrote:
Screet wrote:
IMPORTANT:
If you are using Windows, please ensure that Data Execution Prevention is turned OFF for Oolite (or in general).

This is not an issue of OSE, but of several OXPs - it can arise with all shipscripts that use timers.
Dur... is that a Control panel setting, or in the BIOS?
L just did update the message while I was adding mine ;)

It's a bit hidden...please follow the steps that L did add to the message with the download link.

Would I have known this a year ago, it would have spared me from oh-so-much frustration including playing without RS/OSE for quite some time and spending hours of bughunting...

Screet
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

turned it off for Oolite, thanks for the warning,
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

Screet wrote:
It's a bit hidden...please follow the steps that L did add to the message with the download link.

Would I have known this a year ago, it would have spared me from oh-so-much frustration including playing without RS/OSE for quite some time and spending hours of bughunting...
Cheers.

Is it not normally a bad thing for executable code to be stored in a data area?

Perchance, would this be a bug, that doesn't exist yet because a bug report for it has not been written?
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

pmw57 wrote:
Is it not normally a bad thing for executable code to be stored in a data area?

Perchance, would this be a bug, that doesn't exist yet because a bug report for it has not been written?
As of today, there's a bug report in the test part of the forum.

It's a problem since a ship that has a scripted timer may be destroyed or removed once the player jumps or reloads. The js timer still is active then and will operate on parts of code that are no longer valid. Somehow it's not causing a crash if DEP turned off, but as the bug seems to come from some underlying lib and not oolite itself, windows does not even notice. Oolite would simply close without any hint at what went wrong (typically windows would open an alert box that the program tried to execute data and offer to disable DEP). It may result in logged messages hinting at the problem IF DEP is switched off, but with DEP on, the crash occurs too early to log that info.

Screet
matthewfarmery
Dangerous
Dangerous
Posts: 100
Joined: Sat Oct 10, 2009 7:19 pm

Post by matthewfarmery »

also this post here will tell you

http://www.tech-recipes.com/rx/566/xp-s ... ature-dep/

then again, I did have problems with DEP when I was using a processor that didn't support hardware DEP, so it was running in software mode, and that gave me loads of DEP related crashes, since I upgraded to a CPU (Intel Q6600) which supports hardware DEP, I generally haven't had an issue what so ever, but I have turned it off as I said for Oolite, just need to reboot, however I will test OSE later, for now Im helping another company beta test one of their new products, but later on today I will be back and will test out OSE
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

I suggest filing a bug report on BERLIOS, or is that what you did anyways? :wink:
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Post by pmw57 »

Screet wrote:
As of today, there's a bug report in the test part of the forum.

It's a problem since a ship that has a scripted timer may be destroyed or removed once the player jumps or reloads. The js timer still is active then and will operate on parts of code that are no longer valid. Somehow it's not causing a crash if DEP turned off, but as the bug seems to come from some underlying lib and not oolite itself, windows does not even notice. Oolite would simply close without any hint at what went wrong (typically windows would open an alert box that the program tried to execute data and offer to disable DEP). It may result in logged messages hinting at the problem IF DEP is switched off, but with DEP on, the crash occurs too early to log that info.
I know that I'm preaching to the choir here, but this issue is something that is a potential showstopper. This may be due to my support of computer users in general, but 80% of the potential Windows audience wouldn't know the first thing about changing data execution settings for their computer, and a few more just simply won't out of security concerns.

Let's do what we can to help this get fixed as quickly as possible.
Last edited by pmw57 on Mon Oct 12, 2009 10:48 am, edited 1 time in total.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Well, the only thing we could do would be to take the offending timer out of the two scripts in OSE Screet found - the buzzer and the behemoth one.

Screet, are you sure these two are the only ones that can - unintendedly use this Windows §"%$§&§& feature?
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: ..

Post by Screet »

Lestradae wrote:
Well, the only thing we could do would be to take the offending timer out of the two scripts in OSE Screet found - the buzzer and the behemoth one.

Screet, are you sure these two are the only ones that can - unintendedly use this Windows §"%$§&§& feature?
I did make a find in files for timer and then tried to locate all scripts which were used as ship script instead of global script. Those are the ones I came up with.

An additional instance (probably harmless due to a slightly different timer usage) is in military fiasco when shooting-off the subentities of certain ships.

As for know, I suggest to leave the timers in, but try to make them as safe as possible (eric had some idea, but it looks like it's impossible for ship scripts to cover all situations that could cause a problem).

Screet
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Lestradae wrote:
Well, the only thing we could do would be to take the offending timer out of the two scripts in OSE Screet found - the buzzer and the behemoth one.
When the player exits the system, does the shipDied event get called for the NPC ships? If so then that is the perfect place to stop the timer and prevent further issues.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

pmw57 wrote:
When the player exits the system, does the shipDied event get called for the NPC ships? If so then that is the perfect place to stop the timer and prevent further issues.
If not, then perhaps a shipCleanup method or some-such similar method is justified.
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: ..

Post by Commander McLane »

pmw57 wrote:
Lestradae wrote:
Well, the only thing we could do would be to take the offending timer out of the two scripts in OSE Screet found - the buzzer and the behemoth one.
When the player exits the system, does the shipDied event get called for the NPC ships? If so then that is the perfect place to stop the timer and prevent further issues.
I would rather expect that the playerWillEnterWitchspace event gets called. That's where I placed the delete timer as well.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Commander McLane wrote:
pmw57 wrote:
Lestradae wrote:
Well, the only thing we could do would be to take the offending timer out of the two scripts in OSE Screet found - the buzzer and the behemoth one.
When the player exits the system, does the shipDied event get called for the NPC ships? If so then that is the perfect place to stop the timer and prevent further issues.
I would rather expect that the playerWillEnterWitchspace event gets called. That's where I placed the delete timer as well.
Has anyone tested using playerWillEnterWitchspace to clean up the timer ecents?
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: ..

Post by Commander McLane »

pmw57 wrote:
Has anyone tested using playerWillEnterWitchspace to clean up the timer ecents?
Yes, as mentioned earlier.

Code: Select all

this.playerWillEnterWitchspace = function()
{
	this.findPlayer.stop()
	delete this.findPlayer
}
findPlayer is (obviously) the name of the timer.
pmw57
---- E L I T E ----
---- E L I T E ----
Posts: 389
Joined: Sat Sep 26, 2009 2:14 pm
Location: Christchurch, New Zealand

Re: ..

Post by pmw57 »

Commander McLane wrote:
pmw57 wrote:
Has anyone tested using playerWillEnterWitchspace to clean up the timer ecents?
Yes, as mentioned earlier.

Code: Select all

this.playerWillEnterWitchspace = function()
{
	this.findPlayer.stop()
	delete this.findPlayer
}
findPlayer is (obviously) the name of the timer.
Lestradre - are you up to producing a point release with this fix, so that the DEP hack is no longer required?
A trumble a day keeps the doctor away, and the tax man;
even the Grim Reaper keeps his distance.
-- Paul Wilkins
Post Reply