So while troubleshooting
this thread to ensure I am not also doing something to cause this crash (since my mod was present on the list of a few of these reports) I get to this line in BattleAutoresolverPluginImpl.java:
490 member.getStatus().applyHullFractionDamage(damage, i);
This relies upon dealing damage to individual fighters in a wing according to the comments? Even though its looking for modules in this case? So, if I am understanding this correctly (though I doubt I am considering how obscure the code is in this particular section is and I suspect its been reused from its original use case) something is going on with:
463 String slotId = member.getVariant().getModuleSlots().get(i - 1);
464 variant = variant.getModuleVariant(slotId);
- which is causing an array out of bounds when trying to apply the calculate damage based upon the index being passed in. The weird thing is that "i" isn't supposed to be able exceed the number of "statuses" though what this actually means is unclear to me considering the notes seem to indicate it can be the number of wing members in a fighter wing or the number of modules on a ship depending upon a context that isn't really defined:
458 float num = member.getStatus().getNumStatuses();
459 boolean someActiveRemaining = false;
460 for (int i = 0; i < num; i++) {
But! Based upon this line:
455 if (member.isFighterWing()) return;
- my guess is the context is whether the FleetMemberAPI is a fighter wing or a ship. And in this case its looking for ships only to check for modules.
Histidine thinks this may be due to improperly defined modules in the mod, but I was wondering if there was any additional insight from the backend side of things. Cross referencing vanilla code seems to indicate everything is defined properly - unless I am missing something but it isn't obvious to me anyway.
Thanks for any additional help in advance! Hopefully I can track this thing down as I think it has happened in other mods too and just having the information out there would likely prove useful to modders in general if they are making stations or moduled ships.
I've cross reference over half of my station files and nothing seems out of the ordinary compared to the vanilla implementation.