Closed Sphaerus closed 4 years ago
I get the same error, but a few things are different. I'm using Gradle 5.2.1 and using the template project as is. I've tried this with both openjdk 1.8.0_212 and 11.0.3.
After a bunch of looking around this seems to be an issue with Ubuntu (might occur on some Redhat distros, but those reports are old). In particular, the builds of glibc that are currently shipping + perhaps some misreported information (AVX extension related) is causing the JVM to encounter a fatal error:
# Problematic frame:
# C [ld-linux-x86-64.so.2+0xa72f]
Others are having similar issues elsewhere, the error messages change across Java 8 and Java 11 for me, but supposedly Java 8 fixes it for others. Example of it happening for other Java apps: https://bugs.launchpad.net/ubuntu/+source/sweethome3d/+bug/1797920
I worked with a friend with experience in the area and after using strace on the java call that gradle executes on MainKt
that ultimately results in the error, it seems that the native jogamp dependencies don't work on Ubuntu.
Ubuntu ships with pre-built versions via apt, they're also version 2.3.2, so the trick now is to figure out how to include those are a dependency in my local project and I think my approach will be as follows: https://discuss.gradle.org/t/is-it-possible-in-a-root-project-to-override-replace-a-sub-project-dependency/3521/2
This will mean that if there is a system update or if korge updates then Ubuntu I'm going to be in trouble. Not quite sure what to do about this, but it's a bit of a bummer.
Korge >= 1.4.2 supports an experimental JNA backend that doesn't use jogl, but relies on X11 directly. https://github.com/korlibs/korgw/blob/51bc6d4fcd03ed2730db728d11245a984366128d/korgw/src/jvmMain/kotlin/com/soywiz/korgw/x11/X11GameWindow.kt
This should be fixed.
You can enable it in three ways:
"jna"
: https://github.com/korlibs/korgw/blob/master/korgw/src/commonMain/kotlin/com/soywiz/korgw/jvmEngine.kt#L3KORGW_JVM_ENGINE=jna
https://github.com/korlibs/korgw/blob/51bc6d4fcd03ed2730db728d11245a984366128d/korgw/src/jvmMain/kotlin/com/soywiz/korgw/DefaultGameWindowJvm.kt#L19korgw.jvm.engine=jna
https://github.com/korlibs/korgw/blob/51bc6d4fcd03ed2730db728d11245a984366128d/korgw/src/jvmMain/kotlin/com/soywiz/korgw/DefaultGameWindowJvm.kt#L20I'm closing the issue, if you try and work/doesn't work, please let me know. It worked for me on Ubuntu and Ubuntu on WSL, but maybe fails in some configurations?
Korge 1.4.3c includes jna by default without having to do anything. Tested on an old machine with lubuntu and works fine now.
running either hello world or one of the samples from https://github.com/korlibs/korge-samples i keep getting errors referencing gradle version
i tried opening /home/kuba/Desktop/kotlin/korge-samples/sample-box2d/hs_err_pid26373.log but i dont have any java experience and its all basically chinese to me, how do i debug it?
EDIT gradle -v gives me
so i dont even know where this 6.0 message is coming from