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
133 stars 171 forks source link

MegaMek fails to load dropship sent from MekHQ #4085

Open BlueThing00 opened 5 months ago

BlueThing00 commented 5 months ago

Environment

49.19.1 (campaign started and bug first seen on 49.19) Windows 10 Java Version: 11.0.16

Description

I'm playing a Stratcon campaign.

A "Defend Grounded Dropship - Heavy" mission was generated. It pulled a dropship from my OOB to defend, but that dropship fails to load in MM.

To make sure that there isn't a problem with my custom dropship, I tried loading it in a standalone MM, and it loads fine.

I also tried adding in a vanilla Union dropship and using it instead, but the same error occurs.

When I add the same dropships to the MM spawned by MekHQ manually, they load without a problem.

Steps to replicate: Briefing Room > Pending Mission (Defend Grounded Dropship - Heavy) Start Game Wait for the error in loading the dropship (see below).

image

Files

mekhq.log megamek.log Bluethings30250921_dropship_bug.cpnx.gz Meks.zip

BlueThing00 commented 5 months ago

This doesn't have the camo or portrait files I'm using (because I'm using a portrait bundle someone made years ago and it's huge).

Let me know if those are needed.

Thom293 commented 5 months ago

Perhaps related.

https://github.com/MegaMek/mekhq/issues/4949

BlueThing00 commented 5 months ago

I saw the same thing happen with a mission generated in 49.19.1. I was again able to play it by removing my dropship and defending the employer's.

This appears to be an active bug in the milestone release.

BlueThing00 commented 1 month ago

I'm still seeing this with a new campaign created and played exclusively in 0.50.0.

IllianiCBT commented 1 month ago

I don't have time to investigate this right now, but my gut is telling me the issue is occurring when we translate the Unit into an Entity, for use in mm. This would explain why crew requirements aren't affected, in mhq, and why the issue isn't present when mm is launched standalone.