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

Maintenance error on customized vehicle in 48.0 campaign #2703

Closed
SuperStucco opened this issue Jun 18, 2021 · 9 comments
Closed

Maintenance error on customized vehicle in 48.0 campaign #2703

SuperStucco opened this issue Jun 18, 2021 · 9 comments
Assignees
Labels
Bug Needs Investigation This issue needs investigation and/or triage. Parts/Repair/Refit

Comments

@SuperStucco
Copy link

In the attached 48.0 campaign, a customized MRM carrier is throwing errors during maintenance.

The log file has multiple instances of this:

21:14:11,035 ERROR [mekhq.campaign.Campaign] {AWT-EventQueue-0} doMaintenance(), line 6381 : Could not perform maintenance on part Unknown (0) for MRM Carrier (WoB 40) (d869d342-d1e9-44a7-84ab-e63a1ee4c5f8) due to an error java.lang.NullPointerException at mekhq.campaign.parts.Part.getQualityName(Part.java:257) at mekhq.campaign.Campaign.doMaintenanceOnUnitPart(Campaign.java:6446) at mekhq.campaign.Campaign.doMaintenance(Campaign.java:6376) at mekhq.campaign.Campaign.processNewDayUnits(Campaign.java:3274) at mekhq.campaign.Campaign.newDay(Campaign.java:3432) at mekhq.campaign.CampaignController.advanceDay(CampaignController.java:82) at mekhq.gui.CampaignGUI.lambda$initTopButtons$32(CampaignGUI.java:1053) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308) at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405) at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262) at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279) at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342) at java.desktop/java.awt.Component.processEvent(Component.java:6400) at java.desktop/java.awt.Container.processEvent(Container.java:2263) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745) at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743) at java.base/java.security.AccessController.doPrivileged(Native Method) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

megameklog.txt
Blake's Justice30700916.cpnx.gz

Customized vehicle (BLK attached as TXT extension):
MRM Carrier (WoB 40).txt

@sixlettervariables sixlettervariables self-assigned this Jun 18, 2021
@sixlettervariables sixlettervariables added Bug Needs Investigation This issue needs investigation and/or triage. labels Jun 18, 2021
@sixlettervariables sixlettervariables added this to the 0.49-dev milestone Jun 18, 2021
@sixlettervariables
Copy link
Contributor

Your part on a unit either doesn't have a Campaign or the campaign lacks CampaignOptions. Now that's just plain odd:

    public String getQualityName() {
        return getQualityName(getQuality(), campaign.getCampaignOptions().reverseQualityNames());
    }

@sixlettervariables
Copy link
Contributor

To fully debug this I'll need the rest of your customs:
image

@sixlettervariables
Copy link
Contributor

I was unable to reproduce this on 0.49-dev after removing all the customs besides that MRM Carrier.

@sixlettervariables sixlettervariables added Needs More Info For when an issue needs more information from the user reporting and removed Needs Investigation This issue needs investigation and/or triage. labels Jun 18, 2021
@SuperStucco
Copy link
Author

Here's the customs (the engineering and infantry packs have a lot more to them, it's just easier to add them by folder rather than picking and choosing):

Maintenance error customs.zip

The issue occurred immediately after the refit, so it may be a one-off from that. Or it could be handled by changes in the 0.49 series.

@sixlettervariables
Copy link
Contributor

That's a good bit of info, thanks!

@sixlettervariables sixlettervariables added Needs Investigation This issue needs investigation and/or triage. Parts/Repair/Refit and removed Needs More Info For when an issue needs more information from the user reporting labels Jun 18, 2021
@sixlettervariables
Copy link
Contributor

I can't reproduce this, so if you have more detailed steps or if you can reproduce it reliably that would help!

I've got a bandaid I can apply as sort of a "just a guess" defense, but I'm not sure what the proximate cause of your error was.

@SuperStucco
Copy link
Author

I haven't been able to reproduce this, so it's likely a one-off. Since the modification adds C3I it might be related to this: #2647 (comment). Like the Mech C3I wasn't in the equipment list, I had to use the "Show Unavailable" toggle and double-click the greyed out item to add it.

@sixlettervariables
Copy link
Contributor

That's a possibility. I played around and wasn't able to induce that either. I'll close this with #2704, but if you see this again feel free to re-open this.

sixlettervariables added a commit that referenced this issue Jun 19, 2021
…-npe

Issue #2703: Defend against parts without campaigns after Refit
Issue #2687: Fix error refitting dropship transport bays
@sixlettervariables
Copy link
Contributor

Closed by #2704

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Investigation This issue needs investigation and/or triage. Parts/Repair/Refit
Projects
None yet
Development

No branches or pull requests

2 participants