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

Saves made by MekHQ 0.47.14 are not possible to load with the same MekHQ 0.47.14 #2255

Closed
ADREK4005 opened this issue Dec 3, 2020 · 9 comments · Fixed by #2257
Closed

Saves made by MekHQ 0.47.14 are not possible to load with the same MekHQ 0.47.14 #2255

ADREK4005 opened this issue Dec 3, 2020 · 9 comments · Fixed by #2257
Assignees
Labels
Bug Campaign Fixes Needed Manual CPNX fixes are needed
Milestone

Comments

@ADREK4005
Copy link

Environment

MekHQ 0.47.14
Windows 10
java build 1.8.0_271-b09

Description

Games saved in MekHQ 0.47.14 (I was reorganizing my regiment last) is not loading with MekHQ 0.47.14. No error messages. It just stops loading while loading campaign part. Nothing else happens. Those saves are also not possible to load ingame (after starting a new game for a example). Just nothing happens as well.

Files

I don't have in my regiment any units mentioned in Mekhq logfile.
mekhqlog.txt
Wargirls30640303.cpnx.gz
megameklog.txt

@sixlettervariables
Copy link
Contributor

From mekhqlog.txt:

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at mekhq.gui.dialog.DataLoadingDialog$Task.done(DataLoadingDialog.java:308)
	at javax.swing.SwingWorker$5.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(Unknown Source)
	at sun.swing.AccumulativeRunnable.run(Unknown Source)
	at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(Unknown Source)
	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$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

@sixlettervariables
Copy link
Contributor

I'm unable to debug the CPNX without the following units:

15:40:40,544 ERROR [mekhq.campaign.io.CampaignXmlParser] {SwingWorker-pool-1-thread-1} 
checkUnits(), line 1257 : Could not load the following units: 
Berserker BRZ-A34J
Riever F-700a5 (Mixed)
Cudgel CDG-1B (Mixed)
Devastator DVS-2 (Mixed)
Sprint Scout Helicopter (ECM)
Corsair COR-5R(W)
Xerxes (W)
Masakari (Warhawk) W
Tyrant (3056)(W)
Harpy (W)4

@ADREK4005
Copy link
Author

Ah, I didn't think refit files were necessary. Here they are:
Refit files.zip

@sixlettervariables
Copy link
Contributor

That save, somehow, has a recursive parts tree!

java.lang.StackOverflowError
	at java.base/java.util.TreeMap.getEntry(TreeMap.java:350)
	at java.base/java.util.TreeMap.remove(TreeMap.java:601)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:141)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)
	at mekhq.campaign.Warehouse.removePart(Warehouse.java:152)

@Windchild292 Windchild292 added Bug Campaign Fixes Needed Manual CPNX fixes are needed labels Dec 4, 2020
@sixlettervariables
Copy link
Contributor

Try this CPNX:
Wargirls30640303-fixed.cpnx.gz
It may work in 0.47.14.

@ADREK4005
Copy link
Author

It works. Thank you! Well, my dropships became "moderately damaged" but in reality they are undamaged and don't appear in repair bay. I also managed to repeat the bug which broke my saves. How to explain it: all my units can be sold except for Fenrir [MPL] and Elemental [HMG] MKII (they both are broken in MekHQ 0.47.14 somehow). So I was not able to sell or GM remove Fenrir [MPL] and found a way around: I GM stripped them and sold for 0 c-bills (it worked). But after such procedure all future save files become broken and don't load. I don't know what files you need to deal with this bug so adding Fenrir screenshot and new broken save file and log.
Fenrir
Wargirls30640306.cpnx.gz
mekhqlog.txt

@sixlettervariables
Copy link
Contributor

That helps! I'll look into that more.

The dropship issue is a known issue with bay doors I believe.

sixlettervariables added a commit to sixlettervariables/mekhq that referenced this issue Dec 4, 2020
@sixlettervariables
Copy link
Contributor

The parts tree for those suits has some odd recursion (noted by double stars):

	702608: Fenrir Battle Armor [MPL] Suit
		702608: Fenrir Battle Armor [MPL] Suit
			702608: Fenrir Battle Armor [MPL] Suit**
			702609: Armor (BA Standard (Basic))
		702609: Armor (BA Standard (Basic))
	702609: Armor (BA Standard (Basic))
	702610: Fenrir Battle Armor [MPL] Suit
		702610: Fenrir Battle Armor [MPL] Suit
			702610: Fenrir Battle Armor [MPL] Suit**
			702611: Armor (BA Standard (Basic))
		702611: Armor (BA Standard (Basic))
	702611: Armor (BA Standard (Basic))
	702612: Fenrir Battle Armor [MPL] Suit
		702612: Fenrir Battle Armor [MPL] Suit
			702612: Fenrir Battle Armor [MPL] Suit**
			702613: Armor (BA Standard (Basic))
		702613: Armor (BA Standard (Basic))
	702613: Armor (BA Standard (Basic))
	702614: Fenrir Battle Armor [MPL] Suit
		702614: Fenrir Battle Armor [MPL] Suit
			702614: Fenrir Battle Armor [MPL] Suit**
			702615: Armor (BA Standard (Basic))
		702615: Armor (BA Standard (Basic))
	702615: Armor (BA Standard (Basic))
	702616: Medium Pulse Laser
	702617: Medium Pulse Laser
	702618: Medium Pulse Laser
	702619: Medium Pulse Laser

sixlettervariables added a commit that referenced this issue Dec 4, 2020
…epart-stackoverflow

Issues #2255 #2258: Fix Warehouse::removePart StackOverflowException with child parts and NRE with BayDoor/Cubicle parts
@sixlettervariables
Copy link
Contributor

The next release will have a fix for this, but I'm still researching how your campaign came to have these recursive part trees.

@sixlettervariables sixlettervariables self-assigned this Dec 5, 2020
@sixlettervariables sixlettervariables added this to the 0.48-stable milestone Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Campaign Fixes Needed Manual CPNX fixes are needed
Projects
None yet
3 participants