Bug 269961 - [4.6.2 pre-release tarballs] kscreenlocker segfaults immediately after the first keypress/mouse movement, leaving the screen unlocked again
Summary: [4.6.2 pre-release tarballs] kscreenlocker segfaults immediately after the fi...
Status: RESOLVED FIXED
Alias: None
Product: kxkb
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Andriy Rysin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-02 20:25 UTC by Andreas K. Huettel
Modified: 2011-04-04 01:14 UTC (History)
1 user (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 Andreas K. Huettel 2011-04-02 20:25:26 UTC
Application: kscreenlocker (2.0)
KDE Platform Version: 4.6.2 (4.6.2) (Compiled from sources)
Qt Version: 4.7.1
Operating System: Linux 2.6.36-gentoo-r8 x86_64
Distribution (Platform): Gentoo Packages

-- Information about the crash:
- What I was doing when the application crashed:

* Lock screen (e.g. via menu)
* Screensaver appears
* Do anything (press key, move mouse)
* Screensaver disappears, DrKonqui pops up, screen is unlocked

The crash can be reproduced every time.

-- Backtrace:
Application: KDE-Bildschirmsperre (kscreenlocker), signal: Segmentation fault
[KCrash Handler]
#6  QString::operator== (this=0x18, other=...) at tools/qstring.cpp:2150
#7  0x00007ff910173489 in qStringComparisonHelper (layout=..., variant=..., rules=0x0) at /usr/include/qt4/QtCore/qstring.h:922
#8  operator== (layout=..., variant=..., rules=0x0) at /usr/include/qt4/QtCore/qstring.h:925
#9  getDisplayText (layout=..., variant=..., rules=0x0) at /var/tmp/portage/kde-base/systemsettings-4.6.2/work/systemsettings-4.6.2/kcontrol/keyboard/flags.cpp:119
#10 0x00007ff910173f5b in Flags::getLongText (layoutUnit=..., rules=0x0) at /var/tmp/portage/kde-base/systemsettings-4.6.2/work/systemsettings-4.6.2/kcontrol/keyboard/flags.cpp:127
#11 0x00007ff910170277 in LayoutWidget::layoutChanged (this=0x24f7950) at /var/tmp/portage/kde-base/systemsettings-4.6.2/work/systemsettings-4.6.2/kcontrol/keyboard/layout_widget.cpp:101
#12 0x00007ff910170524 in LayoutWidget::LayoutWidget (this=0x24f7950, parent=<value optimized out>) at /var/tmp/portage/kde-base/systemsettings-4.6.2/work/systemsettings-4.6.2/kcontrol/keyboard/layout_widget.cpp:61
#13 0x00007ff910170d75 in KPluginFactory::createInstance<LayoutWidget, QWidget> (parentWidget=<value optimized out>, parent=<value optimized out>, args=...) at /usr/include/kpluginfactory.h:473
#14 0x00007ff921e0db50 in KPluginFactory::create (this=0x256a790, iface=0x7ff920e687c0 "QWidget", parentWidget=<value optimized out>, parent=0x7fff6d9e9790, args=..., keyword=<value optimized out>) at /var/tmp/portage/kde-base/kdelibs-4.6.2/work/kdelibs-4.6.2/kdecore/util/kpluginfactory.cpp:203
#15 0x000000000041b1e2 in create<QWidget> (this=0x7fff6d9e9790, parent=<value optimized out>, plugin=<value optimized out>, text=...) at /usr/include/KDE/../kpluginfactory.h:503
#16 PasswordDlg::PasswordDlg (this=0x7fff6d9e9790, parent=<value optimized out>, plugin=<value optimized out>, text=...) at /var/tmp/portage/kde-base/krunner-4.6.2/work/krunner-4.6.2/krunner/lock/lockdlg.cc:122
#17 0x00000000004165b6 in LockProcess::checkPass (this=0x7fff6d9eaac0) at /var/tmp/portage/kde-base/krunner-4.6.2/work/krunner-4.6.2/krunner/lock/lockprocess.cc:1173
#18 0x0000000000417945 in LockProcess::x11Event (this=0x7fff6d9eaac0, event=0x7fff6d9ea710) at /var/tmp/portage/kde-base/krunner-4.6.2/work/krunner-4.6.2/krunner/lock/lockprocess.cc:1383
#19 0x00007ff922f76b6e in publicx11Event (this=<value optimized out>, _event=0x7fff6d9ea710) at /var/tmp/portage/kde-base/kdelibs-4.6.2/work/kdelibs-4.6.2/kdeui/kernel/kapplication.cpp:918
#20 KApplication::x11EventFilter (this=<value optimized out>, _event=0x7fff6d9ea710) at /var/tmp/portage/kde-base/kdelibs-4.6.2/work/kdelibs-4.6.2/kdeui/kernel/kapplication.cpp:969
#21 0x00007ff92082698e in qt_x11EventFilter (ev=0x7fff6d9ea710) at kernel/qapplication_x11.cpp:436
#22 0x00007ff920836c71 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fff6d9ea710) at kernel/qapplication_x11.cpp:3276
#23 0x00007ff920861df2 in x11EventSourceDispatch (s=0x2389130, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146
#24 0x00007ff91aebeb61 in g_main_dispatch (context=0x2388e40) at gmain.c:2149
#25 g_main_context_dispatch (context=0x2388e40) at gmain.c:2702
#26 0x00007ff91aec2a98 in g_main_context_iterate (context=0x2388e40, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2780
#27 0x00007ff91aec2c4c in g_main_context_iteration (context=0x2388e40, may_block=1) at gmain.c:2843
#28 0x00007ff92164a4c3 in QEventDispatcherGlib::processEvents (this=0x23845d0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#29 0x00007ff92086176e in QGuiEventDispatcherGlib::processEvents (this=0x18, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#30 0x00007ff92161d232 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#31 0x00007ff92161d614 in QEventLoop::exec (this=0x7fff6d9eaa30, flags=) at kernel/qeventloop.cpp:201
#32 0x00007ff92162168b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#33 0x00000000004259ca in main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/kde-base/krunner-4.6.2/work/krunner-4.6.2/krunner/lock/main.cc:198

Possible duplicates by query: bug 223393.

Reported using DrKonqi
Comment 1 Andreas K. Huettel 2011-04-02 22:17:45 UTC
Just as update, this problem occurs *ONLY* if the little flag for switching keyboard layouts is activated. 

No keyboard layout switcher in kicker -> no segfaults of screenlocker.
Comment 2 Andriy Rysin 2011-04-03 04:24:35 UTC
Git commit 937c7245f0f4058d2b335d160617c1cdb2398cb7 by Andriy Rysin.
Committed on 03/04/2011 at 04:27.
Pushed by rysin into branch 'KDE/4.6'.

Fix null pointer crash when no rules found; add unit test
BUG: 269961

M  +1    -1    kcontrol/keyboard/flags.cpp     
M  +3    -0    kcontrol/keyboard/tests/flags_test.cpp     

http://commits.kde.org/kde-workspace/937c7245f0f4058d2b335d160617c1cdb2398cb7
Comment 3 Andriy Rysin 2011-04-03 04:27:07 UTC
I've pushed the fix but it looks like you don't have the rules file in /usr/share/X11/xkb/rules (there must be a warning in your .xsession-errors file), would you know why?
Comment 4 Andriy Rysin 2011-04-03 04:33:48 UTC
Git commit 754b4aee80ef521433c8179bca122c22135f5118 by Andriy Rysin.
Committed on 03/04/2011 at 04:27.
Pushed by rysin into branch 'master'.

Fix null pointer crash when no rules found; add unit test
BUG: 269961

M  +1    -1    kcontrol/keyboard/flags.cpp     
M  +3    -0    kcontrol/keyboard/tests/flags_test.cpp     

http://commits.kde.org/kde-workspace/754b4aee80ef521433c8179bca122c22135f5118
Comment 5 Andreas K. Huettel 2011-04-03 09:57:22 UTC
Not true, and I also cannot find any warning (what should I grep for in the 67Mbytes since yesterday :O ?)

huettel@pinacolada ~ $ ls -l /usr/share/X11/xkb/rules
insgesamt 532
-rw-r--r-- 1 root root     91 12. Feb 16:44 README
-rw-r--r-- 1 root root  44595 12. Feb 16:44 base
-rw-r--r-- 1 root root   3010 12. Feb 16:44 base.extras.xml
-rw-r--r-- 1 root root  36535 12. Feb 16:44 base.lst
-rw-r--r-- 1 root root 172084 12. Feb 16:44 base.xml
-rw-r--r-- 1 root root  42139 12. Feb 16:44 evdev
-rw-r--r-- 1 root root   3010 12. Feb 16:44 evdev.extras.xml
-rw-r--r-- 1 root root  36535 12. Feb 16:44 evdev.lst
-rw-r--r-- 1 root root 172084 12. Feb 16:44 evdev.xml
-rw-r--r-- 1 root root    832 12. Feb 16:44 xfree98
-rw-r--r-- 1 root root   1184 12. Feb 16:44 xkb.dtd
lrwxrwxrwx 1 root root      4 12. Feb 16:44 xorg -> base
lrwxrwxrwx 1 root root      8 12. Feb 16:44 xorg.lst -> base.lst
lrwxrwxrwx 1 root root      8 12. Feb 16:44 xorg.xml -> base.xml
huettel@pinacolada ~ $
Comment 6 Andreas K. Huettel 2011-04-03 10:12:03 UTC
Anyway, the issue seems to be fixed, kscreenlocker is working now.
Comment 7 Andriy Rysin 2011-04-03 16:20:12 UTC
Hmm in the trace it says rules=0 so the rules must be missing, is you keyboard layout settings disabled?
I would grep session-errors for "rules"
Comment 8 Andreas K. Huettel 2011-04-03 17:17:39 UTC
huettel@pinacolada ~ $ grep rules .xsession-errors
huettel@pinacolada ~ $ 

In normal operation (i.e. outside kscreenlocker), the "layout switcher" (little flag) is enabled and works as expected, i.e. I can switch between German and US-English keyboard.
Comment 9 Andriy Rysin 2011-04-04 01:03:25 UTC
ah right, embedded kxkb widget does not use rules they are always 0, I guess the problem was worse than I thought, I am glad I could address it quickly, thanks for the report!
Comment 10 Andreas K. Huettel 2011-04-04 01:14:36 UTC
Thank you for fixing it so quickly!
I'll try to persuade the packagers to add it to 4.6.2.