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
Example generated project fails with an assertion #5916
Comments
LWJGL2 is incompatible with OpenJDK11+ on some linux distros. Either switch to LWJGL3, or OpenJDK 8, or an alternative OpenJDK distribution. |
I would prefer to not downgrade system-wide Java so I will try LWJGL3 and alternative OpenJDK distribution. As I understand I can try using OpenJDK made by an another provider - https://stackoverflow.com/a/52431765 list multiple ones, other than what is packaged for Lubuntu. I will try to do this.
I found #3673
but I am worried that issue "Finish LWJGL 3 backend and request for testing" is open. Hopefully it is "final polishing is missing", not "mostly broken and unfinished" |
The LWJGL 3 part is fine for LWJGL 2 functionality. Vulkan helped address this in a way. LWJGL 3 does not fully support Vulkan, instead of the other way around. Its base support is fine. In Linux, I think you want Nvidia driver 340 or higher for full LWJGL 3 support on OpenGL. In general, NVidia models from 2012 and later should be mostly fine, unless integrated with a laptop. With laptops, it's more of a firmware issue at that point, since it draws from the CPU. You should only face an issue if a video card manufacturer decided to only support Vulkan and NOT OpenGL for whatever strange reason. AMD seems to also slowly come to its senses with Linux support, but that's still proprietary. The AMD model matters much more with Linux than it would with Windows or MacOS. Also, Vulkan mostly consists of some proprietary AI stuff going on to help its optimization. Otherwise, it's mostly OpenGL with extended limits. It's good for arcade hardware I suppose, where a developer may aim big. I think one of the reasons for LWJGL 3's "experimental" status is that Android and iOS do not support Vulkan. Oddly enough, a few high-end Mobile models on both sides incorporate tiny versions of Vulkan. This saw some success with a few limited titles that supported it, but it tends to kill a battery's life span maybe. The most recent versions from late last year addressed this I think on the hardware side. |
Just so we're clear, LWJGL3 has Vulkan bindings but libGDX does not use Vulkan, and the above message re: Vulkan is entirely irrelevant to libGDX at this point in time. I'm not sure what prompted a mention of GPU hardware, because this error has already been resolved more than once by switching to a different OpenJDK distro. GPU drivers don't even need to be considered if you switch your JDK and stay on LWJGL2... |
I dis-agree with the hardware part, concerning drivers and GPUs. LWJGL 3 provides better support for 2012 devices and beyond. LWJGL 2 tends to support devices much older than 2012, while version 3 might not. Hardware only supporting version 2 generally provides very poor performance on version 3. In my own experience, driver versions do matter, especially if issues existed that a manufacturer addressed in later driver versions. In a few situations concerning GPUs from 2012 where the 32-bit to 64-bit jump happens, especially in integrated NVidia cards in laptops and from some Mobile devices, a driver upgrade can allow support with LWJGL 3, not just version 2. On self-updating systems, not worrying about driver updates makes sense. However, some systems have updates that cease, but the firmware can still possibly be pushed a bit further by updates from the user or some other source. |
I'm saying that mentioning hardware doesn't matter because people have fixed this issue numerous times by changing to an OpenJDK distro that doesn't have this bug. If targeting older devices, you can distribute AdoptOpenJDK with your game, and use whatever LWJGL you currently use, and this particular error should not happen. |
That makes sense in a way. That part I agree with. |
This issue is caused by a combination of LWJGL 2 and some JDKs on Linux. Since the former is no longer recommended (-> LWJGL 3) and the latter is out of our hand, I'm closing this. |
Please ensure you have given all the following requested information in your report.
Issue details
I followed this initial step https://github.com/libgdx/libgdx/wiki/A-Simple-Game and reached the end of https://github.com/libgdx/libgdx/wiki/A-Simple-Game#project-setup
Program successfully compiled and ran on the Android.
I followed https://libgdx.badlogicgames.com/documentation/gettingstarted/Packaging.html to test whatever desktop version works.
Generated jar failed with
Reproduction steps/code
I just followed https://github.com/libgdx/libgdx/wiki/A-Simple-Game#project-setup
Repo with generated skeleton code is at https://github.com/matkoniecz/libgdx-failed-tutorial (I just used the project generator and made 0 changes to the generated code)
Version of LibGDX and/or relevant dependencies
https://github.com/libgdx/libgdx/wiki/Project-Setup-Gradle appears to generate projects with LibGDX 1.9.10 (
gdxVersion = '1.9.10'
)Please select the affected platforms
I was trying to run "desktop" variant on the Linux
Full log of generated jar
More platform info
Even more
I tried to script steps leading to a crash, but for some unclear reason
java -jar gdx-setup.jar --dir libgdxtest --name drop --package com.badlogic.drop --mainClass Drop --sdkLocation /home/mateusz/Android/Sdk
crashes(I previously used
java -jar gdx-setup.jar
in GUI mode)The text was updated successfully, but these errors were encountered: