MegaMek / mekhq

MekHQ is a java helper program for the MegaMek game that allows users to load a list of entities from an XML file, perform repairs and customizations, and then save the new entities to another XML file that can be loaded into MegaMek.
http://megamek.org
131 stars 168 forks source link

50 Nightly - MM Games Loaded from MHQ duplicate units in MM & Closing MM causes NPE. #4734

Open Thom293 opened 2 weeks ago

Thom293 commented 2 weeks ago

Not sure if this is a MM or MHQ issue, feel free to move to wherever.

Launched MHQ, launched diversion battle. set up MM lobby like I like. Save game in MM. Start MM game. Realized I made some mistake. Closed MM.

MM is completely closed at this point. Go back to MHQ, click the load save game button - load the MM game I saved. Now I get duplicate units of all units but mine. Repeatable with multiple loads from MHQ. Again after I closed MHQ and MM completely and relaunched.

EDIT: If you load the save and watch the lobby, you can actually see it do the thing. The saved units load properly, but then you can see MHQ pushing the the other units into the Lobby again. So looks like MHQ is pushing units even with the load save button, and it should not do that.

image

image

To repeat, load this MHQ save, then click on diversion battle then load save 1. Should repeat. If not, if there are no dupes, in MM lobby start MM game (hit done). Once MM game board is open, close it and try to load again with steps above. Should repeat. If you cant repeat, To see save of dupes, load dupes save.

logs.zip

Celcius 23330670705DUPES.zip 1.sav.gz dupes.sav.gz

EDIT: And then after launching from MHQ, getting to MM lobby and closing MM lobby, get a NPE.

image log for that:

logs2NPE.zip

Thom293 commented 2 weeks ago

And not related to bug - but for some reason campaign save is not in a .gz or zip format anymore, so I had to manually zip the save to attach it.

image

Thom293 commented 2 weeks ago

Ok - so tried again. Thought maybe it was doing it because I had futzed with some units in the lobby and added a bot. Closed everything. Started again, relaunched fresh battle from MHQ, made new save in MM lobby without changing anything. Closed MM, launched new save from MHQ - I get duplicates again.

So, I think this means you can never load a lobby save from MHQ without getting duplicates....?

lobbysave2.sav.gz logs3.zip

Thom293 commented 2 weeks ago

forgot to include customs.
ThomCustoms8.28.24.zip