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

Graphical Issues and Hang Upon StratCon Mission Completion #2568

Closed
StowGnar opened this issue May 2, 2021 · 15 comments · Fixed by MegaMek/megamek#2831
Closed

Graphical Issues and Hang Upon StratCon Mission Completion #2568

StowGnar opened this issue May 2, 2021 · 15 comments · Fixed by MegaMek/megamek#2831

Comments

@StowGnar
Copy link

StowGnar commented May 2, 2021

Fill out the fields below with as much pertinent information as possible to help the developers solve the issue.
Search for your issue inside open and closed issues first before reporting so as not to make duplicates.
(Delete the above lines)

Environment

What version of MekHQ does your issue apply to? 0.49.0 Dev
What operating system are you using? Windows, Mac, or Linux? Windows 10 Home
What java version are you using? If unsure it will state your java version at the top of the mekhqlog.txt file. 1.8.0_261-b12
(Delete the above lines)

Description

A strange graphical error occured when coming back into an AtB campaign from MegaMek. I failed to receive the end-of-scenario personell/salvage/outcome dialog after the game ended. After saying yes to controlling the battlefield, no new dialog boxes opened and I was simply shown a blank gray MegaMek window, with graphical artifacts from previous lobby units/buttons appearing under the mouse cursor as I move it around. After having to end the javaw.exe process altogether, I attempted to use the after-game salvage MUL file in order to Resolve Manually, however only the friendly units loaded and they were undamaged. (I am including a save file of the overall campaign, the autosave right before the mission, and the autosave after resolving manually...I decided to manually injure some of my pilots in the process.

Bugged Team Data Return.zip

)

And provide the steps you have taken to reproduce the issue in the campaign file if applicable. Load AutoSave 2. Start Mission. Hit Done and deploy units. Let Round 1 movement begin before declaring /victory. Upon finishing, answer Yes to controlling the battlefield, and observe.

Files

Provide the .cpnx campaign file that this issue occurs in. Bugged Team Data Return.zip

Provide any custom units that you are using in this campaign so that it will load on the developers machine. N/A

Provide any other files that you have customized in this campaign like the factions.xml for example. N/A

And provide the megameklog.txt and mekhqlog.txt files for any NPE's or errors that MekHQ might be reporting. In ZIP.

@Tecmes
Copy link

Tecmes commented May 2, 2021

[Win10 OpenJDK hotspot 11.0.10.9, using StratCon]
Exact same issue. Can click on Battlefield control but then it stops and fails to clear the unit review pane, and the lobby is active "underneath". Also saving the MUL seem to only save the roster as it was when you begun the game: all your units are fresh, all your warriors are KIAed, and none of the OpFor appear at all.

It kinds of feel like you are directly sent back to the lobby as it was at the start of the scenario, superimposed with an aborted end-of-mission dialog.

It did that on a special mission and also on a regular StratCon mission. It's quite crippling and I'm stopping playing for now because of this.

@Windchild292
Copy link
Contributor

We'd need logs, campaign file, customs and a save from right before the to confirm it is the same.

@Tecmes
Copy link

Tecmes commented May 2, 2021

Here are the logs I have...
Tecmes_2568.zip

I have autosaves from a few days before.
Autosave-1-Thunderlance-30750518.cpnx.gz
Autosave-1-Thunderlance-30750623.cpnx.gz
And the one custom mech.
Thunderlance.zip

@deadduck866
Copy link

I had the same issue repeatable issue
mekhqlog.txt

megameklog.txt

My Campaign.zip
My Campaign30670707.cpnx.gz

@deadduck866
Copy link

i had a work around exporting the autosave in mekhq mm to play in MM standalone to finish the match and create a MUL but cannot reproduce the workaround

@HammerGS
Copy link
Member

HammerGS commented May 2, 2021

Couple of NPE's in here -
megamek.client.ui.swing.boardview.FovHighlightingAndDarkening

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at megamek.client.ui.swing.boardview.FovHighlightingAndDarkening.getLosEffects(FovHighlightingAndDarkening.java:377)
	at megamek.client.ui.swing.boardview.FovHighlightingAndDarkening.getCachedLosEffects(FovHighlightingAndDarkening.java:278)
	at megamek.client.ui.swing.boardview.BoardView1.getHexTooltip(BoardView1.java:5751)
	at megamek.client.ui.swing.boardview.BoardView1$2.mouseMoved(BoardView1.java:627)

