-
-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Null pointer with FFIClosure, using hashmap-based ClosureRegistry. #720
Comments
Hey @mindstorm38, This is a weird one. The only explanation for the NPE is that
I would need more information to figure this out. One easy way to see if something's wrong with LWJGL is to clone it on the RPi and run some tests:
( |
Thank you for the answer, I've done that, here are my results. First, in addition to JDK, Ant and GCC, I was missing GTK3 and I needed to manually add the Output of
Output of Gears demo:
Output of Events demo:
The same exception occurs after the window is closed, when calling |
Thank you @mindstorm38, this looks like a bug indeed. I'm afraid I don't have access to my RPi atm and won't be able to debug this properly for a couple of months at least. I went through all the relevant code, as well as the CI build for libffi, couldn't find anything that would justify this behavior. It also looks kind of random? For example, the Try adding Finally, try running the tests/demos with |
I will test this later, thank you :) |
Without changing anything but Without system allocator: Gears demo:
Events demo:
|
I've found the bug, will be fixed in the next snapshot (3.3.1 build 5). 3.3.1 will also have to be released ahead of schedule, because LWJGL is currently broken on Windows x86 and Linux ARM32. |
Thanks @mindstorm38! |
This fixes pointer casts on 32-bit architectures. Previously, addresses that happened to be greater than 2GB on x86/arm32 would overflow when cast to intptr_t and, via the cast to jlong, propagate as negative values to Java code.
Version
3.3.0 (nightly)
Platform
Linux arm32
JDK
OpenJDK 17.0.1 2021-10-19 LTS
Module
Core, GLFW
Bug description
This issue is related to Minecraft, I'm trying to run it on my RPi 400, which run on Debian, ARMv7 (32 bits). I got the correct shared objects in the directory specified by
java.library.path
(note that natives artifacts are not added to the classpath, it would be redundant), here is a screenshot of this directory:When starting the game, it crashes because of a
NullPointerException
(full crash report à the end of the issue):I've tested with LWJGL 3.2.3, which is the first version to come with pre-compiled ARM32 shared objects, and it works, so I supposed that it doesn't come from Minecraft, but rather from LWJGL.
If you are interested, I also captured the output with
-Dorg.lwjgl.util.Debug=true
and-Dorg.lwjgl.util.DebugAllocator=true
(I stripped useless Minecraft outputs): lwjgl_with_debug.txtStacktrace or crash log output
The text was updated successfully, but these errors were encountered: