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

[0.47.1 -> 0.48.0 or 0.49.2] Import of MekHQ Campaign file fails #2807

Closed
mwberlindeu opened this issue Aug 14, 2021 · 4 comments · Fixed by #2808
Closed

[0.47.1 -> 0.48.0 or 0.49.2] Import of MekHQ Campaign file fails #2807

mwberlindeu opened this issue Aug 14, 2021 · 4 comments · Fixed by #2808
Assignees
Labels
Bug Campaign Fixes Needed Manual CPNX fixes are needed

Comments

@mwberlindeu
Copy link

I am currently using a campagin file in version 0.47.1. I would like to upgrade but the campagin file does not load in version 0.48.0 or 0.49.2 of MekHQ. A dialogue appears that the issue is logged. However I cannot easily find out what I could fix.

Environment

Import from version 0.47.1 -> 0.48.0 or 0.49.2]
OS: Windows
JRE: 8 (Update 301)
Java version 15

Files

Logs
megameklog.txt
mekhqlog.txt
Campaign File
Hunting Hellhounds30541122withoutLTtrailer.zip
Custom Units
customs.zip

@Windchild292
Copy link
Contributor

16:36:18,177 ERROR [mekhq.gui.dialog.DataLoadingDialog$Task] {AWT-EventQueue-0} 
done(), line 265 : Cannot invoke "megamek.common.EquipmentType.equals(Object)" because the return value of "mekhq.campaign.parts.equipment.EquipmentPart.getType()" is null
java.lang.NullPointerException: Cannot invoke "megamek.common.EquipmentType.equals(Object)" because the return value of "mekhq.campaign.parts.equipment.EquipmentPart.getType()" is null
	at mekhq.campaign.io.CampaignXmlParser.postProcessParts(CampaignXmlParser.java:1399)
	at mekhq.campaign.io.CampaignXmlParser.parse(CampaignXmlParser.java:384)
	at mekhq.campaign.CampaignFactory.createCampaign(CampaignFactory.java:83)
	at mekhq.gui.dialog.DataLoadingDialog$Task.doInBackground(DataLoadingDialog.java:196)
	at mekhq.gui.dialog.DataLoadingDialog$Task.doInBackground(DataLoadingDialog.java:130)
	at java.desktop/javax.swing.SwingWorker$1.call(SwingWorker.java:304)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.desktop/javax.swing.SwingWorker.run(SwingWorker.java:343)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)

@mwberlindeu
Copy link
Author

Additional information: Java Version is taken from the log
CMD shows different version.

grafik

@Windchild292
Copy link
Contributor

I've got a probable fix ready to go, but I don't know the region of the code too well and would thus recommend waiting until another dev can take a look at the fix.

As for Java, I'd reinstall following this guide: https://github.com/MegaMek/megamek/wiki/Updating-to-OpenJDK
You've got two versions installed, which can cause issues.

@mwberlindeu
Copy link
Author

Thanks, I retested and could import my campaign file into version 49.3.

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
Development

Successfully merging a pull request may close this issue.

2 participants