Java Null Pointer Exception
Closed this issue · 6 comments
just finished transferring a planet to another faction since I'm currently late-game exterminating the Hegemony, saved, and now when I load up about 30 seconds later it crashes with this as the listed reason.
196114 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain - java.lang.NullPointerException
java.lang.NullPointerException
at com.fs.starfarer.api.impl.campaign.econ.impl.BaseIndustry.startUpgrading(BaseIndustry.java:489)
at exerelin.world.NexMarketBuilder.addMilitaryStructures(NexMarketBuilder.java:547)
at exerelin.campaign.ColonyManager.buildIndustries(ColonyManager.java:1228)
at exerelin.campaign.ColonyManager.buildIndustries(ColonyManager.java:1249)
at exerelin.campaign.ColonyManager.reportMarketTransfered(ColonyManager.java:1185)
at exerelin.utilities.ExerelinUtilsMarket.reportMarketTransferred(ExerelinUtilsMarket.java:365)
at exerelin.campaign.SectorManager.transferMarket(SectorManager.java:1237)
at exerelin.campaign.SectorManager.transferMarket(SectorManager.java:1019)
at exerelin.campaign.InvasionRound.conquerMarket(InvasionRound.java:427)
at exerelin.campaign.InvasionRound.npcInvade(InvasionRound.java:293)
at exerelin.campaign.intel.invasion.InvActionStage.performRaid(InvActionStage.java:243)
at exerelin.campaign.intel.invasion.InvActionStage.autoresolve(InvActionStage.java:290)
at exerelin.campaign.intel.invasion.InvActionStage.updateStatus(InvActionStage.java:148)
at com.fs.starfarer.api.impl.campaign.intel.raid.BaseRaidStage.advance(BaseRaidStage.java:106)
at com.fs.starfarer.api.impl.campaign.intel.raid.ActionStage.advance(ActionStage.java:25)
at exerelin.campaign.intel.invasion.InvActionStage.advance(InvActionStage.java:62)
at com.fs.starfarer.api.impl.campaign.intel.raid.RaidIntel.advanceImpl(RaidIntel.java:214)
at exerelin.campaign.intel.fleets.OffensiveFleetIntel.advanceImpl(OffensiveFleetIntel.java:401)
at com.fs.starfarer.api.impl.campaign.intel.BaseIntelPlugin.advance(BaseIntelPlugin.java:75)
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(Unknown Source)
It's trying to upgrade a station that doesn't exist, but the code shouldn't allow this.
Can you post a zip of the save? That'll help me find out what's going wrong.
I'm a class act at breaking code, here's the save.
save_DuckerFucker_3751841493936607388.zip
Well after some investigation it seems it has nothing to do with the war I enacted, as I started from an earlier save and didn't start the way but the game encountered the same error in roughly the same in-game timeframe
Okay, figured out the problem:
- Luddic Church captures Home 2
- NPC construction AI sees the Autonomous AI Battlestation there and tries to upgrade it
- ...but no such upgrade exists, so it crashes
The workaround is to install the Console Commands mod, jump Penelope's star
, goto Home 2
, use the kill
command and click on all the Church fleets so they die and the invasion fails. Or just scrap the battlestation.
The "clean" Nex-side fix doesn't seem to work. I may try the unclean fix or tell Boggled to fix it on the end; in the meantime, I'll report the relevant issue to Alex.
EDIT: Or maybe I can fix it, thought of a way.
Huh. Well shit, thanks, I would have never figured that one out.
Fixed in 0.9.8b, thanks for report!