Ship.shipDisplayName

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

Moderators: winston, another_commander, Getafix

Post Reply
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

Ship.shipDisplayName

Post by Lestradae »

I am having regular crashes to desktop when launching from a station, usually the main station.

And the Log always tells me that javascript-wise "Ship.shipDisplayName" is deprecated. Two or ten times after each other.

I know that this command is not used by any of the .js scripts in OSE, has anyone an idea which oxp this might be from, or is it even from an oxp? And how could it be related to the desktop crash on main station launch trouble?

I would really care for more info, thanks in advance

L
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6630
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Totally unrelated to the crash to desktop, as already discussed countless times till now. If you look closely at the message, it is a warning, not an error and Oolite is just letting you know before it goes ahead and uses the equivalent non-deprecated method, which in this case would be Ship.displayName.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

It's just a warning, it shouldn't do anything for crashes. Currently the game will automatically do the substitution to the correct command, although this will change in 1.73 when the command is no longer recognised (hence the warnings all through 1.72.x's life).

As to which are using it, depends what you've got installed (a huge list iirc) but also if your versions are up to date (most OXP writers will update their scripts for such depreciations).

Simplest way is probably to use a decent search tool to look for that string within the files in your add-on folder (you can limit the search to *.js files). Then all you need to do is modify those files and change shipDisplayName to displayName if I remember correctly.
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 »

Thargoid wrote:
Currently the game will automatically do the substitution to the correct command, although this will change in 1.73 when the command is no longer recognised (hence the warnings all through 1.72.x's life).
Hm, I didn't provide important information: Those crashes only happen with my trunk 1.73 build from yesterday, not with my used-for-gaming 1.72.2!

So if that command is no longer recognised, still no chance of it producing a crash to desktop somehow?
another_commander wrote:
as already discussed countless times till now
Huh, don't stone me as yet, A_C *ducks trumble barrage*

Didn't mention I was talking about the 1.73 trunk, my bad ...
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6630
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The statement stands. The command is still automatically recognized and substituted and it is not the reason for your crash to desktop.

For future reference, the JavaScript warnings about deprecated methods do NOT result in crashes to desktop.
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 »

another_commander wrote:
For future reference, the JavaScript warnings about deprecated methods do NOT result in crashes to desktop.
OK, got it! :)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post by DaddyHoggy »

Confused (easy I know).

If the warnings in 1.72.2 about Ship.shipDisplayName being deprecated are because they will no longer be supported in 1.73 onwards and Lestradae is testing with the 1.73 trunk, then either they haven't been deprecated/removed in 1.73 or I'm missing something...

:?
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Ditto, hence my original comments above.

I too thought that things that were depreciated in 1.72.x would be removed in 1.73.x? Or am I missing probably the same point as DH?

Although such an error I agree will at worse just stop that particular script, and not cause a desktop crash.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6630
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

I am not sure when exactly Ahruman was planning to remove the deprecated methods from circulation, but the only sure thing is that they are still in for now.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

I dont think 1.73 exsits as such. It is simply the name of the current trunk, isnt it?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Ah OK, that's rather clearer.

They possibly (or probably) won't be in the 1.73 official final test release, but they are currently in the WIP build-it-yourself release that we're colloquially calling 1.73 at the moment.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Post by Cmdr James »

Deprecated methods should not be used, and whilst it should be assumed that they will be removed, it is not safe to depend on them no longer existing.

It is quite likely that some of the deprecated methods will be removed quickly, as few people use them, and others may live longer due to a larger number of legacy OXP dependencies.

Overall the message is not to use anything deprecated in new work, and for legacy OXPs remove references as soon as practicable.
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 »

Cmdr James wrote:
Overall the message is not to use anything deprecated in new work, and for legacy OXPs remove references as soon as practicable.
Thargoid wrote:
Simplest way is probably to use a decent search tool to look for that string within the files in your add-on folder (you can limit the search to *.js files).
I know that nothing deprecated is in 1.72.2 OSE V0.4 atm, but there sure is in oxps I'm using.

Can anyone recommend me a good and cheap/gratis search tool for this?
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Try starting with the one built into Vista?

The one in XP has enough brainpower to find phrases within files, so I guess unless they've been up to their usual lobotomising form the one in Vista should do likewise?
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:
Can anyone recommend me a good and cheap/gratis search tool for this?
http://notepad-plus.sourceforge.net/uk/site.htm

Screet
Post Reply