Programming > Bug Reports / RFE
[Bug] LWJGL crashes on some devices
Zoe:
This question is related to the Android port of LWJGL
So I tried installing a game of mine on my tablet. I got an error ([this thing](https://stackoverflow.com/questions/24572052/install-failed-no-matching-abis-when-install-apk)). I added some code in build.gradle to bypass that and install it anyways.
Obviously, the error itself is clear: Missing natives. I bypassed it at the time because I thought it was a mistake
I bypass it and essentially force an install. On running it, it crashes:
java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
The only part in my code the stacktrace points to is this line:
GLES.createCapabilities();
Then it goes into LWJGL with expected calls from there.
I also tried reproducing this with the `android-test` repo to check if it's an error with my code or if it's an LWJGL issue. I reproduced it there too. And I created a third project and added that single line (along with a GLSurfaceView and the accompanying renderer of course).
I have two devices (a Samsung S6 edge and a NVIDIA shield tablet) for testing. Installing and running on my phone works like a charm. Attempting to install on the tablet fails (and when the install fail is bypassed) crashes.
Went ahead and downloaded the AnTuTu benchmark app (for the info). These two devices are very similar: same OS version, OpenGL ES version, etc. Obviously, screen size, and in general the screen hardware is different (obviously). None of the expected differences matter though. One difference is 32 vs 64 bit, but running on a 32 bit device works fine. The only remaining difference is the processor. My phone is x86 while my tablet is ARM.
Does LWJGL not support ARM Android devices?
spasi:
You must build LWJGL for ARM/Android manually. The instructions are in the android-test repository for now. Both arm64-v8a and armeabi-v7a architectures have been tested and should work.
Zoe:
The only part with the different processor architectures I see in the android-test repo are the vulkan validation layers (I'm not using Vulkan btw).
I cloned the lwjgl3 repo, followed the instructions (checkout android, build with ant and copy the aar file). I re-compiled it to check if I had done it wrong, still the same issue. (I didn't download the desktop jars. Built it manually in the first place)
Zoe:
Re-cloned the LWJGL3 repo, and re-compiled the lwjgl.aar file (for the 3rd time or so). Still can't get it to run on ARM devices.
It doesn't want to install because it can't find the natives. Forcing the install:
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}
installs it but crashes on boot because it can't find the native lib
spasi:
Sounds like it's trying to load the 64bit natives. Try an arm64-v8a build instead of armeabi-v7a. If it still fails, run your application with -Dorg.lwjgl.util.Debug=true and -Dorg.lwjgl.util.DebugLoader=true and post the output here.
Navigation
[0] Message Index
[#] Next page
Go to full version