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

NPE in MekHQ when assigning personnel #3195

Closed
PhoenixHeart512 opened this issue Mar 28, 2022 · 5 comments
Closed

NPE in MekHQ when assigning personnel #3195

PhoenixHeart512 opened this issue Mar 28, 2022 · 5 comments
Assignees
Labels
Bug Personnel Personnel-related Issues

Comments

@PhoenixHeart512
Copy link

Environment

MekHQ 0.49.7
Java Vendor: Eclipse Adoptium
Java Version: 11.0.14.1
Win10 21h2

Description

There are actually two Null Pointer Exceptions in the MekHQ log file. I don't know if they're related or not, but both occurred while assigning personnel to units. The first occurred when assigning a soldier FROM the Jump Platoon(ID:66) to the Motorized Platoon (Fieldworks ID:12). The second NPE occurred while assigning (mechwarrior) Thelma MacKail from their damaged Warhammer (ID:19) to a spare Marauder (id:4).

Both times, the NPE error popped up, but the game continued and nothing appeared to be visibly wrong.

I have been seeing this sort of NPE error when assigning units often lately. For this report, the Mechwarrior assignment NPE is the only one I can replicate on demand on the save files included. I closed MekHQ, opened it again, and tried assigning Thelma back to her Warhammer which got an NPE popup, and then back to the Marauder, which got another NPE popup.

Files

Files attached. The zip file contains the same folder structure as MekHQ uses, so if you paste it onto an existing installation it should add everything to the correct folders. I included the logs, the MekHQ campaign, custom variants, and camo, as well as the mekHQ preferences and campaign preset files. A screenshot of the error is also included in the zip file, though it doesn't seem to say much of value.
Apparently my custom portraits folder makes the log zip too big to upload as an attachment so I have not included those, I hope they're not necessary for loading a game or related to the bug. Shouldn't be, as I've seen this occur with personnel who don't have a portrait at all.
NPE 3-28-2022.zip

@HammerGS HammerGS transferred this issue from MegaMek/megamek Mar 28, 2022
@Windchild292
Copy link
Contributor

Duplicates #3146, resolved in #3148.

@Windchild292
Copy link
Contributor

Also... Props on the excellent report and data zip. Do you mind if I use this report as an example on the MegaMek wiki @PhoenixHeart512?

However... please try to open MekHQ issues on the MekHQ tracker in future.

@Windchild292 Windchild292 added Bug Personnel Personnel-related Issues labels Mar 28, 2022
@Windchild292 Windchild292 self-assigned this Mar 28, 2022
@PhoenixHeart512
Copy link
Author

Sure, go for it! And I apologize, I completely forgot that MekHQ had a separate tracker, which is probably why I didn't see any previous reports of this and thought it was an unreported issue, haha.

@PhoenixHeart512
Copy link
Author

Also, dumb question that may not have a definitive answer - do you know if this NPE error is harmless, or if it is slowly corrupting my savegame behind the scenes each time it happens?

@Windchild292
Copy link
Contributor

You're all good with this one, it just prevents a person service log message and a GUI refresh that'll be handled on new day instead.

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

No branches or pull requests

2 participants