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

0.50.0 MegaMek wont load saved games #6091

Open
7 tasks done
splyncryth opened this issue Oct 11, 2024 · 8 comments
Open
7 tasks done

0.50.0 MegaMek wont load saved games #6091

splyncryth opened this issue Oct 11, 2024 · 8 comments
Labels
Bug Can't Reproduce Severity: Critical Issues described as critical as per the new issue form xstream Issues with things missing from xstream

Comments

@splyncryth
Copy link

splyncryth commented Oct 11, 2024

Prerequisites and Pre-Issue Checklist

  • I'm reporting the issue to the correct repository:

  • MegaMek

  • MegaMekLab

  • MekHQ

  • I've tested the issue against at least the latest MILESTONE version

  • I've asked on the MegaMek Discord about the error

  • I've reviewed the BattleTech rules and MegaMek documentation, and I've confirmed that something isn't working as intended.

  • I've searched the Github tracker and haven't found the issue listed

Severity *

Critical (Game-breaking/Crash): The game crashes or a core feature (like saving, loading, or network connection) is completely unusable.

Brief Description *

0.50.0 MegaMek client will not load saved games.
Receive following error

[Fatal Error] :9141:48: XML document structures must start and end within the same entity.
17:12:25,332 ERROR [megamek.client.ui.swing.MegaMekGUI] {AWT-EventQueue-0}
megamek.client.ui.swing.MegaMekGUI.loadGame(MegaMekGUI.java:620) - Unable to load file: autosave.sav.gz
org.xml.sax.SAXParseException; lineNumber: 9141; columnNumber: 48; XML document structures must start and end within the same entity.

Steps to Reproduce

Step 1: Start MM
Step 2: Load save game
Step 3: Error

Operating System *

Linux

Java Version *

21.0.4

MegaMek Suite Version *

v0.50.0

Custom MegaMek Version

No response

Attach Files

autosave.sav.gz

Final Checklist

  • I've checked to make sure that this issue has not already been filed
  • I'm reporting only one issue in this ticket for clarity and focus
@splyncryth
Copy link
Author

Update: from discord, all nightly snapshots include this bug.

@IllianiCBT
Copy link
Collaborator

Can we have a save that includes the bug, for ease of troubleshooting.

@IllianiCBT
Copy link
Collaborator

Ah ha, yeah, is what I expected to see:
image

Basically the save is failing to complete. So you end up with a malformed save file.

@WeaverThree
Copy link
Contributor

I'm getting spammed with this in my logs constantly when it tries to save

22:05:35,600 ERROR [megamek.server.GameManagerSaveHelper] {Packet Pump}
megamek.server.GameManagerSaveHelper.saveGame(GameManagerSaveHelper.java:80) - Unable to save file: savegames/autosave.sav
com.thoughtworks.xstream.converters.ConversionException: No converter available
---- Debugging information ----
message             : No converter available
type                : java.util.EnumMap
converter           : com.thoughtworks.xstream.converters.enums.EnumMapConverter
message[1]          : Could not initialize class com.thoughtworks.xstream.converters.enums.EnumMapConverter$Reflections
converter[1]        : com.thoughtworks.xstream.converters.reflection.SerializableConverter
message[2]          : Unable to make private void java.util.EnumMap.readObject(java.io.ObjectInputStream) throws java.io.IOException,java.lang.ClassNotFoundException accessible: module java.base does not "opens java.util" to unnamed module @6926f358
converter[2]        : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
message[3]          : Unable to make field transient java.util.Set java.util.AbstractMap.keySet accessible: module java.base does not "opens java.util" to unnamed module @6926f358
-------------------------------
	at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:88)
	at com.thoughtworks.xstream.XStream$1.lookupConverterForType(XStream.java:478)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:49)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:270)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:174)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:262)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:270)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:174)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:262)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
	at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:80)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:270)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:174)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:262)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1303)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1292)
	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1265)
	at megamek.server.GameManagerSaveHelper.saveGame(GameManagerSaveHelper.java:77)
	at megamek.server.AbstractGameManager.saveGame(AbstractGameManager.java:214)
	at megamek.server.AbstractGameManager.autoSave(AbstractGameManager.java:209)
	at megamek.server.totalwarfare.TWPhasePreparationManager.managePhase(TWPhasePreparationManager.java:227)
	at megamek.server.totalwarfare.TWGameManager.prepareForCurrentPhase(TWGameManager.java:1741)
	at megamek.server.AbstractGameManager.changePhase(AbstractGameManager.java:109)
	at megamek.server.totalwarfare.TWPhaseEndManager.managePhase(TWPhaseEndManager.java:73)
	at megamek.server.totalwarfare.TWGameManager.endCurrentPhase(TWGameManager.java:1897)
	at megamek.server.AbstractGameManager.changePhase(AbstractGameManager.java:112)
	at megamek.server.totalwarfare.TWPhaseEndManager.managePhase(TWPhaseEndManager.java:280)
	at megamek.server.totalwarfare.TWGameManager.endCurrentPhase(TWGameManager.java:1897)
	at megamek.server.totalwarfare.TWGameManager.checkReady(TWGameManager.java:1282)
	at megamek.server.AbstractGameManager.handlePacket(AbstractGameManager.java:63)
	at megamek.server.totalwarfare.TWGameManager.handlePacket(TWGameManager.java:588)
	at megamek.server.Server.handle(Server.java:1330)
	at megamek.server.Server$PacketPump.run(Server.java:138)
	at java.base/java.lang.Thread.run(Thread.java:840)

