You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a feeling this is related to several refits that I had running at the time...
java.lang.ArrayIndexOutOfBoundsException: -1
at mekhq.campaign.unit.Unit.initializeParts(Unit.java:1771)
at mekhq.campaign.Campaign.createCampaignFromXMLFileInputStream(Campaign.java:3969)
at mekhq.gui.dialog.DataLoadingDialog$Task.doInBackground(DataLoadingDialog.java:184)
at mekhq.gui.dialog.DataLoadingDialog$Task.doInBackground(DataLoadingDialog.java:113)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
Just had it happen on a new save, this time i didnt have any refits going.
I did some testing and figured out the cause. Refitting an Elemental [MG] point to the [MG 2] variant causes the save file to become unloadable after the refit is finished.
test save is the save before the refit is done, test2 is the save after the refit is done and the save cannot be loaded.
Edit : Looking at the test 2 campaign save, it seems that mekhq assigns 1 BA suit part per elemental point. Refitting the elemental point causes you to order 5 suit parts instead (1 per trooper) instead of 1 per point. Deleting all the new suit parts allows the save to be loaded. The original trooper suit part also had trooper set to 5 (for the size of the squad) while the extra suit parts from the refit all had trooper set to -1. Changing -1 to 5 allows the campaign save to be loaded as well.
Dylan-M
changed the title
3.27 : Campaign file cannot be loaded (ArrayIndexOutOfBounds)
Campaign file cannot be loaded (ArrayIndexOutOfBounds)
Oct 2, 2016
I have a feeling this is related to several refits that I had running at the time...
java.lang.ArrayIndexOutOfBoundsException: -1
at mekhq.campaign.unit.Unit.initializeParts(Unit.java:1771)
at mekhq.campaign.Campaign.createCampaignFromXMLFileInputStream(Campaign.java:3969)
at mekhq.gui.dialog.DataLoadingDialog$Task.doInBackground(DataLoadingDialog.java:184)
at mekhq.gui.dialog.DataLoadingDialog$Task.doInBackground(DataLoadingDialog.java:113)
at javax.swing.SwingWorker$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at javax.swing.SwingWorker.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
#battletech.zip
The text was updated successfully, but these errors were encountered: