Bug 434955

Summary: exception "assertion 'GDK_IS_DISPLAY (display)' failed is" thrown with "SystemTray" Kotlin/Java library
Product: [Plasma] Breeze Reporter: solonovamax
Component: gtk themeAssignee: Janet Blackquill <uhhadd>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: nate, plasma-bugs
Priority: NOR    
Version: 5.21.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description solonovamax 2021-03-26 01:29:20 UTC
SUMMARY
"assertion 'GDK_IS_DISPLAY (display)' failed" is thrown many times while using the Kotlin/Java library "SystemTray"

Relevant issues:
- Suwayomi/Tachidesk issue: https://github.com/Suwayomi/Tachidesk/issues/38
- dorkbox/SystemTray issue: https://github.com/dorkbox/SystemTray/issues/142

We're currently unsure if the issue is being caused by SystemTray misusing the API, or by Breeze-GTK doing something weird.

This only seems to occur with the Breeze GTK theme and no other themes. (Except the "Default" theme in the KDE GTK settings menu??)


STEPS TO REPRODUCE
1. Enable Breeze theme
2. Run an application that contains the Kotlin/Java library "SystemTray" (eg. the application "Tachidesk")
3. The following is logged about 10 times before the program hangs, and does not do anything afterwards:

(java:343959): Gdk-CRITICAL **: 12:13:43.182: gdk_x11_get_xatom_by_name_for_display: assertion 'GDK_IS_DISPLAY (display)' failed


OBSERVED RESULT
Application logs many errors & ceases to respond.

EXPECTED RESULT
The application doesn't error.

SOFTWARE/OS VERSIONS
Operating System Version: Arch Linux x86_64 5.10.11-arch1-1
Display Server: X11
DE Version: Plasmashell 5.21.3
Qt Version: 5.15.2
KDE Frameworks Version: 5.80.0
GPU Version: Nvidia RTX 2070
GPU Driver Version: 460.67-3
Breeze Version: 5.21.3-1, packages `breeze` and `breeze-gtk` from the AUR
Comment 1 Nate Graham 2021-03-31 01:55:28 UTC
Breeze-gtk is just a regular old CSS-based GTK theme; there's no way it could cause these issues. I would recommend focusing on the code of the app itself.