Java.lang.NullPointerException
at mekhq.campaign.ResolveScenarioTracker.processGame(ResolveScenarioTracker.java:193)

gameVictory(), line 606 : null
java.lang.NullPointerException
	at mekhq.campaign.ResolveScenarioTracker.processGame(ResolveScenarioTracker.java:193)
	at mekhq.MekHQ.gameVictory(MekHQ.java:583)
	at megamek.common.event.GameVictoryEvent.fireEvent(GameVictoryEvent.java:70)
	at megamek.common.Game.processGameEvent(Game.java:3168)
	at megamek.client.Client.handlePacket(Client.java:1666)
	at megamek.client.Client$1$2.run(Client.java:170)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at megamek.common.EntityListFile.saveTo(EntityListFile.java:592)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at megamek.common.EntityListFile.saveTo(EntityListFile.java:592)
	at megamek.client.ui.swing.ClientGUI.saveVictoryList(ClientGUI.java:1741)
	at megamek.client.ui.swing.ClientGUI$5.gameEnd(ClientGUI.java:1953)
	at megamek.common.event.GameEndEvent.fireEvent(GameEndEvent.java:41)
	at megamek.common.Game.processGameEvent(Game.java:3168)
	at megamek.common.Game.end(Game.java:2780)
	at megamek.client.Client.handlePacket(Client.java:1573)
	at megamek.client.Client$1$2.run(Client.java:170)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at megamek.client.ui.swing.lobby.sorters.MekTreeTopLevelSorter.compare(MekTreeTopLevelSorter.java:66)
at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at megamek.client.ui.swing.lobby.sorters.MekTreeTopLevelSorter.compare(MekTreeTopLevelSorter.java:66)
	at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
	at java.base/java.util.TimSort.sort(TimSort.java:220)
	at java.base/java.util.Arrays.sort(Arrays.java:1515)
	at java.base/java.util.ArrayList.sort(ArrayList.java:1750)
	at megamek.client.ui.swing.lobby.MekTreeForceModel.createTopLevel(MekTreeForceModel.java:113)
	at megamek.client.ui.swing.lobby.MekTreeForceModel.getChildCount(MekTreeForceModel.java:81)
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1457)
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1272)
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:728)
	at java.desktop/javax.swing.tree.VariableHeightLayoutCache.setModel(VariableHeightLayoutCache.java:111)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.configureLayoutCache(BasicTreeUI.java:2103)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.completeUIInstall(BasicTreeUI.java:812)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.installUI(BasicTreeUI.java:772)
	at java.desktop/javax.swing.plaf.metal.MetalTreeUI.installUI(MetalTreeUI.java:121)
	at java.desktop/javax.swing.JComponent.setUI(JComponent.java:685)
	at java.desktop/javax.swing.JTree.setUI(JTree.java:706)
	at java.desktop/javax.swing.JTree.updateUI(JTree.java:727)
	at megamek.client.ui.swing.lobby.ChatLounge.refreshTree(ChatLounge.java:2820)
	at megamek.client.ui.swing.lobby.ChatLounge.refreshEntities(ChatLounge.java:1094)
	at megamek.client.ui.swing.lobby.ChatLounge.gamePhaseChange(ChatLounge.java:1595)
	at megamek.common.event.GamePhaseChangeEvent.fireEvent(GamePhaseChangeEvent.java:72)
	at megamek.common.Game.processGameEvent(Game.java:3168)
	at megamek.common.Game.setPhase(Game.java:823)
	at megamek.client.Client.changePhase(Client.java:426)
	at megamek.client.Client.handlePacket(Client.java:1490)
	at megamek.client.Client$1$2.run(Client.java:170)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at megamek.client.ui.swing.lobby.MekTableModel$Renderer.getTableCellRendererComponent(MekTableModel.java:312)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at megamek.client.ui.swing.lobby.MekTableModel$Renderer.getTableCellRendererComponent(MekTableModel.java:312)
	at java.desktop/javax.swing.JTable.prepareRenderer(JTable.java:5741)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2185)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:2087)
	at java.desktop/javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1883)

[Fatal Error] :1:1: Premature end of file.
Premature end of file.

[Fatal Error] :1:1: Premature end of file.
Premature end of file.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
	at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:261)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
	at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
	at megamek.common.MULParser.parse(MULParser.java:313)
	at mekhq.campaign.ResolveScenarioTracker.loadUnitsAndPilots(ResolveScenarioTracker.java:1056)
	at mekhq.campaign.ResolveScenarioTracker.processMulFiles(ResolveScenarioTracker.java:149)
	at mekhq.gui.dialog.ChooseMulFilesDialog.btnNextActionPerformed(ChooseMulFilesDialog.java:177)
	at mekhq.gui.dialog.ChooseMulFilesDialog.lambda$initComponents$3(ChooseMulFilesDialog.java:146)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at megamek.common.EntityListFile.saveTo(EntityListFile.java:607)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at megamek.common.EntityListFile.saveTo(EntityListFile.java:607)
	at megamek.client.ui.swing.ClientGUI.saveVictoryList(ClientGUI.java:1741)
	at megamek.client.ui.swing.ClientGUI$5.gameEnd(ClientGUI.java:1953)
	at megamek.common.event.GameEndEvent.fireEvent(GameEndEvent.java:41)
	at megamek.common.Game.processGameEvent(Game.java:3168)
	at megamek.common.Game.end(Game.java:2780)
	at megamek.client.Client.handlePacket(Client.java:1573)
	at megamek.client.Client$1$2.run(Client.java:170)

Also tons of

23:16:44,746 ERROR [megamek.common.Board] {AWT-EventQueue-0}
updateBuildings(), line 1548 : Could not find a match for Heavy Standard Building #70014 to update.

and some
Report.addNewline failed, array index out of bounds
Ejecting crew size: 1

@Tecmes
Copy link

Tecmes commented May 3, 2021

FYI, deactivating Stratcon in the campaign options right before launching a mission does NOT prevent the issue.

@Tecmes
Copy link

Tecmes commented May 4, 2021

Just to confirm, playing standalone 49.0 MM does not create a similar issue (unless of course it depends on the units in the game, the game length etc...).
Also I get the issue every single game I launch from MHQ; I haven't encountered a game I was able to properly finish. (And as stated above, it doesn't seem linked to StratCon).

@Tecmes
Copy link

Tecmes commented May 4, 2021

Well here's an interesting test: Saving a mission MUL created by MekHQ before launching the game, with StratCon enabled, then quitting MekHQ and creating a game with standalone MM, loading the MUL and adding bots DOES create the bug (eventhough playing a fresh standalone MM game doesn't).
Here's a log. I dunno, but the errors starting on oline 1270 seem fishy as it seems to pertain exactly to the saving of the endgame units.
megameklog.txt

I haven't tried deactivating StratCon from the start of the campaign, but I will try next.

@Tecmes
Copy link

Tecmes commented May 4, 2021

Same issue with the newer 11.0.11 JDK.

@Tecmes
Copy link

Tecmes commented May 4, 2021

Same issue when starting a game from MHQ but from a fresh campaign in which StratCon was never enabled.
So from what I gathered so far, it looks like an issue that comes from the way MHQ 49.0 creates scenarios (because a fully standalone game doesn't have the issue), but not from StratCon.

@Tecmes
Copy link

Tecmes commented May 4, 2021

That part of the log seems recurring and somewhat relevant (?):

09:23:50,913 ERROR [mekhq.MekHQ] {AWT-EventQueue-0} gameVictory(), line 606 : null java.lang.NullPointerException at mekhq.campaign.ResolveScenarioTracker.processGame(ResolveScenarioTracker.java:193) at mekhq.MekHQ.gameVictory(MekHQ.java:583) at megamek.common.event.GameVictoryEvent.fireEvent(GameVictoryEvent.java:70) at megamek.common.Game.processGameEvent(Game.java:3168) at megamek.client.Client.handlePacket(Client.java:1666) at megamek.client.Client$1$2.run(Client.java:170) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740) 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)

@HammerGS
Copy link
Member

HammerGS commented May 4, 2021

While we appreciate the help. Please check the thread for duplicate information like the code block you posted.

@Windchild292
Copy link
Contributor

Handling FovHighlightingAndDarkening NPE

@NickAragua
Copy link
Member

The Fov one should be the last one of these, I think we got the rest.

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