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: [0.9.1a] renderModules array index out of bounds  (Read 1123 times)

Histidine

  • Admiral
  • *****
  • Posts: 4661
    • View Profile
    • GitHub profile
[0.9.1a] renderModules array index out of bounds
« on: June 19, 2020, 04:07:41 AM »

From the mod troubleshooting guide thread (why do people post on that thread asking for help with crashes?)

Hi, so iam having an unknown issue with what i presume to be a mod that crashes my game after a couple of saves or after i leave the game running for a while. its probably not my memory either as i allocated 8gb to the game and these crashes happen regardless. here is what i have found that might be the cause of the issue. any help would be much appreciated.

https://pastebin.com/wGDhccyf
Code
1212146 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ArrayIndexOutOfBoundsException: 2
java.lang.ArrayIndexOutOfBoundsException: 2
    at com.fs.starfarer.campaign.fleet.FleetMemberStatus.getStatus(Unknown Source)
    at com.fs.starfarer.campaign.fleet.CampaignFleetMemberView.renderModules(Unknown Source)
    at com.fs.starfarer.campaign.fleet.CampaignFleetMemberView.renderSingle(Unknown Source)
    at com.fs.starfarer.campaign.fleet.CampaignFleetMemberView.render(Unknown Source)
    at com.fs.starfarer.campaign.fleet.CampaignFleetView.render(Unknown Source)
    at com.fs.starfarer.campaign.fleet.CampaignFleet.render(Unknown Source)
    at com.fs.starfarer.campaign.BaseCampaignEntity.render(Unknown Source)
    at com.fs.graphics.LayeredRenderer.render(Unknown Source)
    at com.fs.starfarer.campaign.BaseLocation.render(Unknown Source)
    at com.fs.starfarer.campaign.CampaignEngine.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$1.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
(searching here or Discord for renderModules hasn't turned up anything for me)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23987
    • View Profile
Re: [0.9.1a] renderModules array index out of bounds
« Reply #1 on: June 19, 2020, 09:59:55 AM »

Hmm - this seems like it'd have to be due to the set of modules of a ship-with-modules (or a station) changing. I mean, the set of modules that's specified in the variant. That happening is not supported and I suspect would cause other issues (in part since some code assumes a module's index stays the same).

Made a tweak so that it'll no longer crash there, but it 1) might crash everywhere, and 2) that's just plastering over the underlying problem if a variant undergoing some invalid changes.

Hard to say what's causing it, though! As I'm sure you can see from the stack trace, it doesn't give too much in the way of specifics. Could be some custom script, could be a custom fleet inflater, or, heck, could even be vanilla autofit somehow going off the rails.
« Last Edit: June 19, 2020, 10:01:30 AM by Alex »
Logged

omegalord

  • Ensign
  • *
  • Posts: 3
    • View Profile
Re: [0.9.1a] renderModules array index out of bounds
« Reply #2 on: June 22, 2020, 06:18:26 PM »

thnx for the reply! i'll try to disable some mods that might cause the issue and i'll go from there. hope it all works out.
Logged