Bug 498213

Summary: Crash when starting with xkbmap de(sundeadkeys) set
Product: [Applications] digikam Reporter: Markus S. <markus.schwarzenberg>
Component: Portability-RuntimeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: crash CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.5.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 8.7.0
Sentry Crash Report:
Attachments: debug log

Description Markus S. 2025-01-03 17:44:01 UTC
Digikam 8.5.0 doesn't start with keyboard set to de sundeadkeys

STEPS TO REPRODUCE (in a terminal)

1.) setxkbmap de  -variant sundeadkeys
2.) digkam

OBSERVED RESULT
1.) splash screen shows and disappears after ca 1 second
2.) on stdout/stderr, there is:

xkbcommon: ERROR: [XKB-661] Couldn't process include statement for 'de(sundeadkeys)'
xkbcommon: ERROR: [XKB-769] Abandoning symbols file "(unnamed)"
xkbcommon: ERROR: Failed to compile xkb_symbols
xkbcommon: ERROR: Failed to compile keymap
[49151:49257:0103/182645.935264:FATAL:xkb_keyboard_layout_engine.cc(654)] Keymap file failed to load: de-sundeadkeys
Trace/Breakpoint ausgelöst (Speicherabzug geschrieben)

EXPECTED RESULT
digikam starting normally


SOFTWARE/OS VERSIONS
digiKam: 8.5.0
KDE Frameworks: 6.9.0
Qt: Using 6.8.1 and built against 6.8.1
openSUSE Tumbleweed (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.12.6-1-default
Keyboard: Sun 6 USB Keyboard german layout

ADDITIONAL INFORMATION
1) The problem doesn't exist in showfoto, which is uses the same libxkbcommon library.
2) xkb_keyboard_layout_engine.cc(654) seems to be in code from https://chromium.googlesource.com/chromium/src/  
     ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc 
  => is there any plugin using a chromium library?
 chromium itself runs w/o problem
3) Digikam runs normally when "setxkbmap de" is run in advance (without sundeadkeys)
4) I've found no other program having this  problem, so far.
Comment 1 caulier.gilles 2025-01-03 17:54:21 UTC
Did you run the AppImage bundle ?
Comment 2 Maik Qualmann 2025-01-03 18:25:11 UTC
I also have openSUSE Tumbleweed, but I get the following error, what am I missing?

maik@linux:~> setxkbmap de  -variant sundeadkeys
Error loading new keyboard description

Maik
Comment 3 Maik Qualmann 2025-01-03 18:31:35 UTC
If I need a corresponding keyboard, it will be difficult to fix/reproduce this.
Please create a GDB backtrace as described here:

https://www.digikam.org/contribute/#linux-host-1

Maik
Comment 4 Markus S. 2025-01-05 20:24:18 UTC
Created attachment 177132 [details]
debug log

The error appears at line 83 of the debug log.

After that, there is the output of 
  backtrace 
  thread apply all where

Then I continued (line 642) and SIGILL is issued
The output of "backtrace", and "thread apply all where"  follows after that.

After the next continue the program finally terminates.
Comment 5 caulier.gilles 2025-03-15 15:32:31 UTC
Hi,

digiKam 8.6.0 is just released:

https://www.digikam.org/news/2025-03-15-8.6.0_release_announcement/

Problem still exists with this version?

Thanks in advance

Gilles Caulier
Comment 6 Markus S. 2025-03-15 23:20:00 UTC
After more research it turned out that in the  XKB  definition file /usr/share/X11/xkb/symbols/de
the section for sundeadkeys was missing. After adding there

 partial alphanumeric_keys
        xkb_symbols "sundeadkeys" {
         include "de(nodeadkeys)"
         name[Group1] = "German (Sun dead keys)";
};

digikam (and one more qt6-app having the same problem) starts correctly again.

Markus
Comment 7 caulier.gilles 2025-03-16 02:58:41 UTC
Hi,

This dysfunction is not relevant of digiKam at all. Crash appears in Chromium component of Qt6. The work around with the XKB definition file is system dependent. In others words, report this very specific problem to the OpenSuse team as UPSTREAM.

Best

Gilles Caulier
Comment 8 Markus S. 2025-03-16 09:41:07 UTC
Understood. (But I didn't know this when I opened the bug). 

Thanks for your support.
Markus