utopia-rise / godot-kotlin-jvm

Godot Kotlin JVM Module
MIT License
576 stars 39 forks source link

Editor crashes opening godot-kotlin-3d-demo #527

Closed travisfw closed 9 months ago

travisfw commented 10 months ago

Opening the latest godot-kotlin editor build, if I click Import and choose the directory of the fresh clone of godot-kotlin-3d-demo, it pauses for a moment with the opening graphic showing the Godot logo, and crashes before showing me the interface. Trying on the command line looks like this, starting in the godot-kotlin-3d-demo directory:

3BFD:godot-kotlin-3d-demo/ which godot
~/Software/godot-kotlin/current/bin/godot
3BFE:godot-kotlin-3d-demo/ godot project.godot 
Godot Engine v4.1.2.stable.custom_build.399c9dc39 - https://godotengine.org
Vulkan API 1.3.246 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) Xe Graphics (TGL GT2)

WARNING: Godot-JVM: Godot-JVM: No embedded jvm found on path: /home/~/ware/godot-kotlin-3d-demo/jre-amd64/lib/server/libjvm.so!
     at: get_jvm_lib_path (modules/kotlin_jvm/src/jni/platforms/jvm_loader_desktop.cpp:58)
WARNING: Godot-JVM: Godot-JVM: You really should embedd a jre in your game with jlink! See the documentation if you don't know how to do that
     at: get_jvm_lib_path (modules/kotlin_jvm/src/jni/platforms/jvm_loader_desktop.cpp:60)
Godot-JVM: Starting JVM ...
Godot-JVM: Using jvm type: jvm
Godot-JVM: Loading bootstrap jar: /home/~/Software/godot-kotlin/0.7.2-4.1.2/godot-bootstrap.jar
Godot-JVM: Starting GC thread
Godot-JVM: WARNING: No main.jar detected. No classes will be loaded. Build the gradle project to load classes

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.2.stable.custom_build (399c9dc393f6f84c0b4e4d4117906c70c048ecf2)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /home/~/.sdkman/candidates/java/current/lib/server/libjvm.so(+0xe73e85) [0x7fd17ee73e85] (??:0)
[2] /home/~/.sdkman/candidates/java/current/lib/server/libjvm.so(JVM_handle_linux_signal+0x26a) [0x7fd17ee7452a] (??:0)
[3] /lib64/libc.so.6(+0x3dbb0) [0x7fd1aa24dbb0] (??:0)
[4] godot(+0x140c39e) [0x55854d3fd39e] (??:0)
[5] godot(+0x56f1995) [0x5585516e2995] (??:0)
[6] godot(+0x1572f66) [0x55854d563f66] (??:0)
[7] godot(+0x1573128) [0x55854d564128] (??:0)
[8] godot(+0x15742bd) [0x55854d5652bd] (??:0)
[9] godot(+0x571f735) [0x558551710735] (??:0)
[10] godot(+0x32e2d8e) [0x55854f2d3d8e] (??:0)
[11] godot(+0x571b9a0) [0x55855170c9a0] (??:0)
[12] godot(+0x400ac41) [0x55854fffbc41] (??:0)
[13] godot(+0x400d4ef) [0x55854fffe4ef] (??:0)
[14] godot(+0x2e86f6c) [0x55854ee77f6c] (??:0)
[15] godot(+0x2e87a75) [0x55854ee78a75] (??:0)
[16] godot(+0x2428fa0) [0x55854e419fa0] (??:0)
[17] godot(+0x21554ac) [0x55854e1464ac] (??:0)
[18] godot(+0xcf2330) [0x55854cce3330] (??:0)
[19] godot(+0xc62e1b) [0x55854cc53e1b] (??:0)
[20] /lib64/libc.so.6(+0x27b8a) [0x7fd1aa237b8a] (??:0)
[21] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7fd1aa237c4b] (??:0)
[22] godot(+0xc7168e) [0x55854cc6268e] (??:0)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

The "No embedded jvm" warning seems unrelated because on line [1] of the backtrace, it seems to have found the libjvm.so it was looking for (in ~/.sdkman).

piiertho commented 10 months ago

I think this is because project is not built. But I agree this is a bug this should not crash. Can you try to build it to be sure ?

travisfw commented 10 months ago

unfortunately it still crashes. happy to test anything.

3C1C:godot-kotlin-3d-demo/ gradle clean assemble
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

