Hi Everyone,
jMonkeyEngine v3.7 release branch was forked today from master and by that we are entering the feature freeze phase in which only bug fixes will be streamed to the next release. New features can still be merged to master as usual though.
With the release branch, a new jMonkeyEngine v3.7.0-alpha3 release was created and is available for testing.
There is a release page containing the engine updates which are included in this version (related to alpha2 ).
A basic gradle script for testing the alpha3 version will be something like this:
I have updated my product build gradle to v3.7.0-alpha3 and minie 8.0.0 and got the following exception when trying to load a GLTF model:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Mar 13, 2024 7:19:09 PM com.jme3.bullet.objects.PhysicsRigidBody rebuildRigidBody
INFO: Created 291f7130fe0.
Mar 13, 2024 7:19:09 PM com.scenemaxeng.projector.SceneMaxApp handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NoSuchMethodError: com.google.gson.JsonParser.parseReader(Lcom/google/gson/stream/JsonReader;)Lcom/google/gson/JsonElement;
at com.jme3.plugins.gson.GsonParser.parse(GsonParser.java:46)
at com.jme3.scene.plugins.gltf.GltfUtils.parse(GltfUtils.java:72)
at com.jme3.scene.plugins.gltf.GltfLoader.loadFromStream(GltfLoader.java:124)
at com.jme3.scene.plugins.gltf.GltfLoader.load(GltfLoader.java:107)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:274)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:390)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:441)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:446)
at com.scenemaxeng.projector.SceneMaxApp.loadModelSpatial(SceneMaxApp.java:1813)
at com.scenemaxeng.projector.SceneMaxApp.loadModel(SceneMaxApp.java:2091)
at com.scenemaxeng.projector.SceneMaxApp.instantiateVariable(SceneMaxApp.java:1426)
at com.scenemaxeng.projector.InstantiateGraphicEntityController.run(InstantiateGraphicEntityController.java:32)
at com.scenemaxeng.projector.CompositeController.run(CompositeController.java:87)
at com.scenemaxeng.projector.SceneMaxApp.simpleUpdate(SceneMaxApp.java:2937)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:263)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:163)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:245)
at java.base/java.lang.Thread.run(Thread.java:834)
It looks like there were changes in the GsonParser (maybe we upgraded the parser for the new release?)
The problem was that I was using JME3.5.2 which probably worked against Gson earlier than 2.9.1 (I think 2.8.1 or earlier) then I have upgraded to v3.7-alpha3 and I had (for some reason) gson 2.8.1 lib which collided with the gradle import. I just removed the gson lib from the lib folder and everything worked fine. I think it’s best if possible to avoid the import of jars from the lib folder and work with gradle as much as possible to avoid this kind of crashes
Yes. I am using ant in the sdk.
However, if I download the project here: Release v3.7.0-alpha3.1 · jMonkeyEngine/jmonkeyengine · GitHub
and I extract the project and try to run jME examples I get the same problem.
Reason is, there is no native lwjgl libs.
The difference is that jME3.6.1-stable.zip contains the JARs needed for LWJGL v2 whereas jME3.7.0-alpha3.1.zip contains the JARs needed for LWJGL v3.
I’m not 100% certain, but I think this is related to PR 2153 which (accidentally?) switched jme3-examples from using jme3-lwjgl to jme3-lwjgl3. I suspect this indirectly switched the “dist” task from using jme3-lwjgl to jme3-lwjgl3.
Ideally, the dist ZIP should contain the JARs for both LWJGL v2 and v3 (and for Android and iOS and VR as well). However, that would entail significant changes to the Gradle build scripts.
If it can only contain one it feels like it should be jme3-lwjgl3 even if that’s (sort of) a breaking change. jme3-lwjgl3 has been out long enough now.
(I’d also argue that gradle/maven is the way to go when consuming these, not the zip)
@sgold, this problem is related to this PR (little but yes)
The reason for these problems is that jme3-lwjgl3 only loaded the dependencies at runtime and when compiling JME3 it did not export the jar files, this can be solved by changing the way of adding the dependencies:
api "org.lwjgl:lwjgl:${lwjgl3Version}:natives-windows"
Should we use jme3-lwjgl3 by default in the examples? (I think it’s already quite stable)
Yes and no. The examples have a Swing based test chooser. LWJGL 3 and Swing aren’t exactly the best of friends. Examples should be run with LWJGL 3, there is very little on jME side too what hasn’t been implemented. The said test chooser and the graphics settings selection aren’t. That might mean that someones first impressions are that the examples don’t run at all.
Hi @fba ,
I’m integrating bug fixes / error handling / code formatting improvements from time to time (not a lot so far maybe 5-6 PRs). On my side, I have encountered a problem with the materials loading of one of the GLTF models that I’m using in my game. I intend to create a self contained sample app reproducing the problem so maybe the community will succeed to understand the difference between 3.6.1 and 3.7.1 that caused this issue.