Summary: | Keyboard layout set incorrectly. System settings crash when editing "Variant" | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Alex Leach <beamesleach> |
Component: | kcm_keyboard_layout | Assignee: | Andriy Rysin <arysin> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | beamesleach, kde2 |
Priority: | NOR | ||
Version: | 1.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-workspace/1b5f4652634710fce5fc6f4d59043f6e165bb023 | Version Fixed In: | 4.10.1 |
Attachments: | New crash information added by DrKonqi |
Description
Alex Leach
2012-11-19 14:28:19 UTC
Created attachment 76842 [details] New crash information added by DrKonqi systemsettings (1.0) on KDE Platform 4.9.5 using Qt 4.8.3 - What I was doing when the application crashed: Exactly the same as above. - Custom settings of the application: I have a custom keyboard layout set (https://github.com/dhardy/keyboard) via /etc/default/keyboard and setxkbmap. KDE config shows the name of the layout but not the variant (which is explicitly set). Additionally, every so often while using KDE, the keyboard layout gets changed without me asking (not sure if this is KDE or something else and not sure if the layout selected is a different variant or an older version of the same layout/variant, but neither checking at config files nor running setupcon is any help). This may or may not be related. -- Backtrace (Reduced): #6 QList (l=..., this=0x7fff927bd4a0) at /usr/include/qt4/QtCore/qlist.h:122 #7 QForeachContainer (t=..., this=0x7fff927bd4a0) at /usr/include/qt4/QtCore/qglobal.h:2367 #8 populateComboWithVariants (rules=<optimized out>, layout=..., combo=0x2c83d40) at ../../../kcontrol/keyboard/kcm_view_models.cpp:304 #9 VariantComboDelegate::createEditor (this=<optimized out>, parent=<optimized out>, index=...) at ../../../kcontrol/keyboard/kcm_view_models.cpp:323 #10 0x00007f4b3c477002 in QAbstractItemViewPrivate::editor (this=this@entry=0x2a53050, index=..., options=...) at itemviews/qabstractitemview.cpp:4020 Alex, I don't have /etc/default/keyboard file on my Fedora 18 so I can't really reproduce what you're trying to do but I here's what I see: * You're trying to mix two systems to configure layout: /etc/default/keyboard is probably handled by Ubuntu and is system-wide setting, KDE system settings will configure layout only for current user * I tried to do what you're doing in system settings and didn't see the crash - either I am not quite following your steps or your system has some problems * Try to turn "Configure layouts" off in KDE and let the system do it (via /etc/default/keyboard) - if it works, then it means configuring layouts is broken in your KDE build and you can just use system-wide settings; if it's still broken, then it's not related to KDE and something else is resetting your keyboard Diggory, in some places if the variant chosen is the default its name won't be shown, not sure if it applies to your situation. If you configured your layout via system settings, KDE will reapply the configuration if new keyboard is attached. If you see the not-requested switch happening again please attach your .xsession-errors and ~/.kde*/share/config/kxkbrc files. Also it looks like in both crashes the problem is missing description for selected layout so please attach /usr/share/X11/xkb/rules/evdev.xml and I'll try to take a look. Forgot I submitted this.. But I do remember noticing that when I had keyboard localisation issues, kded wasn't running. When I started kded from the command line, whilst already logged in to KDE, then everything started working correctly. I've just retraced the steps I posted above, and the Variant field is populated. There is no crash, and everything seems to be working fine. Suppose I could kill kded and try it again, but that sounds dangerous, especially whilst I've got all these windows open! I've just grepped 'description>\s*<' against evdev.xml, and there don't appear to be any empty descriptions fields. Maybe a missing one? The last mod time of the file was just two days ago, so any bugs in it would no doubt have since been fixed. Thanks, Alex, it's not empty <description> per se, it would be probably missing layout or missing variant in the xml. But if everything is working than I would rather spend some time on other issue :) Andriy, you're right that evdev.xml is missing a description for my layout. Disabling layout configuration in KDE system settings isn't the answer: it is disabled, so the unwanted switches are probably part of Debian console setup. I don't see anything in .xsession-errors related and the kxbrc file contains just: [Layout] DisplayNames= LayoutList= LayoutLoopCount=-1 Model=thinkpad60 ResetOldOptions=false ShowFlag=false ShowLabel=true ShowLayoutIndicator=false ShowSingle=false SwitchMode=Global Use=false Anyway, to avoid hijacking this bug, it was about a crash in system settings which still happens reproducibly for me. I'd guess removing a description for a layout in evdev.xml might be the cause, but I'll leave you to decide whether its worth tracking down (i.e. bad config shouldn't cause seg-faults in my opinion, at least in a perfect world). Well, the story gets more interesting after adding descriptions to evdev.xml. After logging out and in again, opening the settings and selecting configure, then trying to change the variant of one of the two layouts listed causes a crash. If instead of changing the layouts listed I remove those two and re-add my layout, it doesn't crash, but it still doesn't work properly (names of many of the variants are blank and if selected result in the default variant being used in kxkbrc). I can't work out why, other than noting that these variant names are the unique ones (not used in other layouts) and contain underscores (but I see names in other layouts using underscores). Diggory, could you please attach your evdev.xml and layou file? also kxkbrc after you configure layouts in kde? kxkbrc (after setting three layouts, for the last of which a variant other than default was selected): [Layout] DisplayNames=,cyb,cyb LayoutList=us(colemak),cyborg16(colemak),cyborg16 LayoutLoopCount=-1 Model=thinkpad60 ResetOldOptions=false ShowFlag=false ShowLabel=true ShowLayoutIndicator=true ShowSingle=false SwitchMode=Global Use=true The rest can be found at https://github.com/dhardy/keyboard (specifically the layout is in file cyborg16 and the contents of evdev-extension* files were merged with the xkb/rules/evdev.* files, as the last elements/lines of the respective sections of these files). Diggory, all your variant items in evdev.xml expect one (US colemak) miss <configItem>, that's why they are all empty. If their names are empty that can easily lead to crash. I guess parsing code could be a bit more robust (and it would be if rules xml used attributes instead of nested elements for everything) but currently this is file with wrong elements in it. Please add <configItem> to all variants like in other layouts and let me know if it looks better. Oh how embarrassing! Thank you, works perfectly now. Hmm, if anything I prefer embedded elements for their extensibility, but having to choose and compromise on brevity is the real XML nuisance. Anyway, no point worrying about it. Git commit 1b5f4652634710fce5fc6f4d59043f6e165bb023 by Andriy Rysin. Committed on 07/02/2013 at 03:54. Pushed by rysin into branch 'KDE/4.10'. Remove layouts and variants with empty content M +14 -0 kcontrol/keyboard/tests/xkb_rules_test.cpp M +12 -13 kcontrol/keyboard/xkb_rules.cpp http://commits.kde.org/kde-workspace/1b5f4652634710fce5fc6f4d59043f6e165bb023 I've pushed a fix to remove empty layouts/variants, hopefully this will prevent keyboard setting module from crashing. Andriy, did you reopen by accident? oops, yes it should be fixed |