Oolite build 4633 on Win XP "ship.script is undefined"?

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Switeck »

This is the errors I'm getting:

13:58:26.359 [log.header]: Opening log for Oolite development version 1.75.4.4633 (x86-32 test release) under Windows at 2011-10-30 13:58:26 -0500.
4 processors detected.
Build options: spoken messages, mass/fuel pricing, JavaScript console support, OXP verifier, localization tools, debug GraphViz support, JavaScript profiling.
13:58:26.609 [rendering.opengl.version]: OpenGL renderer version: 3.3.0 ("3.3.0"). Vendor: "NVIDIA Corporation". Renderer: "GeForce GTS 250/PCI/SSE2".

Exception: TypeError: ship.scriptInfo is undefined
Active script: NPC-shields 1.0
script.js, line 55:
if(ship.isSubEntity || ship.isStation || ship.isThargoid || ship.isRock || ship.isCargo || ship.isWeapon || ship.isDerelict || ship.primaryRole === "wreckage" || ship.scanClass === "CLASS_BUOY" || (ship.scriptInfo.npc_shields && ship.scriptInfo.npc_shields === "no")) return;

16:23:03.437 [log.header]: Opening log for Oolite development version 1.75.4.4633 (x86-32 test release) under Windows at 2011-10-30 16:23:03 -0500.

16:23:30.265 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (snoopers_modelview 2.1.2): TypeError: ship.script is undefined
16:23:30.265 [script.javaScript.stackTrace]: 0 (snoopers_modelview.js:54) <anonymous function>
16:23:30.265 [script.javaScript.stackTrace]: this: [Script "snoopers_modelview" version 2.1.2]
16:23:56.625 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined
16:24:09.093 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined
16:24:09.562 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script.shieldStrength is undefined
16:24:10.062 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script.shieldStrength is undefined
16:24:10.562 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script.shieldStrength is undefined
16:24:11.062 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script.shieldStrength is undefined
16:24:17.062 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined
16:24:27.281 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined
16:24:27.453 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script.shieldStrength is undefined
16:24:33.921 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined
16:24:44.593 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined
16:25:03.812 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined
16:25:12.984 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (oolite-default-ship-script 1.75.4): TypeError: ship.script is undefined


I uninstalled build 4633 and reinstalled 4630...and do not get these ship.script errors on it!
I wish I knew more, but I'll have to do an immense amount of OXP testing to determine if they're to blame. :(
The most recent Snoopers, boomberg markets, npc shields OXPs seem to be the ones that "complain" the most. :P


In debug console, I get this:

> player.ship.target.scriptInfo
{
callObjC: function () {
throw Error("callObjC() is disabled.");
}
}
> ship.script
Exception: ReferenceError: ship is not defined
Active script: oolite-debug-console 1.75
oolite-debug-console.js, line 823:
}
Connection closed with no message.

If anyone else runs the latest nightly build, can you confirm if these or similar errors appear in your latest.log?
User avatar
Ironfist
Commander
Commander
Posts: 218
Joined: Tue Jun 28, 2011 2:16 pm
Location: London

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Ironfist »

Just installed R4633 on Windows XP/32 SP3 and I am not seeing any errors like this. I think it must be an OXP that is causing the problem.

Ironfist
64bit Mint 10 and Win 8 64bit on E8400 at 3.6GHz - ATI HD5750 graphics.
Concentration is the ability to think of absolutely nothing when it is absolutely necessary.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Eric Walch »

No idea what goes wrong I get in the console:

Code: Select all

> player.ship.target.scriptInfo
{}
And that is correct as the target has no scriptInfo defined.
The only commit that might have changed something in combination with dying ships is r4632. But I don't think this has anything to do with it.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Cody »

Nightly build r4633 on Win XP x32 SP3

Just tried this... on two out of five launches, I got similar errors to Switeck.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by another_commander »

Eric Walch wrote:
No idea what goes wrong I get in the console:

Code: Select all

> player.ship.target.scriptInfo
{}
And that is correct as the target has no scriptInfo defined.
The only commit that might have changed something in combination with dying ships is r4632. But I don't think this has anything to do with it.
Eric, are you using a debug build? Not sure why callObjC() is invoked (and no time to investigate either), but this method is disabled in non-debug builds. The nightlies are built as release configurations and that might be the difference that does it.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Eric Walch »

Eric Walch wrote:
The only commit that might have changed something in combination with dying ships is r4632. But I don't think this has anything to do with it.
I think this commit has to do with it after all. At least the change in "OOJSEntity.h" as it is now, is wrong. It tries to fix a bug but introduces another. Normally you can access all ship data in the shipDied() event. This is no longer true. During this event the ship status is temporary set to STATUS_DEAD so that scripts know they deal with a dead ship. However, in r4632 this status is now added to the check if it is a valid ship. And for getting ship properties by JS this valid test now fails during this handler.

It bugs some of my oxps, but I don't get above errors in my reports, just that the property is invalid / undefined. But its likely the same bug.

Not tested, but I think that things like spawning debris on death no longer work since r4632 when the ship's properties and its methods becomes invalid during the shipDied() event. :P
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Kaks »

Hmm, looks like not enough testing done with r4632 - does r4634 (from tonight onwards) fix this problem?
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Switeck »

Hard to say...what with http://terrastorage.ath.cx/oolite/status_win32.html being down.

I could try a debug-compile-from-source, but I already have problems with compiled debug builds:
https://bb.oolite.space/viewtopic.php?f=3&t=11084
User avatar
Capt. Murphy
Commodore
Commodore
Posts: 1127
Joined: Fri Feb 25, 2011 8:46 am
Location: UK South Coast.

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Capt. Murphy »

Switeck - nightly 4634 was built before terrastorage.ath.cx went down.

http://nightly.oolite.org/windows/oolit ... .win32.exe

I've just tried the direct link and it's still there but will be automatically deleted in the next few days.

I've got a copy of the windows installer for 4634 if you miss the download.
[EliteWiki] Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: Oolite build 4633 on Win XP "ship.script is undefined"?

Post by Switeck »

I haven't seen this error again since I first reported it.
But of course I've updated to newer versions of Oolite nightly, so it's probably been fixed. :)
Post Reply