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

[50.02] ClassCastException on manuel game resolve #5648

Closed
4 tasks done
mwberlindeu opened this issue Jan 5, 2025 · 2 comments · Fixed by #5673
Closed
4 tasks done

[50.02] ClassCastException on manuel game resolve #5648

mwberlindeu opened this issue Jan 5, 2025 · 2 comments · Fixed by #5673

Comments

@mwberlindeu
Copy link

Brief Description *

I have to recorded two instances that games that were manually resolved using a .mul file lead to a ClassCastException. The severity appears low. I could not detect any issue with the actual units, being transfered back to the campaign. Possibly there is a connection to a subsequent cargo capacity report beeing triggered but I think this is unlikely as I could not observe the bug if the resolution was triggered automatically with the manual selection of a .mul file.

10:10:32,568 ERROR [mekhq.MekHQ] {AWT-EventQueue-0}
mekhq.MekHQ.lambda$main$1(MekHQ.java:296) - Uncaught java.lang.ClassCastException detected. Please open up an issue containing all logs, the game save file, and customs at https://github.com/MegaMek/megamek/issues . If Sentry is enabled, the error has also been logged.
java.lang.ClassCastException: class mekhq.campaign.mission.Scenario cannot be cast to class mekhq.campaign.mission.AtBScenario (mekhq.campaign.mission.Scenario and mekhq.campaign.mission.AtBScenario are in unnamed module of loader 'app')
at mekhq.MekHQ.resolveScenario(MekHQ.java:591)
at mekhq.gui.BriefingTab.resolveScenario(BriefingTab.java:787)
at mekhq.gui.BriefingTab.lambda$initTab$13(BriefingTab.java:272)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2314)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:407)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6621)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3398)
at java.desktop/java.awt.Component.processEvent(Component.java:6386)
at java.desktop/java.awt.Container.processEvent(Container.java:2266)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4996)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4828)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:775)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:98)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:747)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:744)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

10:10:33,812 ERROR [mekhq.campaign.unit.Unit] {AWT-EventQueue-0}
mekhq.campaign.unit.Unit.getCargoCapacity(Unit.java:1323) - Failed to parse 0,5 as double

10:10:33,812 ERROR [mekhq.campaign.unit.Unit] {AWT-EventQueue-0}
mekhq.campaign.unit.Unit.getCargoCapacity(Unit.java:1323) - Failed to parse 0,5 as double

10:10:33,818 ERROR [mekhq.campaign.unit.Unit] {AWT-EventQueue-0}
mekhq.campaign.unit.Unit.getCargoCapacity(Unit.java:1323) - Failed to parse 0,5 as double

3. Steps to Reproduce

  1. Rund a scenario from MekHQ and play it out in MegaMek.
  2. Save the .mul file at the end of the game
  3. Manually resolve the scneario using the .mul file

Attach Files

mekhq.log

Severity *

Low (Minor/Nuisance): Minor glitches or cosmetic issues that don't affect gameplay and occur rarely.

MekHQ Suite Version *

50.02

Operating System *

Windows 11

Java Version *

21.0.2

Final Verification

  • I confirm this is a single, unique issue that hasn't been reported before
  • I have included all necessary information and files to help reproduce this issue
  • I have asked on MegaMek Discord about this issue
  • I have confirmed this issue is being opened on the correct repository: MegaMek, MegaMekLab, or MekHQ
@IllianiCBT
Copy link
Collaborator

For future reference, please ensure you're including your save and customs folder so we have an easier time of replicating the exact circumstances that caused the bug.

@IllianiCBT
Copy link
Collaborator

Closing as (hopefully) resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants