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 at com.jme3.material.Material.<init> when running OpenRTS-example Game.java from eclipse #104

Open
keer007 opened this issue Sep 20, 2015 · 2 comments
Assignees

Comments

@keer007
Copy link

keer007 commented Sep 20, 2015

Hi,
I have cloned the latest repository (as of an hour ago) and imported OpenRTS-core and OpenRTS-example as gradle projects in Eclipse. When trying to run Game.java (the main class in example), I run into the following exception -
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at com.jme3.material.Material.(Material.java:120)
at view.material.MaterialManager.getColor(MaterialManager.java:62)
at view.MapView.createSky(MapView.java:89)
at view.MapView.(MapView.java:55)
at Game.simpleInitApp(Game.java:27)
at app.OpenRTSApplication.initialize(OpenRTSApplication.java:156)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:745)

Running with JDK1.8 on Mac OS X and Eclipse Luna. Tried debugging and found that many .j3md definitions are loading properly and the exception is thrown when trying to load matdefs for a 'Unshaded.j3md'. I am totally newbie to jmonkey, so I am not really sure how jmonkey assets/resources are pulled into open-rts. Will keep checking the jmonkey jars pulled by Gradle to see if the above asset exists or not ...

Any tips to get the Game running from Eclipse or atleast start the Example Game from command line using Gradle?

@methusalah
Copy link
Owner

We have to fix it. In the meanwhile; you should run the core main class directly. It's in OpenRTS-Core.src.app.mainRTS

in that Main, F1, F2 and F3 allow you to toggle between editor, gameplay and firstperson view

@keer007
Copy link
Author

keer007 commented Sep 21, 2015

Thanks - core-app.mainRTS works fine.

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