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 in ForceGeneratorOptionsView.findTOCNode starting MM from MHQ #845

Closed
swang300 opened this issue Aug 5, 2018 · 4 comments
Closed

NPE in ForceGeneratorOptionsView.findTOCNode starting MM from MHQ #845

swang300 opened this issue Aug 5, 2018 · 4 comments

Comments

@swang300
Copy link
Contributor

swang300 commented Aug 5, 2018

mekhqlog.txt

Fill out the fields below with as much pertinent information as possible to help the developers solve the issue.
Search for your issue inside open and closed issues first before reporting so as not to make duplicates.
(Delete the above lines)

Environment

What version of MekHQ does your issue apply to?
0.45.1-git
What operating system are you using? Windows, Mac, or Linux?
Windows
What java version are you using? If unsure it will state your java version at the top of the mekhqlog.txt file.
Java 10

Description

MekHQ can not start Megamek game with the attached error. Starting Megamek using Megamek.jar starts just fine.

@sixlettervariables
Copy link
Contributor

sixlettervariables commented Aug 5, 2018

Can you attach your campaign? Thanks!

Exception 1:

05:57:50,266 ERROR [megamek.common.util.SharedConfiguration] {Stormwolf's Pack} 
Error trying to load shared.properties
java.io.FileNotFoundException: mmconf\shared.properties (The system cannot find the file specified)
	at java.base/java.io.FileInputStream.open0(Native Method)
	at java.base/java.io.FileInputStream.open(FileInputStream.java:220)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:158)
	at java.base/java.io.FileInputStream.<init>(FileInputStream.java:113)
	at megamek.common.util.SharedConfiguration.<init>(SharedConfiguration.java:46)
	at megamek.common.util.SharedConfiguration.getInstance(SharedConfiguration.java:66)
	at megamek.client.ui.swing.ClientGUI.<init>(ClientGUI.java:156)
	at mekhq.AtBGameThread.run(AtBGameThread.java:75)

Exception 2:

ERROR: Bad skin specification file: file doesn't exist!  File name: BW - Default.xml
ERROR: Bad skin specification file: file doesn't exist!  File name: BW - Default.xml
ERROR: Bad skin specification file: file doesn't exist!  File name: BW - Default.xml
ERROR: Bad skin specification file: file doesn't exist!  File name: BW - Default.xml
ERROR: Bad skin specification file: file doesn't exist!  File name: BW - Default.xml
ERROR: Bad skin specification file: file doesn't exist!  File name: BW - Default.xml
05:57:51,198 ERROR [megamek.client.ratgenerator.Ruleset] {Stormwolf's Pack} 
Could not locate force generator faction rules.

05:57:51,297 ERROR [megamek.client.ratgenerator.RATGenerator] {Stormwolf's Pack} 
Persepolis 2 (Standard) not found.

Exception in thread "Stormwolf's Pack" java.lang.NullPointerException
	at megamek.client.ui.swing.ForceGeneratorOptionsView.findTOCNode(ForceGeneratorOptionsView.java:855)
	at megamek.client.ui.swing.ForceGeneratorOptionsView.refreshUnitTypes(ForceGeneratorOptionsView.java:652)
	at megamek.client.ui.swing.ForceGeneratorOptionsView.refreshSubfactions(ForceGeneratorOptionsView.java:646)
	at megamek.client.ui.swing.ForceGeneratorOptionsView.refreshFactions(ForceGeneratorOptionsView.java:622)
	at megamek.client.ui.swing.ForceGeneratorOptionsView.initUi(ForceGeneratorOptionsView.java:473)
	at megamek.client.ui.swing.ForceGeneratorOptionsView.<init>(ForceGeneratorOptionsView.java:145)
	at megamek.client.ui.swing.ForceGeneratorViewUi.initUi(ForceGeneratorViewUi.java:97)
	at megamek.client.ui.swing.ForceGeneratorViewUi.<init>(ForceGeneratorViewUi.java:93)
	at megamek.client.ui.swing.RandomArmyDialog.<init>(RandomArmyDialog.java:464)
	at megamek.client.ui.swing.ClientGUI.initialize(ClientGUI.java:544)

@neoancient
Copy link
Member

Are you running this from a release or from the repository source? The mekhq repository doesn't have all the data available to MegaMek.

05:55:11,639 INFO [mekhq.MekHQ] {main}
MekHQ 0.45.1-git
Today is Sun Aug 05 05:55:11 PDT 2018
Java vendor Oracle Corporation
Java version 10.0.1
Platform Windows 10 10.0 (amd64)
Total memory available to MegaMek: 3,135,488 kB

@swang300
Copy link
Contributor Author

swang300 commented Aug 6, 2018

test.zip

And yes, I was going from repository source. In addition to the standard classpath (which includes a MM jar) I also tried to remove the jar from the class path, and have it "depend on project megamek" in the eclipse Java Build Path tab. Same issue.

@neoancient
Copy link
Member

It has nothing to do with the classpath. It looks for the files in the workspace's data directory, and the MekHQ repository does not fully mirror the MM repository. All the data is assembled in the distribution, and that is working.

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

3 participants