Fractal Softworks Forum

Starsector => Bug Reports & Support => Bug Reports & Support (modded) => Topic started by: ShangTai on April 20, 2021, 04:35:56 AM

Title: Crash during regenerate "typical heavy patrol".
Post by: ShangTai on April 20, 2021, 04:35:56 AM
Hi, My game crashed during regenerate "typical heavy patrol". Can someone localize source?

Log:
Spoiler
14197728 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ArrayIndexOutOfBoundsException: 1
java.lang.ArrayIndexOutOfBoundsException: 1
   at com.fs.starfarer.campaign.fleet.FleetMemberStatus.getStatus(Unknown Source)
   at com.fs.starfarer.ui.A.B.o00000(Unknown Source)
   at com.fs.starfarer.ui.A.B.o00000(Unknown Source)
   at com.fs.starfarer.ui.A.B.new(Unknown Source)
   at com.fs.starfarer.campaign.ui.O0OO.o00000(Unknown Source)
   at com.fs.starfarer.ui.k.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.Oo0oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO$Oo.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.Oo0oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.ui.S.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.o0Oo.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.command.if.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.campaign.command.return.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.E.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.N.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.newui.o0oO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.ui.oO00OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.renderImpl(Unknown Source)
   at com.fs.starfarer.ui.interface.render(Unknown Source)
   at com.fs.starfarer.campaign.CampaignState.render(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.o00000(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Mod list:
Spoiler
{"enabledMods": [
  "$$$_lightshow",
  "pantera_ANewLevel25",
  "Adjusted Sector",
  "raccoonarms",
  "lw_autosave",
  "timid_admins",
  "beyondthesector",
  "CaptainsLog",
  "chatter",
  "lw_console",
  "diyplanets",
  "diableavionics",
  "XLU",
  "GrandColonies",
  "hte",
  "IndEvo",
  "kadur_remnant",
  "lw_lazylib",
  "leadingPip",
  "ArkLeg",
  "MagicLib",
  "Mayasuran Navy",
  "nexerelin",
  "ORA",
  "m561_ramscoop",
  "roider",
  "tahlan_scalartech",
  "scy_bluesky",
  "SCY",
  "SEEKER",
  "speedUp",
  "eli95",
  "tahlan",
  "Terraforming and Station Construction",
  "exalted",
  "star_federation",
  "TORCHSHIPS",
  "transfer_all_items",
  "US",
  "vayrashippack",
  "XhanEmpire",
  "prv",
  "shaderLib"
]}
[close]
Title: Re: Crash during regenerate "typical heavy patrol".
Post by: Timid on September 15, 2021, 04:25:19 PM
My guess is this is somehow related to a ship with modules, but it's unfortunately impossible to tell from the stack trace which ship or which mod it is. There's also an outside chance this *could* be caused by a vanilla station.

Whatever it is, it looks like it happens when you mouse over the fleet (or station) with the culprit ship in it.

This seems to be a common issue over the past... 2 years recorded in the forum that I cannot make a new thread for this.

I was able to replicate this issue consistently inconsistently (yes an oxymoron, sometimes it crashes sometime it doesn't but at least I can reproduce the crash somewhat) when spawning s-modded fleets WITH a module ship as a flagship or regenerating heavy patrols with module ships. And it's baffling why it crashes. I stalked the fleet that was bound to crash and it could do everything that I observed (attacking a fleet, looking around, and moving around). Only hovering over or viewing its fleet stats through an InteractionDialog created a CTD similar to the OP here and mine. So what's inside FleetMemberStatus.getStatus to suddenly arrive at an OutofBound? It seems to affect every ship with a module, whether it is a weapon-less one, shield-less one, or just a blank one.

It made me wonder whether the fleet was giving a lower CR to the modules... but it shouldn't be doing that right? Lower hull integrity perhaps when inflated? I do not know. I will try to keep investigating and fiddling with being blind to see what can trigger it.

Code
91330 [Thread-3] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ArrayIndexOutOfBoundsException: 1
java.lang.ArrayIndexOutOfBoundsException: 1
at com.fs.starfarer.campaign.fleet.FleetMemberStatus.getStatus(Unknown Source)
at com.fs.starfarer.ui.oOOO.OoOO.o00000(Unknown Source)
at com.fs.starfarer.ui.oOOO.OoOO.o00000(Unknown Source)
....

This ask me to wonder... are we missing something?
Title: Re: Crash during regenerate "typical heavy patrol".
Post by: Alex on September 16, 2021, 09:10:06 AM
Hmm - if you're able to get this crash with a minimal modset and can get me a savefile where I can make it happen, I could probably squeeze in a look!
Title: Re: Crash during regenerate "typical heavy patrol".
Post by: Timid on November 27, 2021, 01:35:26 PM
Hmm - if you're able to get this crash with a minimal modset and can get me a savefile where I can make it happen, I could probably squeeze in a look!
Sorry for the wait, I've managed to get the crash with a very minimal modset and can get you a savefile where you could make it happen to squeeze a look!

(Don't note the file size, it's only big because GraphicLib and Iron Shell take up 60 MB of that space)
https://mega.nz/file/2h8xTa7J#pmKujZCGcgz_aoPFyEdJEnpwxv5Noogsf7g6a-GDQoc

I've attached a save file, you can just load and hover over one of two of these big fleets and the crash is easily reproducible.

(https://i.imgur.com/sBK3ODB.png)

This is because the code is using
Code
                        fleet.setCommander(Global.getSector().getImportantPeople().getPerson("eisdarren"));
                        fleet.getFlagship().setFlagship(true);
                        fleet.getFlagship().setVariant(Global.getSettings().getVariant("eis_tyrant_standard"), false, true);
                        fleet.getFlagship().setCaptain(Global.getSector().getImportantPeople().getPerson("eisdarren"));
To set the fleet's flagship to the a ship with modules which causes unintended CTD?

I'm seeming able to do this with any ship with modules.
Title: Re: Crash during regenerate "typical heavy patrol".
Post by: Timid on December 10, 2021, 06:33:26 PM
I was able to find the source of my bug and solved my bug, but I wish I found the solution to this OP thread...

Basically my hypothesis lies within the FleetMemberAPI...

you can't replace a Kite or any module-less ship with a ship with modules.

Basically have to just remove the Kite and add the ship with modules. Then sort the fleet data out.

FleetMemberAPI.setVariant probably needs to check and make sure it has the same amount of modules in order to set variants to or else game will CTD.