libgdx/gdx-liftoff

File picker fails with a native error on Linux

czyzby opened this issue · 5 comments

czyzby commented
(process:108348): Gtk-CRITICAL **: 21:43:07.611: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(process:108348): Gtk-CRITICAL **: 21:43:07.611: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(process:108348): Gtk-CRITICAL **: 21:43:07.611: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f6a18523104, pid=108348, tid=108349
#
# JRE version: OpenJDK Runtime Environment Corretto-16.0.2.7.1 (16.0.2+7) (build 16.0.2+7)
# Java VM: OpenJDK 64-Bit Server VM Corretto-16.0.2.7.1 (16.0.2+7, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libgtk-3.so.0+0x2e1104]
#
# Core dump will be written. Default location: Core dumps may be processed with "/lib/systemd/systemd-coredump %P %u %g %s %t 9223372036854775808 %h" (or dumping to /mnt/shared/Workspace/gdx-liftoff/core.108348)
#
# An error report file with more information is saved as:
# /mnt/shared/Workspace/gdx-liftoff/hs_err_pid108348.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/corretto/corretto-jdk/issues/
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.lwjgl.util.nfd.NativeFileDialog.nNFD_PickFolder(JJ)I+0
j  org.lwjgl.util.nfd.NativeFileDialog.NFD_PickFolder(Lorg/lwjgl/PointerBuffer;Ljava/lang/CharSequence;)I+47
j  gdx.liftoff.views.MainView.pickDirectory(Lcom/badlogic/gdx/files/FileHandle;Lcom/kotcrab/vis/ui/widget/file/FileChooserAdapter;)V+79
j  gdx.liftoff.views.MainView.chooseDirectory()V+16
v  ~StubRoutines::call_stub
j  jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 java.base@16.0.2
j  jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+146 java.base@16.0.2
j  jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 java.base@16.0.2
j  java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+59 java.base@16.0.2
j  com.badlogic.gdx.utils.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6
j  com.github.czyzby.kiwi.util.gdx.reflection.Reflection.invokeMethod(Lcom/badlogic/gdx/utils/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+8
j  com.github.czyzby.lml.parser.impl.action.MethodActorConsumer.consume(Ljava/lang/Object;)Ljava/lang/Object;+26
j  com.github.czyzby.lml.parser.impl.attribute.OnChangeLmlAttribute$1.changed(Lcom/badlogic/gdx/scenes/scene2d/utils/ChangeListener$ChangeEvent;Lcom/badlogic/gdx/scenes/scene2d/Actor;)V+8
J 3048 c1 com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.handle(Lcom/badlogic/gdx/scenes/scene2d/Event;)Z (23 bytes) @ 0x00007fb3010d225c [0x00007fb3010d1e60+0x00000000000003fc]
J 2900 c1 com.badlogic.gdx.scenes.scene2d.Actor.notify(Lcom/badlogic/gdx/scenes/scene2d/Event;Z)Z (183 bytes) @ 0x00007fb30108c984 [0x00007fb30108c1a0+0x00000000000007e4]
j  com.badlogic.gdx.scenes.scene2d.Actor.fire(Lcom/badlogic/gdx/scenes/scene2d/Event;)Z+152
j  com.badlogic.gdx.scenes.scene2d.ui.Button.setChecked(ZZ)V+49
j  com.badlogic.gdx.scenes.scene2d.ui.Button$1.clicked(Lcom/badlogic/gdx/scenes/scene2d/InputEvent;FF)V+31
j  com.badlogic.gdx.scenes.scene2d.utils.ClickListener.touchUp(Lcom/badlogic/gdx/scenes/scene2d/InputEvent;FFII)V+108
J 2994 c1 com.badlogic.gdx.scenes.scene2d.InputListener.handle(Lcom/badlogic/gdx/scenes/scene2d/Event;)Z (361 bytes) @ 0x00007fb3010b6b7c [0x00007fb3010b5540+0x000000000000163c]
j  com.badlogic.gdx.scenes.scene2d.Stage.touchUp(IIII)Z+213
J 3083 c1 com.badlogic.gdx.InputEventQueue.drain(Lcom/badlogic/gdx/InputProcessor;)V (379 bytes) @ 0x00007fb3010daeb4 [0x00007fb3010da580+0x0000000000000934]
J 3089 c1 com.badlogic.gdx.backends.lwjgl3.DefaultLwjgl3Input.update()V (12 bytes) @ 0x00007fb3010dd454 [0x00007fb3010dd3c0+0x0000000000000094]
j  com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update()Z+126
j  com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop()V+111
j  com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lcom/badlogic/gdx/ApplicationListener;Lcom/badlogic/gdx/backends/lwjgl3/Lwjgl3ApplicationConfiguration;)V+269
j  gdx.liftoff.MainKt.main()V+296
j  gdx.liftoff.MainKt.main([Ljava/lang/String;)V+0
v  ~StubRoutines::call_stub

Linux Mint, JRE details in the error message. Since it's a native error, the whole JVM crashes.

Eesh... This looks like some issue in LWJGL3's NativeFileDialog, or maybe somewhere in GTK (since asserting GTK_IS_STYLE_PROVIDER_PRIVATE is failing). NFD was far and away the best file dialog we tried on Windows; the Swing and VisUI ones didn't work like the OS dialog. I'd rather not change away from it if possible, at least for Windows.

czyzby commented

To be fair, it worked on my previous laptop with Pop OS, so I might be missing some libraries here (or using a wrong JVM?).

Corretto has been a problem for LWJGL2 before, but never a problem for 3... Could this be related to the change in glibc or some other core native library on Linux? I think libGDX went to a newer version (still as old as it could be), which broke compatibility with some older, mostly Ubuntu-based Linux distros. I think if your OS is older than 2018 or so, it might just not be compatible with libGDX 1.12.0 and LWJGL3... but I think you must have used libGDX 1.12.0 in other places, just not NFD... This is a tricky one.

This should be fixed in Release 1.12.0.3. I've had at least one report of NFD going from non-functional to working fine so far.