I'm running a nonstandard build and haven't replicated on a stanard build yet so I hadn't made an issue, but the XML ends with enum-map and that's what my exceptions are complaining about...

@splyncryth
Copy link
Author

splyncryth commented Oct 13, 2024

I get the following when saving in 0.50.0

ERROR [megamek.server.GameManagerSaveHelper] {Connection 0}
megamek.server.GameManagerSaveHelper.saveGame(GameManagerSaveHelper.java:80) - Unable to save file: savegames/autosave.sav
com.thoughtworks.xstream.converters.ConversionException: No converter available
---- Debugging information ----
message             : No converter available
type                : java.util.EnumMap
converter           : com.thoughtworks.xstream.converters.enums.EnumMapConverter
message[1]          : Could not initialize class com.thoughtworks.xstream.converters.enums.EnumMapConverter$Reflections
converter[1]        : com.thoughtworks.xstream.converters.reflection.SerializableConverter
message[2]          : Unable to make private void java.util.EnumMap.readObject(java.io.ObjectInputStream) throws java.io.IOException,java.lang.ClassNotFoundException accessible: module java.base does not "opens java.util" to unnamed module @5b8bc155
converter[2]        : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
message[3]          : Unable to make field transient java.util.Set java.util.AbstractMap.keySet accessible: module java.base does not "opens java.util" to unnamed module @5b8bc155
-------------------------------
	at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:88)
	at com.thoughtworks.xstream.XStream$1.lookupConverterForType(XStream.java:478)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:49)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:270)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:174)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:262)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:270)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:174)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:262)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:87)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeBareItem(AbstractCollectionConverter.java:94)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:66)
	at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeCompleteItem(AbstractCollectionConverter.java:81)
	at com.thoughtworks.xstream.converters.collections.MapConverter.marshal(MapConverter.java:80)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshallField(AbstractReflectionConverter.java:270)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.writeField(AbstractReflectionConverter.java:174)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:262)
	at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:90)
	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1303)
	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1292)
	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1265)
	at megamek.server.GameManagerSaveHelper.saveGame(GameManagerSaveHelper.java:77)
	at megamek.server.GameManagerSaveHelper.sendSaveGame(GameManagerSaveHelper.java:101)
	at megamek.server.AbstractGameManager.sendSaveGame(AbstractGameManager.java:201)
	at megamek.server.Server.sendSaveGame(Server.java:953)
	at megamek.server.commands.LocalSaveGameCommand.run(LocalSaveGameCommand.java:60)
	at megamek.server.Server.processCommand(Server.java:1241)
	at megamek.server.Server.handle(Server.java:1296)
	at megamek.server.Server$1.packetReceived(Server.java:253)
	at megamek.common.net.connections.AbstractConnection.processConnectionEvent(AbstractConnection.java:375)
	at megamek.common.net.connections.AbstractConnection.processPacket(AbstractConnection.java:334)
	at megamek.common.net.connections.AbstractConnection.update(AbstractConnection.java:285)
	at megamek.server.ConnectionHandler.run(ConnectionHandler.java:47)
	at java.base/java.lang.Thread.run(Thread.java:1583)

@kuronekochomusuke kuronekochomusuke added Bug xstream Issues with things missing from xstream labels Oct 13, 2024
@HammerGS HammerGS added the Severity: Critical Issues described as critical as per the new issue form label Oct 17, 2024
@SJuliez
Copy link
Member

SJuliez commented Oct 18, 2024

I cannot reproduce the enum map problem on my .50 install. Saved a game with some mek that had system manufacturers. No problem.

@splyncryth
Copy link
Author

I cannot reproduce the enum map problem on my .50 install. Saved a game with some mek that had system manufacturers. No problem.

What do you mean "Saved a game with some mek that had system manufacturers"? Once saved, was the saved game then loaded with the same client?

@SJuliez
Copy link
Member

SJuliez commented Oct 18, 2024

Yes I saved and loaded. I was talking about the savegame being cut short at a systemmanufacturers entry that uses an enum map and the xstream errors are for an enum map. But I don't know how to make that error show up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Can't Reproduce Severity: Critical Issues described as critical as per the new issue form xstream Issues with things missing from xstream
Projects
None yet
Development

No branches or pull requests

6 participants