Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

47.15 Infinite loop after hitting Start Mass Repair/Salvage? #2297

Closed
gsparks3 opened this issue Dec 19, 2020 · 3 comments · Fixed by #2300
Closed

47.15 Infinite loop after hitting Start Mass Repair/Salvage? #2297

gsparks3 opened this issue Dec 19, 2020 · 3 comments · Fixed by #2300
Assignees
Labels
Milestone

Comments

@gsparks3
Copy link
Collaborator

Environment

47.15
Windows 10
Java version 11.0.8

Description

MekHQ locked up after hitting "Select Active Units" and "Start Mass Repair/Salvage". Buttons in said menu are no longer responding, but program overall is not listed as Not Responding. CPU usage is moderate and fluctuating, but continuous. Immediately prior to this I had completed a scenario and disbanded a few infantry units I wasn't using.

Screenshot as of bug:
image

Files

Error in mekhqlog, but I'm not certain if it has anything to do with the issue. Didn't see anything in megameklog.

megameklog.txt
mekhqlog.txt

Will edit to add campaign save file and reproduction steps if I can get it to reproduce after force-quitting. Annoyingly, I don't have a save immediately prior to the error - might have to redo the scenario as well.

@gsparks3
Copy link
Collaborator Author

Okay, loading from the save and trying to Mass Repair before completing the scenario had no issues, but after completing the scenario again (and saving before testing further) I can now consistently reproduce the issue. Not sure why it changed exactly, but debug tools should tell you more.

Save:
Coppercoats.cpnx.gz
No custom units.

Reproduction steps:

  1. Load campaign file
  2. Navigate to Repair Bay and open Mass Repair/Salvage menu
  3. Click Select Active Units
  4. Click Start Mass Repair/Salvage

@sixlettervariables
Copy link
Contributor

Error from the log:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Index -3 out of bounds for length 50
	at megamek.client.ui.swing.widget.InfantryMapSet.setEntity(InfantryMapSet.java:83)
	at megamek.client.ui.swing.unitDisplay.ArmorPanel.displayMech(ArmorPanel.java:256)
	at megamek.client.ui.swing.unitDisplay.UnitDisplay.displayEntity(UnitDisplay.java:313)
	at megamek.client.ui.swing.ReportDisplay.hyperlinkUpdate(ReportDisplay.java:315)
	at java.desktop/javax.swing.JEditorPane.fireHyperlinkUpdate(JEditorPane.java:345)

@sixlettervariables
Copy link
Contributor

The infinite loop is in the conversion from LRM 15 ammo to LRM 5 ammo. The warehouse has enough shots but the load bin routine believes there is not enough. Investigating the correct fix now.

@sixlettervariables sixlettervariables self-assigned this Dec 20, 2020
@sixlettervariables sixlettervariables added this to the 0.48-stable milestone Dec 20, 2020
sixlettervariables added a commit that referenced this issue Dec 21, 2020
…mmo-fail-larger-to-smaller-racksize

Issue #2297: Ensure shots needed is converted properly between ammo types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants