[SOLVED] Jme3.5.0-alpha on armhf

I noticed a variation in adapter definitions here and lwjgl3.2.3 on the image. For example the adapter is Null ?

Open an issue at GitHub, please:

1 Like

I think we might need to change the versions of lwjgl3 to lwjgl-3.2.3 for armhf devices, so others using gradle on the pi won’t face this problem (if there is really someone who cares about pi), for me i currently use lwjgl-3.2.3 jars because i stopped using gradle on the pi, but for gradle users, jme forces them to use lwjgl-3.3.0 which will cause this faulty bad window error.

1 Like

False.

JME depends on it by default. Gradle users are 100% free to override this to whatever version they like. They just need to know to do it.

2 Likes

How to do it ? I really don’t know :slightly_smiling_face:, so may be configurations.exclude lwjgl3.3.0 then add the lwjgl3.2.3 ?

1 Like

See this thread. Gradle includes libraries I don't want

Beware of getting caught in the “I don’t know how to do it so it must be impossible” trap.

3 Likes

Thank you.

1 Like

I added a commit on my fork that may fix this issue: Ali-RS@5dc3e27

@Pavl_G can you give it a try, please?

@sgold, @tonihele will appreciate it if you can take a look at the commit and possibly give feedback please. :slightly_smiling_face:

2 Likes

Yep, good work @Ali_RS. It is like @Samwise and @pspeed pointed out, it is really a setter and we were abusing it. Everything works if one has only one callback set.

3 Likes

Nice work, I looked at the commit, unifying the callbacks is better I think but I think this still won’t solve the null window, but I promise I will try it anyway when I am back on Pi and let you know.

2 Likes

We actually use set NULL on one occasion in jME to remove a callback (the error callback). We maybe should use more of these, since the callbacks do get closed but they remain set in GLFW and that can cause an error. The timing makes things work as this is done in tear down. The app is either closed or reinitialized so it works.

@Pavl_G please retest this with v3.5.0-beta5.

3 Likes

Note that beta5 doesn’t include PR 1711.

3 Likes

Yeah, sorry for my mistake.
@Pavl_G you should use the master branch that includes PR 1711.

3 Likes

Hi there, sorry for long replying time !

I am currently out of my working space (you know the Pi need a HDMI screen), I have only my laptop now so I would have to wait until I am back to my workspace, in the meantime you can upload the lwjgl-SNAPSHOT.jar directly as a release on your master so I will test directly without the need of rebuilding from sources, you can build using the jar building task, I would only need the new lwjgl jar.

Thank you and happy new year !

2 Likes

Hey guys, sorry long time and i wasn’t having a good time with raspberry to test Ali’s last commit !

Today, i have tested lwjgl-3.3.1 on my laptop with intel_x64 processor (amd-64), but the result is weird :

Intel_x64 processor :

Gtk-Message: 15:36:32.219: Failed to load module "canberra-gtk-module"
Apr 01, 2022 3:36:34 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.2-origin-master-6261
 * Branch: origin-master
 * Git Hash: debd62e
 * Build Date: 2017-07-08
Apr 01, 2022 3:36:34 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 3.1.3 build 1 context running on thread main
 * Graphics Adapter: GLFW 3.3.0 X11 GLX EGL clock_gettime /dev/js shared
Apr 01, 2022 3:36:34 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
 * Vendor: Intel Open Source Technology Center
 * Renderer: Mesa DRI Intel(R) HD Graphics 620 (KBL GT2F)
 * OpenGL Version: 3.0 Mesa 20.0.8
 * GLSL Version: 1.30
 * Profile: Compatibility
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: 0x4e00024
  Serial number of failed request:  670
  Current serial number in output stream:  677

So, why it detects that i am running on lwjgl-3.1.3 build 1 ??

I have downloaded lwjgl from the official release on github : Release LWJGL 3.3.1 · LWJGL/lwjgl3 · GitHub

I haven’t tested on arm-hf yet, should we move this issue to another development thread ?

EDIT :
I will double check my dependencies again, because there seems to be something wrong with them, even jme is showing up a wrong version, despite i have downloaded jme3.5.1-stable from mvn central.

1 Like

Definitely. Sounds like you are using gradle for your build - your gradle files should specify the correct version of JME, manually downloading it will not override what the buildfile is doing.

1 Like

I am not using gradle for this project, i am downloading jars manually from maven and building with shell (as for lwjgl3.3.1 from github), but the weird thing that i have downloaded lwjgl-3.3.1 and jme shows wrong versions, may be the problem with jme dependencies.

1 Like

Alright, i noticed a missing dependency (lwjgl-opengl) so i have added it and tested on pi and the result is promising :slightly_smiling_face: :

pi@raspberrypi:~/NativePiTemplate/output/run $ ./run.sh 
Run
..................................
hey
Dec 17, 2021 3:30:14 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.5.1-stable
 * Branch: HEAD
 * Git Hash: 28bf1c9
 * Build Date: 2022-03-20
Dec 17, 2021 3:30:15 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 3.3.1 build 7 context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Dec 17, 2021 3:30:15 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
 * Vendor: Broadcom
 * Renderer: V3D 4.2
 * OpenGL Version: 2.1 Mesa 19.3.2
 * GLSL Version: 1.20
 * Profile: Compatibility
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MeshLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SkeletonLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MaterialLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SceneLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.fbx.FbxLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.GltfLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.BinLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.GlbLoader
Dec 17, 2021 3:30:16 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.audio.plugins.OGGLoader
Dec 17, 2021 3:30:16 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.21.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_SOFT_device_clock ALC_SOFT_HRTF ALC_SOFT_loopback ALC_SOFT_loopback_bformat 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_bformat_ex AL_SOFTX_bformat_hoa AL_SOFT_block_alignment AL_SOFTX_callback_buffer AL_SOFTX_convolution_reverb AL_SOFT_deferred_updates AL_SOFT_direct_channels AL_SOFT_direct_channels_remix AL_SOFT_effect_target AL_SOFT_events AL_SOFTX_filter_gain_ex AL_SOFT_gain_clamp_ex AL_SOFT_loop_points AL_SOFTX_map_buffer AL_SOFT_MSADPCM AL_SOFT_source_latency AL_SOFT_source_length AL_SOFT_source_resampler AL_SOFT_source_spatialize
Dec 17, 2021 3:30:16 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio effect extension version: 1.0
Dec 17, 2021 3:30:16 PM com.jme3.audio.openal.ALAudioRenderer initOpenAL
INFO: Audio max auxiliary sends: 2

But, i still have no idea about what happened above when testing on my intel_x64 (but there was a missing dependency), anyway when i am home i will retest on my laptop after adding the opengl dependency.

1 Like

Hi @Ali_RS , i have downgraded now to lwjgl-3.3.0 dependencies with jme3.5.1-stable to test your last PR and it hasn’t resolved the problem (null window) :

pi@raspberrypi:~/NativePiTemplate/output/run $ ./run.sh 
Run
..................................
hey
Dec 17, 2021 3:53:58 PM com.jme3.system.JmeDesktopSystem initialize
INFO: Running on jMonkeyEngine 3.5.1-stable
 * Branch: HEAD
 * Git Hash: 28bf1c9
 * Build Date: 2022-03-20
Dec 17, 2021 3:53:59 PM com.jme3.system.lwjgl.LwjglContext printContextInitInfo
INFO: LWJGL 3.3.0 build 21 context running on thread jME3 Main
 * Graphics Adapter: GLFW 3.4.0 Wayland X11 GLX Null EGL OSMesa monotonic shared
Dec 17, 2021 3:53:59 PM com.jme3.renderer.opengl.GLRenderer loadCapabilitiesCommon
INFO: OpenGL Renderer Information
 * Vendor: Broadcom
 * Renderer: V3D 4.2
 * OpenGL Version: 2.1 Mesa 19.3.2
 * GLSL Version: 1.20
 * Profile: Compatibility
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MeshLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SkeletonLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.MaterialLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.ogre.SceneLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.fbx.FbxLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.GltfLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.BinLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.scene.plugins.gltf.GlbLoader
Dec 17, 2021 3:54:00 PM com.jme3.asset.AssetConfig loadText
WARNING: Cannot find loader com.jme3.audio.plugins.OGGLoader
Dec 17, 2021 3:54:00 PM com.jme3.app.LegacyApplication handleError
SEVERE: Uncaught exception thrown in Thread[jME3 Main,5,main]
java.lang.NullPointerException
	at org.lwjgl.system.Callback.get(Callback.java:190)
	at org.lwjgl.glfw.GLFWWindowSizeCallback.create(GLFWWindowSizeCallback.java:36)
	at org.lwjgl.glfw.GLFWWindowSizeCallback.createSafe(GLFWWindowSizeCallback.java:45)
	at org.lwjgl.glfw.GLFW.glfwSetWindowSizeCallback(GLFW.java:3139)
	at com.jme3.input.lwjgl.GlfwMouseInput.initCallbacks(GlfwMouseInput.java:237)
	at com.jme3.input.lwjgl.GlfwMouseInput.initialize(GlfwMouseInput.java:178)
	at com.jme3.app.LegacyApplication.initInput(LegacyApplication.java:336)
	at com.jme3.app.LegacyApplication.initialize(LegacyApplication.java:641)
	at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:198)
	at com.jme3.system.lwjgl.LwjglWindow.initInThread(LwjglWindow.java:548)
	at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:662)
	at java.base/java.lang.Thread.run(Thread.java:834)

Dec 17, 2021 3:54:00 PM com.jme3.app.LegacyApplication handleError
SEVERE: Failed to destroy context
java.lang.NullPointerException
	at org.lwjgl.system.Callback.get(Callback.java:190)
	at org.lwjgl.glfw.GLFWErrorCallback.create(GLFWErrorCallback.java:40)
	at org.lwjgl.glfw.GLFWErrorCallback.createSafe(GLFWErrorCallback.java:49)
	at org.lwjgl.glfw.GLFW.glfwSetErrorCallback(GLFW.java:1288)
	at com.jme3.system.lwjgl.LwjglWindow.destroyContext(LwjglWindow.java:448)
	at com.jme3.system.lwjgl.LwjglWindow.deinitInThread(LwjglWindow.java:646)
	at com.jme3.system.lwjgl.LwjglWindow.lambda$initInThread$12(LwjglWindow.java:518)
	at java.base/java.lang.Thread.dispatchUncaughtException(Thread.java:2002)

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  20 (X_GetProperty)
  Resource id in failed request:  0x1600061
  Serial number of failed request:  1967
  Current serial number in output stream:  1967

I am so sorry for this long time, i didn’t find enough free time to test your PR before jme3.5.1-stable.

2 Likes