Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: ‘Fatal: Null’ error on entering hyperspace (Nexerilin 0.7.5c, LazyLib 2.1)  (Read 5228 times)

eattext

  • Ensign
  • *
  • Posts: 3
    • View Profile

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?
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

This is a vanilla bug.  PM Alex to move it to the correct section.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile

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.
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

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.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile

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.
Logged

eattext

  • Ensign
  • *
  • Posts: 3
    • View Profile

Thanks guys, that makes sense, as I had just wiped out the last Pirate market.

Galactic justice – was it worth it?
« Last Edit: July 14, 2016, 04:27:32 AM by eattext »
Logged

Weltall

  • Admiral
  • *****
  • Posts: 774
    • View Profile

Lesson from the crash; Balance should be kept. There is no good without evil!
Logged
Ignorance is bliss..

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile

In the meantime you can use the console command setmarketowner <market> pirates to return the pirates to the Sector.

I think either SS+ or DynaSector also fixes the bug?
Logged

Dark.Revenant

  • Admiral
  • *****
  • Posts: 2806
    • View Profile
    • Sc2Mafia

Nope, SS+ just changes the creator script, not the event itself.
Logged

eattext

  • Ensign
  • *
  • Posts: 3
    • View Profile

In the meantime you can use the console command setmarketowner <market> pirates to return the pirates to the Sector.

Thank you.
Logged