Oolite abends randomly? (famous Planets 2.0 prob, maybe)

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

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Gnudoll
Dangerous
Dangerous
Posts: 92
Joined: Wed May 12, 2010 2:08 am
Location: Berkeley California

Oolite abends randomly? (famous Planets 2.0 prob, maybe)

Post by Gnudoll »

My system:
P4 @2.8Ghz, 2Gb RAM, nVidea Geforce FX 5200 AGP video Debian Linux v5.05

Oolite 1.74.1
OXPs:
Plagerist HUD, DeepSpace Ships, accessoies, BGS-A1.0, Ore Processor 1.57, famous Planets v2.0.

After installing BGS, I started abending randomly from in game (game dumps to the desktop). looking at the logs, I see a lot of lines like this:

[script.javaScript.warning.ooliteDefinedError]: /usr/lib/GNUstep/Applications/oolite.app/Resources/Scripts/oolite-global-prefix.js, line 221.
[script.javaScript.warning.ooliteDefinedError]: ----- JavaScript warning (Famous Planets Launch Script 1.2): Planet.setTexture() is deprecated, use planet.texture = "foo" instead.
[files.notFound]: ----- WARNING: Could not find texture file "Sotiqu.png".
[script.javaScript.warning.ooliteDefinedError]: ----- JavaScript warning (Famous Planets Launch Script 1.2): Cannot find texture "Sotiqu.png". Value not set.

all of the errors seem to point to Famous Planets v2.0, which is why I suspected it. Particularly after I pulled BGS out of my AddOns folder and started Oolite with the shift pressed to clear the cache, and it kept happening. . .

Does upgrading to Famous Planets v2.5 fix this problem?
User avatar
Gnudoll
Dangerous
Dangerous
Posts: 92
Joined: Wed May 12, 2010 2:08 am
Location: Berkeley California

Post by Gnudoll »

Well, I upgraded Famous Planets to v2.5, and still got errors. I did dig out the error from DeepSpaceShips from a misnamed .png file, and that gave me the confidence to go into the log and find what was actually happening.

It seems that either a lot of files were misnamed in 2.0, or they were missing. also there was an error in the JavaScript using a depreciated function to load the planet textures. This actually remained into v2.5, but it was a matter of changing one line to fix that. I'm now able to play without errors in my logfile.

The error
[script.javaScript.warning.ooliteDefinedError]: ----- JavaScript warning (Famous Planets Launch Script 1.2): Planet.setTexture() is deprecated, use planet.texture = "foo" instead.

was fixed by changing this line:

system.mainPlanet.setTexture(system.name + '.png');

to this:

system.mainplanet.texture = "system.name + '.png'";

Hope this helps others that may have this problem!
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

Post by Kaks »

You'll be making OXPs of your own before you know it! :)

Just one thing: even though it won't generate an error, the way you've rewritten it, might not assign the right texture.

However, if you change that line to

system.mainPlanet.texture = system.name + '.png';

it will do the right thing! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

And it's not actually an error, it's a warning.

It won't become an error until 1.75, when the depreciation that you're being warned about becomes a removal, and the old command (setTexture() in this case) is taken out.
User avatar
Gnudoll
Dangerous
Dangerous
Posts: 92
Joined: Wed May 12, 2010 2:08 am
Location: Berkeley California

Post by Gnudoll »

so are you saying that that error (the only ones I could find in the logs) was not what was causing Oolite to dump to the desktop at seeming random?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Those ones shouldn't be (unless something has gone drastically wrong) as the code is still working (you're still getting all the effects of FP, correct?).

That isn't to say that there could be something else in the script, but what you've reported above are depreciation warnings (despire the script.javaScript.warning.ooliteDefinedError ending in Error).
Post Reply