CANNOT addShipsAt: -bug

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

Moderators: winston, another_commander, Getafix

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:

CANNOT addShipsAt: -bug

Post by Commander McLane »

What about the

Code: Select all

[script.addShips.failed]: SCRIPT ERROR in <anonymous actions> ***** CANNOT addShipsAt:
kind of bugs in 1.72.1? Do we know anything more about them now?

I usually get them when I am running Oolite 1.72.1 with total_patrol.oxp and Commies.oxp installed. Therefore I thought the conditions in Commies' shipdata are somehow responsible.

Yesterday I installed Galactic Navy (v 4.0), and got the same error messages in combination with total_patrol. So I expected to find the same use of conditions in Galactic Navy's shipdata, but nada. No conditions for adding ships. So I am asking myself: what is causing the failure to spawn police ships in combination with Galactic Navy? What is the common denominator between Commies and Galactic Navy?

Up to this point I don't know. But I want to share the question. And hopefully the coders will be able to squash the bug.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: CANNOT addShipsAt: -bug

Post by Svengali »

Commander McLane wrote:
What about the

Code: Select all

[script.addShips.failed]: SCRIPT ERROR in <anonymous actions> ***** CANNOT addShipsAt:
kind of bugs in 1.72.1? Do we know anything more about them now?
Maybe the same as in JS-scripts (Vector3D instead of Vector). The brackets ([ ]) are missing?
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:

Post by Commander McLane »

No. This is a kind of bug where the JS-syntax is perfect (see original report here), but the existence of a totally unrelated OXP screws up with the actual ship creation. Up to now I only knew of Commies causing this. Now also Galactic Navy does it, although for completely different reasons, if the reason I assumed for Commies was correct.

If neither of these OXPs is present, the error message disappears, and the ships appear. So it can't be the syntax in total_patrol.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Can you post the section of JS code that's generating the error?

I'd wonder if there's perhaps a roles clash or something, so instead of spawning a ship from your OXP the system populator is actually picking one from the other OXPs instead? That's the only kind of scenario I can think of, unless it's something very abstract (doing something like that anyway in-spite of set roles).

Also is that the full extent of the error message?
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:

Post by Commander McLane »

Please refer to this thread for full explanation.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Thargoid wrote:
Can you post the section of JS code that's generating the error?
It doesn't look like a JS-warning - more like a legacy-script problem.
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:

Post by Commander McLane »

As Ahruman explains in this thread, it is indeed a JS problem.

Problem is, as he points out in his first post over there, that
it successfully parsed the parameters, and got as far as trying to create the ships, but this failed. Normally this indicates a bad role. Failing to find a police ship seems unlikely, though.
However, my only intention here in this new thread is to say that my theory from the other thread, that the conditions in Commies' shipdata.plist are a major contributing factor, seems to be incomplete in the light of the fact that Galactic Navy (without conditions in shipdata.plist) leads to the same error.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I've had similar experiences of problems with the conditions key with PlanetFall. I was going to write an add-on to give Navy Offices as a location using the conditions to limit their appearance. But even with systems where the conditions would have been fulfilled, they didn't appear and gave errors.

One thought I would have is that a lot of the ships in GN are giving start-up log errors relating to their flashers. That doesn't explain why your OXP may be calling them into being, but it may influence why once called they can't appear?

A test you could do is to add the three missing parts to the flashers in GN and see if the problem persists or not. That could eliminate some aspect of it, and you could perhaps then also see exactly which entity is being mis-spawned.
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:

Post by Commander McLane »

Thargoid wrote:
One thought I would have is that a lot of the ships in GN are giving start-up log errors relating to their flashers. That doesn't explain why your OXP may be calling them into being, but it may influence why once called they can't appear?

A test you could do is to add the three missing parts to the flashers in GN and see if the problem persists or not. That could eliminate some aspect of it, and you could perhaps then also see exactly which entity is being mis-spawned.
Already had done that in the first place. (And installed Behemoth.oxp, in order to resolve the 'missing like_ship' problem.)

The problem was unaffected.

Even stranger: GN doesn't even contain a single ship with role 'police', so it really isn't clear why the creation of ships with role police should fail with GN installed. Yet it does.
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:

Post by Commander McLane »

New idea: Perhaps the problem is rooted specifically in the code-routine that adds ships with role 'police' to the Ooniverse? I got the idea because the only ships that seem to be affected in my setting are ships with role 'police'.

Furthermore, I remember that I have lately encountered ships with primary role 'police' in places where there shouldn't have been such ships. First I didn't wonder too much about it, but now I recall two or three instances. One was in the middle of a huge battle during a test-run of Cataclysm. The battle takes place very far from the space lanes, so I can exclude the possibility that they just strolled over from a usual patrol. And Cataclysm doesn't add any police at that point of the story. So where did they come from? I don't know.

Hope this is helpful.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Commander McLane wrote:
New idea: Perhaps the problem is rooted specifically in the code-routine that adds ships with role 'police' to the Ooniverse? I got the idea because the only ships that seem to be affected in my setting are ships with role 'police'.
Maybe it is a combination. Conditions with a specific role-setting and scanClass? So any wrong setting causes trouble - not only for this oxp, for all other oxps too. And this could also break missions. We'd better find out what goes wrong .-)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

My understanding of this bug is that it’s a problem with the code that selects a ship for a given role by selecting at (weighted) random, running conditions and removing ships where conditions fail from the set for consideration. In other words, I think I know where to look for the problem, but haven’t done so yet. :-)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Ahruman wrote:
My understanding of this bug is that it’s a problem with the code that selects a ship for a given role by selecting at (weighted) random, running conditions and removing ships where conditions fail from the set for consideration. In other words, I think I know where to look for the problem, but haven’t done so yet. :-)
But I haven't got any of these problems with my own oxps. I'm currently using conditions in Vector.oxp and Localhero.oxp (WIP) and there everything is ok. The ships are always there where I expected them, everytime. But when I use RS (3.02 or beta-WIP) none of my mission-ships is created anymore.

Does it mean that if one oxp has this specific problem (somehow broken settings), the generation generally gets a problem?
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 »

Svengali wrote:
... The ships are always there where I expected them, everytime. But when I use RS (3.02 or beta-WIP) none of my mission-ships is created anymore.

Does it mean that if one oxp has this specific problem (somehow broken settings), the generation generally gets a problem?
You wrote to me that the problem disappeared when you took out all the player ships from RS.

Perhaps that's a hint? As far as I know nothing in the shipdata.plist of RS or the OSE WiP is broken in any way ... so the question would also be, if "this specific problem" even exists, what the specific problem actually is?

Could it be that it has to do with the amount of ships that are added into the game? Then RS/OSE would immediately get into trouble ...

Puzzled

L
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Lestradae wrote:
Puzzled
Me too. I think we have to wait for the coders to get an answer.

But in the meantime I'll add one player-ship after the other again to your shipdata to see what happens.
Post Reply