jMonkeyEngine / jMonkeyEngine/jmonkeyengine
If you do not load default settings the flyCam will be equal null
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 14
Description
public static void main(String[] args) {
Battletown app = new Battletown();
AppSettings settings = new AppSettings(false);
settings.setFullscreen(true);
app.setSettings(settings);
app.setShowSettings(false); //Settings dialog not supported on mac
app.start();
}
flyCam.setEnabled(false);
SEVERE: Uncaught exception thrown in Thread[jME3 Headless Main,5,main]
java.lang.NullPointerException: Cannot invoke "com.jme3.input.FlyByCamera.setEnabled(boolean)" because "this.flyCam" is null
at com.waystudio.Battletown.simpleInitApp(Battletown.java:31)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:240)
at com.jme3.system.NullContext.initInThread(NullContext.java:102)
at com.jme3.system.NullContext.run(NullContext.java:146)
at java.base/java.lang.Thread.run(Thread.java:833)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Battletown.simpleInitApp() call shown in the report, then read SimpleApplication.initialize() and NullContext.initInThread() around the stack trace. Reproduce the AppSettings(false) setup without loading default settings and verify that calling flyCam.setEnabled(false) no longer causes a NullPointerException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100