could you try this build, please?
I’m getting a similar problem with the exact Xorg error code, but using bspwm
. (which I believe it’s not too different to awesome WM
)
However, when I debugged the editor, the crash seemed to happen randomly on LwjglWindow.java
(from jME) inside the “update loop”. Sometimes it only takes 3 cycles to crash, but other times it was able to go through 20 cycles.
I finally have the time to test more about this problem, so I’ll try both your workaround and a simple jME test case now.
Thank you for the quick reply!
Sadly this doesn’t work either. The output seems to be the same:
$ /opt/jMonkeyBuilder/jMonkeyBuilder
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
WARNING 15:44:04:286 BasePluginSystem: can’t load the plugin from the directory/opt/jMonkeyBuilder/app/embedded-plugins/jmb-shader-nodes because can’t find any plugin class with description.
Jun 09, 2018 3:44:04 PM com.jme3.system.NativeLibraryLoader setExtractionFolderToUserCache
WARNING: Working directory is not writable. Natives will be extracted to:
/home/eike/.cache/jme3/natives_81b2237d
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.fxmisc.richtext.TextFlowExt (file:/opt/jMonkeyBuilder/app/libs/richtextfx-0.9.0.jar) to method javafx.scene.text.TextFlow.getTextLayout()
WARNING: Please consider reporting this to the maintainers of org.fxmisc.richtext.TextFlowExt
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 75
Current serial number in output stream: 76
AL lib: (EE) alc_cleanup: 1 device not closed
It seems a bug with glfw back-end of lwjgl3, I will try to update these libraries.
Still no luck… It gives me the same error.
I’m having trouble loading any scene that has a PBR tree on version 1.8.0 - if the scene contains any tree I’ve made since the new version, then JMB crashes without any error, but only if the tree has a leaf material applied.
When I try to make a new SimarborealTree project in JMB, then I also get the following error as well as a JMB crash when I try to apply a leaf material that I have created from the old version.
com.jme3.asset.AssetNotFoundException: MatDefs/FragScattering.glsllib
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:370)
at com.jme3.shader.plugins.GLSLLoader.loadNode(GLSLLoader.java:102)
at com.jme3.shader.plugins.GLSLLoader.load(GLSLLoader.java:199)
at com.jme3.asset.DesktopAssetManager.loadLocatedAsset(DesktopAssetManager.java:259)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:373)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:386)
at com.jme3.material.TechniqueDef.loadShader(TechniqueDef.java:512)
at com.jme3.material.TechniqueDef.getShader(TechniqueDef.java:527)
at com.jme3.material.logic.DefaultTechniqueDefLogic.makeCurrent(DefaultTechniqueDefLogic.java:59)
at com.jme3.material.Technique.makeCurrent(Technique.java:152)
at com.jme3.material.Material.preload(Material.java:851)
at com.jme3.renderer.RenderManager.preloadScene(RenderManager.java:663)
at com.ss.editor.manager.JmeFilePreviewManager.tryToLoad(JmeFilePreviewManager.java:357)
at com.ss.editor.manager.JmeFilePreviewManager.showMaterial(JmeFilePreviewManager.java:398)
at com.ss.editor.manager.JmeFilePreviewManager.lambda$showPreview$1(JmeFilePreviewManager.java:292)
at com.ss.editor.executor.impl.JmeThreadExecutor.execute(JmeThreadExecutor.java:82)
at com.ss.rlib.common.util.array.Array.forEach(Array.java:273)
at com.ss.editor.executor.impl.JmeThreadExecutor.execute(JmeThreadExecutor.java:73)
at com.ss.editor.JmeApplication.update(JmeApplication.java:378)
at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:506)
at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:589)
at com.jme3.system.lwjgl.LwjglWindow.create(LwjglWindow.java:427)
at com.jme3.jfx.injfx.JmeOffscreenSurfaceContext.create(JmeOffscreenSurfaceContext.java:215)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:463)
at com.jme3.app.LegacyApplication.start(LegacyApplication.java:424)
at com.jme3.app.SimpleApplication.start(SimpleApplication.java:125)
at com.ss.editor.JfxApplication.startJmeApplication(JfxApplication.java:183)
at com.ss.editor.JfxApplication.lambda$main$0(JfxApplication.java:142)
at java.base/java.lang.Thread.run(Thread.java:844)
Do you know what is it?
MatDefs/FragScattering.glsllib
Could you try to launch any jME hello example using lwjgl3 as back-end, please?
this is the atmospheric shader from @pspeed
You need to define a folder with your custom libraries in Settings:
because the MatDefs/FragScattering.glsllib isn’t part of jME libraries.
Ohh I was using one of my old leaf materials from the original SimArboreal editor, rather than your PBR implementation for JMB.
I created a new Tree Project in JMB and I’m trying to get the embedded PBR leaf material to work, but for some reason the leaves are always black by default, and I can’t seem to get the proper colors from the albedo texture to appear
You can create not PBR tree as well, but what about your problem… which OpenGL version do you use in Settings of jMB?
It says its using OpenGl 3.3 with core profile.
I should also note that the only way I can get the leaves to change from black is by altering the Emissive Color. But it doesn’t seem like I can get the Albedo colors to show through.
I am not sure if you’ve had time to look into it yet, but I had some time to investigate this error with the PBR Leaves showing up black, and it looks like the problem is occurring where the directDiffuse
vec3 variable is being computed
I was confused at first, because your PBR Bark shader and your PBR Leaf shader both use the same reference to PBRLighting.frag. But I found the problem lies in the value being assigned to directDiffuse in this part of the fragment shader
vec3 directDiffuse;
vec3 directSpecular;
float hdotv = PBR_ComputeDirectLight(normal, lightDir.xyz, viewDir,
lightColor.rgb, fZero, Roughness, ndotv,
directDiffuse, directSpecular);
// the value being assigned to directDiffuse is always (0, 0, 0), causing leaves to appear un-lit
// directDiffuse = vec3(1.0, 1.0, 1.0); // <- set a fixed value here for testing. un-commenting this line will cause leaves to light up very bright
vec3 directLighting = diffuseColor.rgb *directDiffuse + directSpecular;
gl_FragColor.rgb += directLighting * fallOff;
}
I tried looking at the difference in the .vert file for the Bark shader compared to the Leaves, but I could not figure out the underlying source of the problem.
I’m going to look at this problem after when I finish some refactoring in 1.9.0 I’m working on reducing startup time of jMB now.
I can run the examples with lwjgl3 using openjdk 8, but using jdk 9 or 10 I get the following error:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jme3.util.ReflectionAllocator (file:/home/eike/Coding/jmonkeyengine/jme3-core/build/libs/jme3-core-3.3.0-SNAPSHOT.jar) to method sun.nio.ch.DirectBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.jme3.util.ReflectionAllocator
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Jun 14, 2018 12:14:33 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.3-6586
- Branch: master
- Git Hash: d57c362
- Build Date: 2018-06-14
Jun 14, 2018 12:14:33 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 3.1.5 build 1 context running on thread Thread-0- Graphics Adapter: GLFW 3.3.0 X11 GLX EGL clock_gettime evdev shared
Jun 14, 2018 12:14:34 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information- Vendor: X.Org
- Renderer: AMD PITCAIRN (DRM 2.50.0 / 4.13.0-45-generic, LLVM 5.0.0)
- OpenGL Version: 3.0 Mesa 17.2.8
- GLSL Version: 1.30
- Profile: Compatibility
Jun 14, 2018 12:14:34 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio Renderer Information- Device: OpenAL Soft
- Vendor: OpenAL Community
- Renderer: OpenAL Soft
- Version: 1.1 ALSOFT 1.18.1
- Supported channels: 64
- ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFTX_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_output_limiter ALC_SOFT_pause_device
- AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_gain_clamp_ex AL_SOFT_loop_points AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize
Jun 14, 2018 12:14:34 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Jun 14, 2018 12:14:34 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 2
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: 0x360006d
Serial number of failed request: 5253
Current serial number in output stream: 5254
AL lib: (EE) alc_cleanup: 1 device not closed
so, could you test jMB 1.7.2, please? it uses java8
It gives me the same crash on startup:
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp Jun 14, 2018 12:34:17 PM com.jme3.system.JmeDesktopSystem initialize INFO: Running on jMonkeyEngine 3.3-v3.3.dev-6516 * Branch: v3.3.dev * Git Hash: b2cdc4f * Build Date: 2018-02-21 Jun 14, 2018 12:34:17 PM com.jme3.system.NativeLibraryLoader setExtractionFolderToUserCache WARNING: Working directory is not writable. Natives will be extracted to: /home/eike/.cache/jme3/natives_69f4d54 Jun 14, 2018 12:34:17 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo INFO: LWJGL 3.1.2 build 29 context running on thread LWJGL Render * Graphics Adapter: GLFW 3.3.0 X11 GLX EGL clock_gettime /dev/js shared Jun 14, 2018 12:34:17 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon INFO: OpenGL Renderer Information * Vendor: X.Org * Renderer: AMD PITCAIRN (DRM 2.50.0 / 4.13.0-45-generic, LLVM 5.0.0) * OpenGL Version: 4.5 (Core Profile) Mesa 17.2.8 * GLSL Version: 4.50 * Profile: Core Jun 14, 2018 12:34:18 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL INFO: Audio Renderer Information * Device: OpenAL Soft * Vendor: OpenAL Community * Renderer: OpenAL Soft * Version: 1.1 ALSOFT 1.17.2 * Supported channels: 64 * ALC extensions: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_DEDICATED ALC_EXT_disconnect ALC_EXT_EFX ALC_EXT_thread_local_context ALC_SOFTX_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFTX_output_limiter ALC_SOFT_pause_device * AL extensions: AL_EXT_ALAW AL_EXT_BFORMAT AL_EXT_DOUBLE AL_EXT_EXPONENT_DISTANCE AL_EXT_FLOAT32 AL_EXT_IMA4 AL_EXT_LINEAR_DISTANCE AL_EXT_MCFORMATS AL_EXT_MULAW AL_EXT_MULAW_BFORMAT AL_EXT_MULAW_MCFORMATS AL_EXT_OFFSET AL_EXT_source_distance_model AL_EXT_SOURCE_RADIUS AL_EXT_STEREO_ANGLES AL_LOKI_quadriphonic AL_SOFT_block_alignment AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_gain_clamp_ex AL_SOFT_loop_points AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize Jun 14, 2018 12:34:18 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL INFO: Audio effect extension version: 1.0 Jun 14, 2018 12:34:18 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL INFO: Audio max auxiliary sends: 2 X Error of failed request: BadAccess (attempt to access private resource denied) Major opcode of failed request: 2 (X_ChangeWindowAttributes) Serial number of failed request: 63 Current serial number in output stream: 64 AL lib: (EE) alc_cleanup: 1 device not closed
Could you try to use openjdk8 to run jMB 1.7.2?