Bug 162452 - The system settings window decorations modules crashes when applying the plastik windec
Summary: The system settings window decorations modules crashes when applying the plas...
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 163292 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-22 07:30 UTC by Médéric Boquien
Modified: 2012-04-13 19:24 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 Médéric Boquien 2008-05-22 07:30:53 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.1 
OS:                Linux

With KDE SVN trunk r810966 in the System settings application crashes systematically when applying the plastik windec. To reproduce:

1) select the "Appearance" module in the "Look & feel" category
2) select "Windows"
3) in the first tab select "plastik" in the drop menu
4) click on "Apply"
5) crash

The backtrace is the following:

Application: System Settings (systemsettings), signal SIGSEGV
Using host libthread_db library "/lib64/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0x2b27a805c170 (LWP 23464)]
[KCrash handler]
#5  0x00002b27a1bd2bc0 in QObject::objectName () from /usr/lib64/libQtCore.so.4
#6  0x00002b27afd5cddc in PlastikConfig::save (this=0x809010)
    at /home/kde-devel-trunk/kde/src/KDE/kdebase/workspace/kwin/clients/plastik/config/config.cpp:93
#7  0x00002b27afd5d13f in PlastikConfig::qt_metacall (this=0x809010,
    _c=QMetaObject::InvokeMetaMethod, _id=2, _a=0x7fff0b0971a0)
    at /home/kde-devel-trunk/kde/build/KDE/kdebase/workspace/kwin/clients/plastik/config/config.moc:74
#8  0x00002b27a1bd63eb in QMetaObject::activate ()
   from /usr/lib64/libQtCore.so.4
#9  0x00002b27ad4a48fd in KWinDecorationModule::pluginSave (this=0x88eb60,
    _t1=@0x7fff0b0971e0)
    at /home/kde-devel-trunk/kde/build/KDE/kdebase/workspace/kwin/kcmkwin/kwindecoration/kwindecoration.moc:104
#10 0x00002b27ad4a4f8d in KWinDecorationModule::save (this=0x88eb60)
    at /home/kde-devel-trunk/kde/src/KDE/kdebase/workspace/kwin/kcmkwin/kwindecoration/kwindecoration.cpp:537
#11 0x00002b27a0363abc in KCModuleProxy::save (this=0x88fef0)
    at /home/kde-devel-trunk/kde/src/KDE/kdelibs/kutils/kcmoduleproxy.cpp:276
#12 0x000000000040f9a5 in KCMultiWidget::apply (this=0x8eb950, module=0x88fef0)
    at /home/kde-devel-trunk/kde/src/KDE/kdebase/workspace/systemsettings/kcmultiwidget.cpp:308
#13 0x000000000040ff83 in KCMultiWidget::slotApply (this=0x8eb950)
    at /home/kde-devel-trunk/kde/src/KDE/kdebase/workspace/systemsettings/kcmultiwidget.cpp:126
#14 0x000000000040fede in KCMultiWidget::qt_metacall (this=0x8eb950,
    _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff0b097450)
    at /home/kde-devel-trunk/kde/build/KDE/kdebase/workspace/systemsettings/kcmultiwidget.moc:88
#15 0x00002b27a1bd63eb in QMetaObject::activate ()
   from /usr/lib64/libQtCore.so.4
#16 0x00002b27a0727148 in KDialog::applyClicked (this=0x8eb950)
    at /home/kde-devel-trunk/kde/build/KDE/kdelibs/kdeui/kdialog.moc:235
#17 0x00002b27a0728489 in KDialog::slotButtonClicked (this=0x8eb950, button=8)
    at /home/kde-devel-trunk/kde/src/KDE/kdelibs/kdeui/dialogs/kdialog.cpp:903
#18 0x00002b27a072aaa0 in KDialog::qt_metacall (this=0x8eb950,
    _c=QMetaObject::InvokeMetaMethod, _id=33, _a=0x7fff0b097690)
    at /home/kde-devel-trunk/kde/build/KDE/kdelibs/kdeui/kdialog.moc:181
#19 0x00002b27a07e0787 in KPageDialog::qt_metacall (this=0x8eb950,
    _c=QMetaObject::InvokeMetaMethod, _id=68, _a=0x7fff0b097690)
    at /home/kde-devel-trunk/kde/build/KDE/kdelibs/kdeui/kpagedialog.moc:63
#20 0x000000000040fe17 in KCMultiWidget::qt_metacall (this=0x8eb950,
    _c=QMetaObject::InvokeMetaMethod, _id=68, _a=0x7fff0b097690)
    at /home/kde-devel-trunk/kde/build/KDE/kdebase/workspace/systemsettings/kcmultiwidget.moc:78
#21 0x00002b27a1bd63eb in QMetaObject::activate ()
   from /usr/lib64/libQtCore.so.4
