weisJ / auto-dark-mode

IDEA plugin to automatically apply system theme settings on macOS and Windows.
https://plugins.jetbrains.com/plugin/14076-auto-dark-mode
MIT License
53 stars 14 forks source link

SIGSEGV in Android Studio with GTK/Gnome #31

Closed olifink closed 3 years ago

olifink commented 3 years ago

java_error_in_STUDIO_4237.log java_error_in_STUDIO_4237.zip

Current version of the plugin 1.5.3 2020.1 for Android Studio 4.1.2 (official Google tgz, no flatpak) crashes at startup with SIGSEV on Linux (current Fedora 33, Gnome 3.38.4, Wayland)

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb1cd24b8ac, pid=4237, tid=0x00007fb1cff4b640
#
# JRE version: OpenJDK Runtime Environment (8.0_242) (build 1.8.0_242-release-1644-b3-6222593)
# Java VM: OpenJDK 64-Bit Server VM (25.242-b3-6222593 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libgiomm-2.4.so.1+0x1458ac]  Gio::Settings::get_string(Glib::ustring const&) const+0x1c

---------------  T H R E A D  ---------------

Current thread (0x00007fb1b816e000):  JavaThread "ApplicationImpl pooled thread 9" [_thread_in_native, id=4281, stack(0x00007fb1cfe4b000,0x00007fb1cff4c000)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000

Stack: [0x00007fb1cfe4b000,0x00007fb1cff4c000],  sp=0x00007fb1cff495a0,  free space=1017k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libgiomm-2.4.so.1+0x1458ac]  Gio::Settings::get_string(Glib::ustring const&) const+0x1c

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  com.github.weisj.darkmode.platform.linux.gnome.GnomeNative.getCurrentTheme()Ljava/lang/String;+0
j  com.github.weisj.darkmode.platform.linux.gnome.GnomeThemeMonitorService.isDarkThemeEnabled()Z+0
j  com.github.weisj.darkmode.platform.linux.LinuxThemeMonitorService.isDarkThemeEnabled()Z+4
j  com.github.weisj.darkmode.platform.ThemeMonitorImpl.getState(Lcom/github/weisj/darkmode/platform/ThemeMonitorService;)Lcom/github/weisj/darkmode/platform/ThemeMonitorImpl$MonitorState;+5
j  com.github.weisj.darkmode.platform.ThemeMonitorImpl.start()V+6
j  com.github.weisj.darkmode.platform.ThemeMonitorImpl.setRunning(Z)V+19
j  com.github.weisj.darkmode.AutoDarkMode$start$1.invoke(Lcom/github/weisj/darkmode/platform/ThemeMonitor;)V+8
j  com.github.weisj.darkmode.AutoDarkMode$start$1.invoke(Ljava/lang/Object;)Ljava/lang/Object;+5
j  com.github.weisj.darkmode.platform.settings.UtilKt.letValue(Lkotlin/Lazy;Lkotlin/jvm/functions/Function1;)V+19
j  com.github.weisj.darkmode.AutoDarkMode.start()V+10
j  com.github.weisj.darkmode.AutoDarkModeStartupListener.appFrameCreated(Ljava/util/List;)V+14
v  ~StubRoutines::call_stub
[java_error_in_STUDIO_4237.log](https://github.com/weisJ/auto-dark-mode/files/6211131/java_error_in_STUDIO_4237.log)

(full file attached - can provide more info if needed)

weisJ commented 3 years ago

What does running gsettings get org.gnome.desktop.interface gtk-theme Return for you?

olifink commented 3 years ago

Correctly 'Adwaita'

[olifink@mi-fedora ~]$ gsettings get org.gnome.desktop.interface gtk-theme
'Adwaita'
txomon commented 3 years ago

Same problem here, the plugin is actually crashing Pycharm and Goland in the same way

weisJ commented 3 years ago

Closing in favour of #32 both seem to be the same issue