jMonkeyEngine / jmonkeyengine

A complete 3-D game development suite written in Java.
http://jmonkeyengine.org
BSD 3-Clause "New" or "Revised" License
3.79k stars 1.12k forks source link

[v3.2.0-stable-sdk1] Eclipse can only launch application once. #800

Closed OfficialTomPG closed 6 years ago

OfficialTomPG commented 6 years ago

I am running macOS High Sierra version 10.13.1 and downloaded JME v3.2.0-stable-sdk1 to use inside Eclipse Oxygen Release Candidate 1 (4.7.0 RC1).

I have set up a SimpleApplication with a GameState that extends AbstractAppState and my SimpleApplication (Game.java) is informed of this state.

I can run the application once and I verified that the state was loaded in and running properly. After trying to run the application again, however, I hit a NPE as soon as I launch. I have changed no code; from what I am reading from the log, JME is trying to load a version.properties file but it isn't finding it so crashing? I have tried telling my Game class to not load defaults for the AppSettings but this doesn't even get a chance to be called.

The crash log is below (thankfully, it's short!):

Exception in thread "main" java.lang.ExceptionInInitializerError at com.jme3.system.AppSettings.(AppSettings.java:222) at immersiveworks.upgradeit.launch.Main.main(Main.java:11) Caused by: java.lang.NullPointerException at java.util.Properties$LineReader.readLine(Properties.java:434) at java.util.Properties.load0(Properties.java:353) at java.util.Properties.load(Properties.java:341) at com.jme3.system.JmeVersion.(JmeVersion.java:51) ... 2 more

This wasn't a problem when I was testing on my Windows PC so I feel like this is a Mac-specific bug?

Thanks for your assistance!

MeFisto94 commented 6 years ago

We're troubleshooting this on the hub: https://hub.jmonkeyengine.org/t/solved-v3-2-0-stable-sdk1-eclipse-can-only-launch-application-once/39907/ Since it seems to be more of a user/permissions problem.

Short investigation also shows: props.load(JmeVersion.class.getResourceAsStream("version.properties"));, so I'm suspecting a corrupt jar when jme is even unable to read it's own resources