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

Warehouse tab fails to properly render. #1049

Closed
Apocal43 opened this issue Jan 21, 2019 · 4 comments
Closed

Warehouse tab fails to properly render. #1049

Apocal43 opened this issue Jan 21, 2019 · 4 comments

Comments

@Apocal43
Copy link

MekHQ 45.2
Windows 10
Java version 1.8.0_181

When clicking on the Warehouse tab, window fails to properly render. Issue can be worked around somewhat by resizing the Parts on Order pane but when it should display Armor (Standard) it will again fail to render properly. Other parts will render correctly as long as Armor (Standard) is not being on-screen.

Issue begins after using bonus parts to acquire armor on campaign rather than ordering. The armor arrives instantly and I suspect this is the issue. I have included two campaign saves, one without the bug in case you need to reproduce on your end and one already bugged out.
apocal warehouse issue.zip

@Apocal43
Copy link
Author

An additional note:
To reproduce the issue, I attempted to upgrade one of the ASFs (Stuka-K5) in the hangar to a custom build (Stuka-G5-D) while having insufficient armor to complete the task. The armor amount instantly drops to zero and more is placed on order as part of the Stuka refit kit. Once I go to the repair screen and see there is no armor available, I click on the Parts Acquisition button and use the Bonus Parts button to acquire more. The Warehouse tab will then bug out.

If I instead run out down available armor through simple repairs (rather than the refit attempt) and acquire standard armor through the Parts Acquistion->Bonus Parts method, the Warehouse tab will NOT bug out.

@sixlettervariables
Copy link
Collaborator

From the log:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at mekhq.gui.RepairTab.refreshTechsList(RepairTab.java:863)
	at mekhq.gui.ActionScheduler.lambda$new$0(ActionScheduler.java:46)
	at javax.swing.Timer.fireActionPerformed(Unknown Source)
	at javax.swing.Timer$DoPostEvent.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain

@sixlettervariables
Copy link
Collaborator

That appears unrelated, this seems to be the issue:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at mekhq.campaign.parts.Armor.getBaseTime(Armor.java:401)
	at mekhq.campaign.parts.Part.getActualTime(Part.java:820)
	at mekhq.campaign.parts.Part.getTimeLeft(Part.java:826)
	at mekhq.campaign.parts.Part.getRepairDesc(Part.java:469)
	at mekhq.gui.model.PartsTableModel.getValueAt(PartsTableModel.java:108)
...

Your armor does not have a unit assigned to it and the time calculation did not function.

@sixlettervariables
Copy link
Collaborator

Closed by #1051

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

No branches or pull requests

2 participants