They are now released into maven central, it might take a few hours to show up on Maven Central Repository Search.
@Pesegato, please try the new release and let me know if you had an issue.
They are now released into maven central, it might take a few hours to show up on Maven Central Repository Search.
@Pesegato, please try the new release and let me know if you had an issue.
I found an issue with the ScreenshotAppState. Taking one screenshot works but the second time it crashes the app with:
com.jme3.renderer.RendererException: Attempting to upload empty buffer (remaining = 0), that's an error
at com.jme3.renderer.lwjgl.LwjglRender.checkLimit(LwjglRender.java:22)
at com.jme3.renderer.lwjgl.LwjglGL.glReadPixels(LwjglGL.java:399)
at com.jme3.renderer.opengl.GLRenderer.readFrameBufferWithGLFormat(GLRenderer.java:2165)
at com.jme3.renderer.opengl.GLRenderer.readFrameBuffer(GLRenderer.java:2147)
at com.jme3.app.state.ScreenshotAppState.postFrame(ScreenshotAppState.java:287)
at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:1233)
at com.jme3.renderer.RenderManager.render(RenderManager.java:1297)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:278)
at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:622)
at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:711)
at java.lang.Thread.run(Thread.java:748)
The code to reproduce is as simple as:
public class ScreenshotDemo extends SimpleApplication {
public static void main(String[] args) {
new ScreenshotDemo().start();
}
public ScreenshotDemo() {
super(new ScreenshotAppState(null, "test-"));
}
@Override
public void simpleInitApp() {
inputManager.addMapping("ScreenShot", new KeyTrigger(KeyInput.KEY_F12));
}
}
I bisected the issue to this commit: Fix issue #1850 (JmeSystem.writeImageFile() throw java.nio.BufferUnde⦠· jMonkeyEngine/jmonkeyengine@49a3102 · GitHub
@xuan thanks for testing and reporting this issue
Using imageData.duplicate()
in the below line fixed the issue for me. Going to submit a patch.
Edit:
Calling imageData.clear();
after the above line also does fix it.
Should I go with the first solution or the second one?
Submitted a fix
Great job! Thanks
Yes it works now!
I hope to release the first beta on 24 January and freeze the code for new features on v3.6 branch.
JME 3.6.0-beta1 is released and is available in the maven central repository. Please try it out and report it if you found an issue.
The master branch is updated to version 3.7 for continuous development.
WARNING: JmeDialogsFactory implementation not found.
Not sure what that means, but we donāt have a settings dialog anymore?
For the record, I didnāt test the alphas. Jumped from 3.5.2-stable straight into this beta.
We do have it, but it is now in a separate module jme3-awt-dialogs.
You can enable it by adding this dependency:
implementation "org.jmonkeyengine:jme3-awt-dialogs:$jmeVersion"
Nice move. Thanks!