Fractal Softworks Forum

Starsector => Bug Reports & Support => Bug Reports & Support (modded) => Topic started by: eattext on July 13, 2016, 07:27:40 AM

Title: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: eattext on July 13, 2016, 07:27:40 AM
Starsector crashes when my fleet enters hyperspace i.e. right after the screen transitions from regular space to hyperspace. Extract from log file as follows:

Code
101294 [Thread-6] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
 java.lang.NullPointerException
at com.fs.starfarer.api.impl.campaign.missions.MarketProcurementMissionEvent.createPirateFleet(MarketProcurementMissionEvent.java:215)
at com.fs.starfarer.api.impl.campaign.missions.MarketProcurementMissionEvent.advance(MarketProcurementMissionEvent.java:172)
at com.fs.starfarer.campaign.events.CampaignEventManager.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignEngine.advance(Unknown Source)
at com.fs.starfarer.campaign.CampaignState.advance(Unknown Source)
at com.fs.starfarer.BaseGameState.traverse(Unknown Source)
at com.fs.state.AppDriver.begin(Unknown Source)
at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)

Any ideas?
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: Dark.Revenant on July 13, 2016, 09:18:41 AM
This is a vanilla bug.  PM Alex to move it to the correct section.
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: Alex on July 13, 2016, 10:30:12 AM
This is already fixed in vanilla. The issue comes up when there are no pirate markets at all in the Sector; for the moment if a mod makes this condition possible, it should probably also either replace the MarketProcurementMissionEvent code or add a dummy pirate market somewhere.
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: Dark.Revenant on July 13, 2016, 11:52:47 AM
By bug in vanilla I typically mean the code path breaks in the API or engine without explicitly being given incorrect inputs.  Ideally it would fail and print an error in the log rather than crash.
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: Alex on July 13, 2016, 11:55:39 AM
Oh, yeah, I totally agree that it's a bug in vanilla. Didn't mean to imply it wasn't; just pointing out the cause and possible workaround until the next release.
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: eattext on July 14, 2016, 04:17:41 AM
Thanks guys, that makes sense, as I had just wiped out the last Pirate market.

Galactic justice – was it worth it?
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: Weltall on July 14, 2016, 04:32:02 AM
Lesson from the crash; Balance should be kept. There is no good without evil!
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: Histidine on July 14, 2016, 05:33:49 AM
In the meantime you can use the console command (http://fractalsoftworks.com/forum/index.php?topic=4106.0) setmarketowner <market> pirates to return the pirates to the Sector.

I think either SS+ or DynaSector also fixes the bug?
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: Dark.Revenant on July 14, 2016, 10:22:06 AM
Nope, SS+ just changes the creator script, not the event itself.
Title: Re: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)
Post by: eattext on July 14, 2016, 07:14:40 PM
In the meantime you can use the console command (http://fractalsoftworks.com/forum/index.php?topic=4106.0) setmarketowner <market> pirates to return the pirates to the Sector.

Thank you.