Crash in 1.77: AsteroidStorm4.03 + thargoid_carrier2.0

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

Moderators: winston, another_commander

Post Reply
Bogatyr
---- E L I T E ----
---- E L I T E ----
Posts: 281
Joined: Sun Feb 24, 2013 11:52 am

Crash in 1.77: AsteroidStorm4.03 + thargoid_carrier2.0

Post by Bogatyr »

I encountere a crash upon jumping into Leesti with AsteroidStorm4.03, and after failing the mission so that the station was destroyed. With thargoid_carrier2.0, the game crashes on entry to the system.

Here's a save file one jump away from Leesti that shows the crash:

https://www.box.com/s/s0p4arjyennkj2uihf6z

I removed all OXPs except these two and the crash still occurs. It makes sense, thargoid_carrier is probably not checking for the possibility that the station does not exist.

CmdrLuke (Bogatyr)
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: Crash in 1.77: AsteroidStorm4.03 + thargoid_carrier2.0

Post by Eric Walch »

Thanks for the clear analysis of the problem. :D

It is probably this line in Thargoidcarrier were it goes wrong:

Code: Select all

var otherSystemStations = system.filteredEntities(this, $isOtherSystemStation, system.mainStation);
This line should return null itself and than the following line:

Code: Select all

if(otherSystemStations.length > 0)
should throw an error as null has no length. :wink:

Crashing itself is an Oolite bug. I'll check it tonight if system.filteredEntities could crash oolite with a null parameter.
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: Crash in 1.77: AsteroidStorm4.03 + thargoid_carrier2.0

Post by Commander McLane »

Thanks for the report and analyses. Fixed for the next version. In the meantime you can fix it yourself by inserting the line

Code: Select all

        if(!system.mainStation) return;
just in front of the first line quoted by Eric.
Bogatyr
---- E L I T E ----
---- E L I T E ----
Posts: 281
Joined: Sun Feb 24, 2013 11:52 am

Re: Crash in 1.77: AsteroidStorm4.03 + thargoid_carrier2.0

Post by Bogatyr »

Commander McLane wrote:
Thanks for the report and analyses. Fixed for the next version. In the meantime you can fix it yourself by inserting the line

Code: Select all

        if(!system.mainStation) return;
just in front of the first line quoted by Eric.
Glad to help out. Thanks for the workaround, I could then jump into Leesti without crashing ;)
Post Reply