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 - megamek.common.Entity.setUnitNumber(short) #6211

Closed
7 tasks done
HammerGS opened this issue Nov 22, 2024 · 0 comments · Fixed by #6212
Closed
7 tasks done

NPE - megamek.common.Entity.setUnitNumber(short) #6211

HammerGS opened this issue Nov 22, 2024 · 0 comments · Fixed by #6212
Labels
Bug ProtoMek Issues related to ProtoMeks Severity: High Issues described as high severity as per the new issue form

Comments

@HammerGS
Copy link
Member

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 *

High (Major Disruption): A major feature is broken or incorrect, but a workaround exists.

Brief Description *

17:53:34,945 ERROR [megamek.MegaMek] {Packet Pump}
megamek.MegaMek.lambda$main$1(MegaMek.java:95) - Uncaught java.lang.NullPointerException detected. Please open up an issue containing all logs, the game save file, and customs at https://github.com/MegaMek/megamek/issues . If Sentry is enabled, the error has also been logged.
java.lang.NullPointerException: Cannot invoke "megamek.common.Entity.setUnitNumber(short)" because "lastUnitMember" is null
	at megamek.server.totalwarfare.TWGameManager.receiveEntityDelete(TWGameManager.java:26886)
	at megamek.server.totalwarfare.TWGameManager.handlePacket(TWGameManager.java:726)
	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:833)

Steps to Reproduce

Supernova Alpha.zip
Use the attached MUL in the lobby remove more than 5 Protomeks and you'll get the NPE

megamek.MegaMek.initializeLogging(MegaMek.java:146) - Starting MegaMek v0.50.2-SNAPSHOT
    Build Date: N/A
    Today: 2024-11-21
    Origin Project: MegaMek
    Java Vendor: Oracle Corporation
    Java Version: 17.0.6
    Platform: Windows 11 10.0 (amd64)
    System Locale: en_CA
    Total memory available to MegaMek: 4 GB
    MM Code Revision: Unknown
    MML Code Revision: Unknown
    MHQ Code Revision: Unknown

Operating System *

Windows 11

Java Version *

Java 17

MegaMek Suite Version *

Free Text (type manually)

Custom MegaMek Version

50.02

Attach Files

Supernova Alpha.zip
megamek.log

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
@HammerGS HammerGS added Bug ProtoMek Issues related to ProtoMeks Severity: High Issues described as high severity as per the new issue form labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug ProtoMek Issues related to ProtoMeks Severity: High Issues described as high severity as per the new issue form
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant