jMonkeyEngine 3.1.0 Beta 3+4 Released (engine)

Not sure if this is the right place for this or not… feel free to move this if you’d rather it was in a different thread.

When running jME 3.1.0-beta3 with LWJGL3 (gradle artifact: ‘org.jmonkeyengine:jme3-lwjgl3:3.1.0-beta3’), I get a crash when starting with all default settings, but only if the settings are NOT loaded from a file. When my application starts, it looks in the user’s home directory for its settings directory. If it does not find it, it creates the default jME settings like so:

private static AppSettings defaultSettings(){
     AppSettings settings = new AppSettings(true);
     try {
	settings.save(System.out);
     } catch (IOException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
     }
		
     settings.putString("uistyle", "glass");
		
     return settings;
}

… and then it displays the jME settings window:

if(!Files.exists(settingsFile)){
   settings = defaultSettings();
   app.setShowSettings(true);
   ... save settings and here and continue with startup
}
   

Here are the settings that are dumped to System.out when only default settings are used (only clicked ‘Continue’ on the jME settings window)

#jME3 AppSettings
#Sun Jan 29 11:42:29 PST 2017
Renderer(string)=LWJGL-OpenGL2
Width(int)=640
DisableJoysticks(bool)=true
SettingsDialogImage(string)=/com/jme3/app/Monkey.png
Height(int)=480
Title(string)=jMonkeyEngine 3.1-beta3
Samples(int)=0
Resizable(bool)=false
BitsPerPixel(int)=24
UseInput(bool)=true
GammaCorrection(bool)=false
Frequency(int)=60
DepthBits(int)=24
Fullscreen(bool)=false
AudioRenderer(string)=LWJGL
StencilBits(int)=0
VSync(bool)=false
FrameRate(int)=-1
MinHeight(int)=0
MinWidth(int)=0
SwapBuffers(bool)=true

Here are the settings that are loaded from the file:

#jME3 AppSettings
#Sun Jan 29 11:42:56 PST 2017
Renderer(string)=LWJGL-OpenGL2
Width(int)=640
DisableJoysticks(bool)=true
SettingsDialogImage(string)=/com/jme3/app/Monkey.png
Height(int)=480
Title(string)=jMonkeyEngine 3.1-beta3
Samples(int)=0
Resizable(bool)=false
BitsPerPixel(int)=24
UseInput(bool)=true
GammaCorrection(bool)=false
Frequency(int)=60
DepthBits(int)=24
Fullscreen(bool)=false
AudioRenderer(string)=LWJGL
StencilBits(int)=0
VSync(bool)=false
FrameRate(int)=-1
MinHeight(int)=0
MinWidth(int)=0
SwapBuffers(bool)=true
uistyle(string)=glass

Both sets of settings are identical with the exception of the uistyle line, which is only because the uistyle is added after the newly created default settings are dumped to System.out. In short: both sets of settings are identical. However, if my application starts with the settings that are created on the fly (not loaded from file), my application crashes with the following:

(java:9812): Gtk-WARNING **: Unable to locate theme engine in module_path: "oxygen-gtk",
Jan 29, 2017 11:42:35 AM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.1-beta3
 * Branch: HEAD
 * Git Hash: 69cd160
 * Build Date: 2017-01-29
Jan 29, 2017 11:42:35 AM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 3.0.0b SNAPSHOT context running on thread main
 * Graphics Adapter: GLFW 3.2.0 X11 GLX clock_gettime /dev/js XI Xf86vm shared
X Error of failed request:  RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request:  139 (RENDER)
  Minor opcode of failed request:  7 (RenderFreePicture)
  Picture id in failed request: 0x3e00021
  Serial number of failed request:  803
  Current serial number in output stream:  813

This only happens with LWJGL3 - if I run against LWJGL2 it all starts up fine whether the settings are freshly created or loaded from file.

EDIT: started a new thread for this at LWJGL3 startup crash

2 Likes