> Task :compileKotlin
w: file:///home/~/ware/godot-kotlin-3d-demo/demo/Box/Box.kt:37:47 The corresponding parameter in the supertype 'Damageable' is named 'velocity'. This may cause problems when calling this function with named arguments.
w: file:///home/~/ware/godot-kotlin-3d-demo/demo/Enemies/Beebot.kt:113:47 The corresponding parameter in the supertype 'Damageable' is named 'velocity'. This may cause problems when calling this function with named arguments.
w: file:///home/~/ware/godot-kotlin-3d-demo/demo/Enemies/Beetle.kt:121:47 The corresponding parameter in the supertype 'Damageable' is named 'velocity'. This may cause problems when calling this function with named arguments.
w: file:///home/~/ware/godot-kotlin-3d-demo/demo/Player/Player.kt:362:47 The corresponding parameter in the supertype 'Damageable' is named 'velocity'. This may cause problems when calling this function with named arguments.

BUILD SUCCESSFUL in 27s
8 actionable tasks: 8 executed
3C1D:godot-kotlin-3d-demo/ godot project.godot 
Godot Engine v4.1.2.stable.custom_build.399c9dc39 - https://godotengine.org
Vulkan API 1.3.246 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) Xe Graphics (TGL GT2)

Godot-JVM: Starting JVM ...
Godot-JVM: Using jvm type: jvm
Godot-JVM: Loading bootstrap jar: /home/~/Software/godot-kotlin/0.7.2-4.1.2/godot-bootstrap.jar
Godot-JVM: Starting GC thread
Godot-JVM: WARNING: No main.jar detected. No classes will be loaded. Build the gradle project to load classes

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.2.stable.custom_build (399c9dc393f6f84c0b4e4d4117906c70c048ecf2)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /home/~/ware/godot-kotlin-3d-demo/jre-amd64/lib/server/libjvm.so(+0xe73e85) [0x7f5d43673e85] (??:0)
[2] /home/~/ware/godot-kotlin-3d-demo/jre-amd64/lib/server/libjvm.so(JVM_handle_linux_signal+0x26a) [0x7f5d4367452a] (??:0)
[3] /lib64/libc.so.6(+0x3dbb0) [0x7f5d784d0bb0] (??:0)
[4] godot(+0x140c39e) [0x55ca1e6fe39e] (??:0)
[5] godot(+0x56f1995) [0x55ca229e3995] (??:0)
[6] godot(+0x1572f66) [0x55ca1e864f66] (??:0)
[7] godot(+0x1573128) [0x55ca1e865128] (??:0)
[8] godot(+0x15742bd) [0x55ca1e8662bd] (??:0)
[9] godot(+0x571f735) [0x55ca22a11735] (??:0)
[10] godot(+0x32e2d8e) [0x55ca205d4d8e] (??:0)
[11] godot(+0x571b9a0) [0x55ca22a0d9a0] (??:0)
[12] godot(+0x400ac41) [0x55ca212fcc41] (??:0)
[13] godot(+0x400d4ef) [0x55ca212ff4ef] (??:0)
[14] godot(+0x2e86f6c) [0x55ca20178f6c] (??:0)
[15] godot(+0x2e87a75) [0x55ca20179a75] (??:0)
[16] godot(+0x2428fa0) [0x55ca1f71afa0] (??:0)
[17] godot(+0x21554ac) [0x55ca1f4474ac] (??:0)
[18] godot(+0xcf2330) [0x55ca1dfe4330] (??:0)
[19] godot(+0xc62e1b) [0x55ca1df54e1b] (??:0)
[20] /lib64/libc.so.6(+0x27b8a) [0x7f5d784bab8a] (??:0)
[21] /lib64/libc.so.6(__libc_start_main+0x8b) [0x7f5d784bac4b] (??:0)
[22] godot(+0xc7168e) [0x55ca1df6368e] (??:0)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)
piiertho commented 10 months ago

Can you try gradle build ? We have a lot of additional job that, I think, don't run with assemble task.

travisfw commented 10 months ago

Okay, yes! Now it starts up. Thanks for the work-around. Sounds like you know the issue, too.

piiertho commented 10 months ago

We have bunch of problems during the module initialisation.
With time, we added features, android, graal native-image, iOS etc, which result in spaghetti cpp code with pre-processors checks.
We definitely have to rework it.