Bug 259790 - 'kcmshell4 language' crashes when 'American English' is not the (most) preferred language.
Summary: 'kcmshell4 language' crashes when 'American English' is not the (most) prefer...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_language (show other bugs)
Version: 1.0
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: John Layt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 00:34 UTC by Stefan Böhmann
Modified: 2011-02-15 10:23 UTC (History)
2 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 Stefan Böhmann 2010-12-14 00:34:18 UTC
Application: systemsettings (1.0)
KDE Platform Version: 4.5.86 (4.6 >= 20101210) (Compiled from sources)
Qt Version: 4.7.1
Operating System: Linux 2.6.36-gentoo-r3 x86_64

-- Information about the crash:
'Available Languages' are 'American English', 'German' and 'KDE Test Language'. The list of 'Preferred Languages' are empty.
Now if I try to move 'German' or 'KDE Test Language' to the list of 'Preferred Languages' System Settings crashes.

If I move 'American English' first, I can move 'German' and/or 'KDE Test Language' too. However, if I try to reorder so that 'American English' is not the most preferred language or if I remove 'American English' System Settings crashes again.

The crash can be reproduced every time.

-- Backtrace:
Application: System Settings (systemsettings), signal: Segmentation fault
[KCrash Handler]
#6  ref (this=<value optimized out>, dayPeriod=<value optimized out>) at /usr/include/qt4/QtCore/qatomic_x86_64.h:121
#7  QString (this=<value optimized out>, dayPeriod=<value optimized out>) at /usr/include/qt4/QtCore/qstring.h:729
#8  KCMLocale::dayPeriodText (this=<value optimized out>, dayPeriod=<value optimized out>) at /kdebuild/src/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.cpp:2404
#9  0x00007f135b7b1065 in KCMLocale::initAmPmSymbols (this=0x2371430) at /kdebuild/src/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.cpp:2465
#10 0x00007f135b7c06d1 in KCMLocale::initSettingsWidgets (this=0x2371430) at /kdebuild/src/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.cpp:639
#11 0x00007f135b7c09aa in KCMLocale::setTranslations (this=0x2371430, newValue=<value optimized out>) at /kdebuild/src/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.cpp:1190
#12 0x00007f135b7c0ae0 in KCMLocale::changedTranslations (this=0x2371430) at /kdebuild/src/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.cpp:1178
#13 0x00007f135b7c0bb5 in KCMLocale::changedTranslationsAvailable (this=0x2371430, item=<value optimized out>) at /kdebuild/src/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.cpp:1158
#14 0x00007f135b7c0d6d in KCMLocale::qt_metacall (this=0x2371430, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff224adbc0) at /kdebuild/build/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.moc:213
#15 0x00007f136c27de87 in QMetaObject::activate (sender=0x2383e80, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fff224adbc0) at kernel/qobject.cpp:3272
#16 0x00007f136de96102 in KActionSelector::removed (this=<value optimized out>, _t1=0x24c6d40) at /kdebuild/build/KDE/kdelibs/kdeui/kactionselector.moc:189
#17 0x00007f136de96d45 in KActionSelectorPrivate::buttonRemoveClicked (this=0x23841f0) at /kdebuild/src/KDE/kdelibs/kdeui/widgets/kactionselector.cpp:463
#18 0x00007f136de97089 in KActionSelector::qt_metacall (this=0x2383e80, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fff224add60) at /kdebuild/build/KDE/kdelibs/kdeui/kactionselector.moc:127
#19 0x00007f136c27de87 in QMetaObject::activate (sender=0x238b650, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x7fff224add60) at kernel/qobject.cpp:3272
#20 0x00007f136d4f8ee2 in QAbstractButton::clicked (this=<value optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206
#21 0x00007f136d2488ab in QAbstractButtonPrivate::emitClicked (this=<value optimized out>) at widgets/qabstractbutton.cpp:546
#22 0x00007f136d249e4b in QAbstractButtonPrivate::click (this=0x238b690) at widgets/qabstractbutton.cpp:539
#23 0x00007f136d24a0ac in QAbstractButton::mouseReleaseEvent (this=0x238b650, e=0x7fff224ae870) at widgets/qabstractbutton.cpp:1121
#24 0x00007f136d30461a in QToolButton::mouseReleaseEvent (this=<value optimized out>, e=<value optimized out>) at widgets/qtoolbutton.cpp:721
#25 0x00007f136cf07d17 in QWidget::event (this=0x238b650, event=0x7fff224ae870) at kernel/qwidget.cpp:8200
#26 0x00007f136ceb7504 in QApplicationPrivate::notify_helper (this=0x1f85e00, receiver=0x238b650, e=0x7fff224ae870) at kernel/qapplication.cpp:4445
#27 0x00007f136cebc7c2 in QApplication::notify (this=<value optimized out>, receiver=0x238b650, e=0x7fff224ae870) at kernel/qapplication.cpp:4006
#28 0x00007f136de07b46 in KApplication::notify (this=0x7fff224af3d0, receiver=0x238b650, event=0x7fff224ae870) at /kdebuild/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#29 0x00007f136c269ad3 in QCoreApplication::notifyInternal (this=0x7fff224af3d0, receiver=0x238b650, event=0x7fff224ae870) at kernel/qcoreapplication.cpp:732
#30 0x00007f136ceb84c6 in sendEvent (receiver=0x238b650, event=0x7fff224ae870, alienWidget=0x238b650, nativeWidget=0x1f6ed30, buttonDown=0x7f136d95b0f8, lastMouseReceiver=..., spontaneous=true) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#31 QApplicationPrivate::sendMouseEvent (receiver=0x238b650, event=0x7fff224ae870, alienWidget=0x238b650, nativeWidget=0x1f6ed30, buttonDown=0x7f136d95b0f8, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3105
#32 0x00007f136cf3518f in QETWidget::translateMouseEvent (this=0x1f6ed30, event=<value optimized out>) at kernel/qapplication_x11.cpp:4438
#33 0x00007f136cf33859 in QApplication::x11ProcessEvent (this=0x7fff224af3d0, event=0x7fff224af020) at kernel/qapplication_x11.cpp:3564
#34 0x00007f136cf5a53a in x11EventSourceDispatch (s=0x1f7c5a0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#35 0x00007f1367a59bd2 in g_main_dispatch (context=0x1f7b1f0) at gmain.c:2149
#36 g_main_context_dispatch (context=0x1f7b1f0) at gmain.c:2702
#37 0x00007f1367a5a380 in g_main_context_iterate (context=0x1f7b1f0, block=1, dispatch=1, self=<value optimized out>) at gmain.c:2780
#38 0x00007f1367a5a61d in g_main_context_iteration (context=0x1f7b1f0, may_block=1) at gmain.c:2843
#39 0x00007f136c2940cf in QEventDispatcherGlib::processEvents (this=0x1f50ec0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:415
#40 0x00007f136cf5a1ee in QGuiEventDispatcherGlib::processEvents (this=<value optimized out>, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#41 0x00007f136c268ee2 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#42 0x00007f136c269124 in QEventLoop::exec (this=0x7fff224af320, flags=...) at kernel/qeventloop.cpp:201
#43 0x00007f136c26d4c3 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1009
#44 0x00000000004121e9 in main (argc=5, argv=0x7fff224af698) at /kdebuild/src/KDE/kdebase/workspace/systemsettings/app/main.cpp:49

Reported using DrKonqi
Comment 1 John Layt 2010-12-14 02:23:09 UTC
SVN commit 1206247 by jlayt:

KCM Locale fix crash when using language other than en_US.

When you pass a KConfig to KLocale it calls setLocale() on the KConfig using
the KLocales current langauge.  If this language is different to the KConfig's
language then a reparseConfiguration() is called to change any localized
settings.  However, if your KCOnfig is enitrely in memory then you have no file
to reparse and you end up with null settings leading to crashes.

Fix makes sure that the KConfig and KLocale always have the same langauge set
before passing in the KConfig, thus making sure there's no force reparse and
the settings remain intact.

BUG: 259790



 M  +48 -12    kcmlocale.cpp  
 M  +3 -4      kcmlocale.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1206247