Bug 367080 - Keyboard KCM crashes when checking Advanced > Configure keyboard options (on Wayland)
Summary: Keyboard KCM crashes when checking Advanced > Configure keyboard options (on ...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Andriy Rysin
URL:
Keywords:
: 379325 381305 382211 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-08-17 08:57 UTC by Matthias Fauconneau
Modified: 2017-10-18 12:11 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Fauconneau 2016-08-17 08:57:43 UTC
XInternAtom is called without an X connection :
#0 XInternAtom
#1 X11Helper::getGroupNames(_XDisplay*, XkbConfig*, X11Helper::FetchType)
#2 KCMKeyboardWidget::populateWithCurrentXkbOptions
#3 KCMKeyboardWidget::configureXkbOptionsChanged

Reproducible: Always
Comment 1 Patrick Silva 2017-01-29 15:57:11 UTC
I can confirm this testing plasma-wayland-devedition-gitunstable-20170128-2117-amd64.iso
Comment 2 Christoph Feck 2017-05-16 00:59:16 UTC
*** Bug 379325 has been marked as a duplicate of this bug. ***
Comment 3 Håkon Alstadheim 2017-06-08 21:09:45 UTC
Have same problem, patch below works around it. Not claiming this is "The Right Way" 
--------------------
--- a/kcms/keyboard/x11_helper.cpp	2017-06-08 21:04:52.650000000 +0200
+++ b/kcms/keyboard/x11_helper.cpp	2017-06-08 21:02:23.880000000 +0200
@@ -239,6 +239,13 @@
 	char *prop_data = NULL;
 	Status ret;
 
+	if (!QX11Info::isPlatformX11())
+	{
+	    qCWarning(KCM_KEYBOARD) << "Desktop platform is not X11";
+	    return false;
+	}
+
+
 	Atom rules_atom = XInternAtom(display, _XKB_RF_NAMES_PROP_ATOM, False);
 
 	/* no such atom! */
Comment 4 Christoph Feck 2017-06-26 16:38:19 UTC
*** Bug 381305 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2017-07-14 21:01:38 UTC
*** Bug 382211 has been marked as a duplicate of this bug. ***
Comment 6 Patrick Silva 2017-10-15 03:57:27 UTC
No crash on Arch, plasma 5.11.
Maybe fixed?
Comment 7 Christoph Feck 2017-10-18 12:11:12 UTC
Fixed by Martin Flöser.

See https://commits.kde.org/plasma-desktop/5cd48d672782bc11b4f949a3646aa5bc4224ab85