#22 0x00002b27a1bdc09e in QSignalMapper::mapped ()
   from /usr/lib64/libQtCore.so.4
#23 0x00002b27a1bdc540 in QSignalMapper::map () from /usr/lib64/libQtCore.so.4
#24 0x00002b27a1bdca9c in QSignalMapper::qt_metacall ()
   from /usr/lib64/libQtCore.so.4
#25 0x00002b27a1bd63eb in QMetaObject::activate ()
   from /usr/lib64/libQtCore.so.4
#26 0x00002b27a554afb7 in QAbstractButton::clicked ()
   from /usr/lib64/libQtGui.so.4
#27 0x00002b27a532648b in QAbstractButtonPrivate::emitClicked ()
   from /usr/lib64/libQtGui.so.4
#28 0x00002b27a5326b15 in QAbstractButtonPrivate::click ()
   from /usr/lib64/libQtGui.so.4
#29 0x00002b27a5326d11 in QAbstractButton::mouseReleaseEvent ()
   from /usr/lib64/libQtGui.so.4
#30 0x00002b27a50af8e8 in QWidget::event () from /usr/lib64/libQtGui.so.4
#31 0x00002b27a53272c0 in QAbstractButton::event ()
   from /usr/lib64/libQtGui.so.4
#32 0x00002b27a53a9448 in QPushButton::event () from /usr/lib64/libQtGui.so.4
#33 0x00002b27a5069ccf in QApplicationPrivate::notify_helper ()
   from /usr/lib64/libQtGui.so.4
#34 0x00002b27a50706bb in QApplication::notify () from /usr/lib64/libQtGui.so.4
#35 0x00002b27a07b3b5e in KApplication::notify (this=0x7fff0b098b20,
    receiver=0x80a480, event=0x7fff0b097fe0)
    at /home/kde-devel-trunk/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:311
#36 0x00002b27a1bc6b84 in QCoreApplication::notifyInternal ()
   from /usr/lib64/libQtCore.so.4
#37 0x00002b27a506e743 in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib64/libQtGui.so.4
#38 0x00002b27a50c3947 in QETWidget::translateMouseEvent ()
   from /usr/lib64/libQtGui.so.4
#39 0x00002b27a50c2beb in QApplication::x11ProcessEvent ()
   from /usr/lib64/libQtGui.so.4
#40 0x00002b27a50e4dd2 in QEventDispatcherX11::processEvents ()
   from /usr/lib64/libQtGui.so.4
#41 0x00002b27a1bc5f45 in QEventLoop::processEvents ()
   from /usr/lib64/libQtCore.so.4
#42 0x00002b27a1bc60b7 in QEventLoop::exec () from /usr/lib64/libQtCore.so.4
#43 0x00002b27a1bc8071 in QCoreApplication::exec ()
   from /usr/lib64/libQtCore.so.4
#44 0x0000000000412b33 in main (argc=1, argv=0x7fff0b098e48)
    at /home/kde-devel-trunk/kde/src/KDE/kdebase/workspace/systemsettings/main.cpp:67
#0  0x00002b27a60e2670 in nanosleep () from /lib64/libc.so.6

Thanks.
Comment 1 Scott Wheeler 2008-05-23 11:28:59 UTC
r811498 | wheeler | 2008-05-23 10:56:56 +0200 (Fri, 23 May 2008) | 2 lines

Casting from ints to widgets and then dereferencing them is bad, mmm-kay?

------------------------------------------------------------------------
Index: config/config.cpp
===================================================================
--- config/config.cpp   (revision 811497)
+++ config/config.cpp   (revision 811498)
@@ -89,8 +89,13 @@
 {
     KConfigGroup cg(m_config, "General");

-    QRadioButton *button = (QRadioButton*)m_dialog->titleAlign->selected();
-    if (button) cg.writeEntry("TitleAlignment", QString(button->objectName()));
+    QList<QRadioButton *> buttons = m_dialog->titleAlign->findChildren<QRadioButton *>();
+    for(QList<QRadioButton *>::ConstIterator it = buttons.begin(); it != buttons.end(); ++it)
+    {
+        if((*it)->isChecked())
+            cg.writeEntry("TitleAlignment", QString((*it)->objectName()));
+    }
+
     cg.writeEntry("AnimateButtons", m_dialog->animateButtons->isChecked() );
     cg.writeEntry("CloseOnMenuDoubleClick", m_dialog->menuClose->isChecked() );
     cg.writeEntry("TitleShadow", m_dialog->titleShadow->isChecked() );
Comment 2 Pino Toscano 2008-06-05 19:52:32 UTC
*** Bug 163292 has been marked as a duplicate of this bug. ***
Comment 3 Martin Flöser 2012-04-13 19:24:24 UTC
Bulk change: move all KWin kcm bugs to product kwin