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
While testing the new heatmaps, a (quite possibly unrelated) error appears frequently in the logs.
11:33:16,191 ERROR [megamek.client.bot.princess.FireControl] {Red Princess Turn 0 Calc Thread} megamek.client.bot.princess.FireControl.entityCanIndirectFireMissile(FireControl.java:2434) - null java.util.ConcurrentModificationException at java.base/java.util.Vector$Itr.checkForComodification(Vector.java:1298) at java.base/java.util.Vector$Itr.next(Vector.java:1254) at megamek.common.EquipmentType.hasModeType(EquipmentType.java:556) at megamek.common.Mounted.hasModeType(Mounted.java:240) at megamek.client.bot.princess.FireControl.entityCanIndirectFireMissile(FireControl.java:2426) at megamek.client.bot.princess.Princess.initFiringEntities(Princess.java:1801) at megamek.client.bot.princess.Princess.getEntityToFire(Princess.java:1773) at megamek.client.bot.princess.Princess.calculateFiringTurn(Princess.java:639) at megamek.client.bot.BotClient.calculateMyTurnWorker(BotClient.java:529) at megamek.client.bot.BotClient.calculateMyTurn(BotClient.java:487) at megamek.client.bot.BotClient$CalculateBotTurn.run(BotClient.java:65) at java.base/java.lang.Thread.run(Thread.java:840)
This is most likely caused by modifying a dataset containing Mounted or EquipmentType instances while traversing the same dataset.
The entityCanIndirectFireMissile() call just happens to be where we hit this, and is not directly connected.
LOL. I'd spotted this about 5 months back, added some comment to be aware of the issue, and then forgotten -_-;.
Simplest solution is just to use an explicit iterator loop when checking if any weapons have the Indirect mode.
Environment
Developmental
Linux
Java 17
Description
While testing the new heatmaps, a (quite possibly unrelated) error appears frequently in the logs.
11:33:16,191 ERROR [megamek.client.bot.princess.FireControl] {Red Princess Turn 0 Calc Thread} megamek.client.bot.princess.FireControl.entityCanIndirectFireMissile(FireControl.java:2434) - null java.util.ConcurrentModificationException at java.base/java.util.Vector$Itr.checkForComodification(Vector.java:1298) at java.base/java.util.Vector$Itr.next(Vector.java:1254) at megamek.common.EquipmentType.hasModeType(EquipmentType.java:556) at megamek.common.Mounted.hasModeType(Mounted.java:240) at megamek.client.bot.princess.FireControl.entityCanIndirectFireMissile(FireControl.java:2426) at megamek.client.bot.princess.Princess.initFiringEntities(Princess.java:1801) at megamek.client.bot.princess.Princess.getEntityToFire(Princess.java:1773) at megamek.client.bot.princess.Princess.calculateFiringTurn(Princess.java:639) at megamek.client.bot.BotClient.calculateMyTurnWorker(BotClient.java:529) at megamek.client.bot.BotClient.calculateMyTurn(BotClient.java:487) at megamek.client.bot.BotClient$CalculateBotTurn.run(BotClient.java:65) at java.base/java.lang.Thread.run(Thread.java:840)
Files
megamek.log
Round-9-autosave_2024-07-10_11-44-20.sav.gz
Round-10-autosave_2024-07-10_11-46-36.sav.gz
The text was updated successfully, but these errors were encountered: