Bug 279198 - [PATCH] GetHotNewStuff (Plasma theme) crashes when trying to view details of a theme
Summary: [PATCH] GetHotNewStuff (Plasma theme) crashes when trying to view details of ...
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: knewstuff (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Jeremy Whiting
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-02 18:49 UTC by thomas gahr
Modified: 2011-08-26 15:06 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
New crash information added by DrKonqi (12.74 KB, text/plain)
2011-08-02 19:24 UTC, thomas gahr
Details
proposed patch (742 bytes, patch)
2011-08-04 12:07 UTC, thomas gahr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description thomas gahr 2011-08-02 18:49:02 UTC
Application: systemsettings (1.0)
KDE Platform Version: 4.6.95 (4.7 RC2)
Qt Version: 4.8.0
Operating System: Linux 2.6.40-4.fc15.x86_64 x86_64
Distribution: "Fedora release 15 (Lovelock)"

-- Information about the crash:
- What I was doing when the application crashed:
I was looking through the list of plasma themes in get hot new stuff and wanted to view details of a theme. This caused a crash that took SystemSettings down, too because it was started from there.
It seems to be a little random though, Because I would view the details of another theme a few seconds before. I'll see if this is reproducible

-- Backtrace:
Application: System Settings (systemsettings), signal: Aborted
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
[KCrash Handler]
#6  0x0000003a52e352d5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x0000003a52e36beb in __GI_abort () at abort.c:93
#8  0x000000356de6f844 in qt_message_output (msgType=<optimized out>, buf=<optimized out>) at global/qglobal.cpp:2255
#9  0x000000356de6f9ff in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, msg=0x356dfd9148 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fff9c681b58) at global/qglobal.cpp:2301
#10 0x000000356de6fba4 in qFatal (msg=<optimized out>) at global/qglobal.cpp:2484
#11 0x0000003572c76ec8 in Attica::Provider::voteForContent (this=0x2a3bd18, contentId=..., rating=110) at /usr/src/debug/attica-0.2.0/lib/provider.cpp:601
#12 0x000000357624e6a1 in KNS3::AtticaProvider::vote (this=0x2a3bcd0, entry=<optimized out>, rating=110) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/attica/atticaprovider.cpp:330
#13 0x000000357622be54 in KNS3::Engine::vote (this=<optimized out>, entry=..., rating=110) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/core/engine.cpp:480
#14 0x0000003576242922 in KNS3::EntryDetails::ratingChanged (this=0x2a0e150, rating=<optimized out>) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/ui/entrydetailsdialog.cpp:300
#15 0x00000035762452ab in KNS3::EntryDetails::qt_metacall (this=0x2a0e150, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff9c681fe0) at /usr/src/debug/kdelibs-4.6.95/x86_64-redhat-linux-gnu/knewstuff/knewstuff3/entrydetailsdialog.moc:98
#16 0x000000356df8a14d in QMetaObject::activate (sender=0x17844d0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff9c681fe0) at kernel/qobject.cpp:3565
#17 0x000000357271c46e in KRatingWidget::ratingChanged (this=<optimized out>, _t1=11) at /usr/src/debug/kdelibs-4.6.95/x86_64-redhat-linux-gnu/kdeui/kratingwidget.moc:171
#18 0x000000357271c4ef in setRating (rating=11, this=0x17844d0) at /usr/src/debug/kdelibs-4.6.95/kdeui/widgets/kratingwidget.cpp:168
#19 KRatingWidget::setRating (this=0x17844d0, rating=11) at /usr/src/debug/kdelibs-4.6.95/kdeui/widgets/kratingwidget.cpp:162
#20 0x0000003576243f45 in KNS3::EntryDetails::entryChanged (this=0x2a0e150, entry=<optimized out>) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/ui/entrydetailsdialog.cpp:126
#21 0x0000003576245128 in KNS3::EntryDetails::setEntry (this=0x2a0e150, entry=<optimized out>) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/ui/entrydetailsdialog.cpp:72
#22 0x000000357621e57a in KNS3::DownloadWidgetPrivate::slotShowDetails (this=0x29aa460, entry=...) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/downloadwidget.cpp:377
#23 0x000000357621fc92 in KNS3::DownloadWidget::qt_metacall (this=0xfb88c0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff9c682830) at /usr/src/debug/kdelibs-4.6.95/x86_64-redhat-linux-gnu/knewstuff/knewstuff3/downloadwidget.moc:107
#24 0x000000356df8a14d in QMetaObject::activate (sender=0x29f14d0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff9c682830) at kernel/qobject.cpp:3565
#25 0x000000357621cd12 in KNS3::ItemsViewBaseDelegate::signalShowDetails (this=<optimized out>, _t1=<optimized out>) at /usr/src/debug/kdelibs-4.6.95/x86_64-redhat-linux-gnu/knewstuff/knewstuff3/moc_itemsviewbasedelegate.cpp:106
#26 0x000000357624df80 in KNS3::ItemsViewBaseDelegate::slotDetailsClicked (this=0x29f14d0, index=<optimized out>) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/ui/itemsviewbasedelegate.cpp:111
#27 0x000000357624e0a2 in KNS3::ItemsViewBaseDelegate::slotDetailsClicked (this=0x29f14d0) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/ui/itemsviewbasedelegate.cpp:101
#28 0x000000357621ce28 in KNS3::ItemsViewBaseDelegate::qt_metacall (this=0x29f14d0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x7fff9c682a60) at /usr/src/debug/kdelibs-4.6.95/x86_64-redhat-linux-gnu/knewstuff/knewstuff3/moc_itemsviewbasedelegate.cpp:94
#29 0x000000356df8a14d in QMetaObject::activate (sender=0x2cc96c0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff9c682a60) at kernel/qobject.cpp:3565
#30 0x000000356ec44322 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#31 0x000000356e987fae in QAbstractButtonPrivate::emitClicked (this=0x2cc9880) at widgets/qabstractbutton.cpp:546
#32 0x000000356e9892eb in QAbstractButtonPrivate::click (this=0x2cc9880) at widgets/qabstractbutton.cpp:539
#33 0x000000356e98955c in QAbstractButton::mouseReleaseEvent (this=0x2cc96c0, e=0x7fff9c683340) at widgets/qabstractbutton.cpp:1121
#34 0x000000356ea45eba in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:718
#35 0x000000356e614b1a in QWidget::event (this=0x2cc96c0, event=0x7fff9c683340) at kernel/qwidget.cpp:8342
#36 0x000000356e5c4564 in notify_helper (e=0x7fff9c683340, receiver=0x2cc96c0, this=0x933110) at kernel/qapplication.cpp:4495
#37 QApplicationPrivate::notify_helper (this=0x933110, receiver=0x2cc96c0, e=0x7fff9c683340) at kernel/qapplication.cpp:4467
#38 0x000000356e5c9cc3 in QApplication::notify (this=<optimized out>, receiver=0x2cc96c0, e=0x7fff9c683340) at kernel/qapplication.cpp:4038
#39 0x000000357264c0c6 in KApplication::notify (this=0x7fff9c685800, receiver=0x2cc96c0, event=0x7fff9c683340) at /usr/src/debug/kdelibs-4.6.95/kdeui/kernel/kapplication.cpp:311
#40 0x000000356df7616c in QCoreApplication::notifyInternal (this=0x7fff9c685800, receiver=0x2cc96c0, event=0x7fff9c683340) at kernel/qcoreapplication.cpp:853
#41 0x000000356e5c5532 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#42 QApplicationPrivate::sendMouseEvent (receiver=0x2cc96c0, event=0x7fff9c683340, alienWidget=0x2cc96c0, nativeWidget=0x7fff9c684030, buttonDown=0x2cc96c0, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3153
#43 0x000000356e640af5 in QETWidget::translateMouseEvent (this=0x7fff9c684030, event=<optimized out>) at kernel/qapplication_x11.cpp:4473
#44 0x000000356e63f9ba in QApplication::x11ProcessEvent (this=0x7fff9c685800, event=0x7fff9c683c00) at kernel/qapplication_x11.cpp:3599
#45 0x000000356e6672cc in x11EventSourceDispatch (s=0x92a3c0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#46 0x0000003a52a427ed in g_main_dispatch (context=0x9290e0) at gmain.c:2441
#47 g_main_context_dispatch (context=0x9290e0) at gmain.c:3014
#48 0x0000003a52a42fc8 in g_main_context_iterate (context=0x9290e0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3092
#49 0x0000003a52a4325c in g_main_context_iteration (context=0x9290e0, may_block=1) at gmain.c:3155
#50 0x000000356dfa4faf in QEventDispatcherGlib::processEvents (this=0x8f3990, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#51 0x000000356e666fbe in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#52 0x000000356df752a2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#53 0x000000356df754f7 in QEventLoop::exec (this=0x7fff9c683fd0, flags=...) at kernel/qeventloop.cpp:204
#54 0x000000356ea876c6 in QDialog::exec (this=0x7fff9c684030) at dialogs/qdialog.cpp:552
#55 0x00007f461dd70338 in KCMDesktopTheme::getNewThemes (this=0xfbabe0) at /usr/src/debug/kdebase-workspace-4.6.95/kdebase-workspace-4.6.95/kcontrol/desktoptheme/kcmdesktoptheme.cpp:152
#56 0x00007f461dd7047c in KCMDesktopTheme::qt_metacall (this=0xfbabe0, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=<optimized out>) at /usr/src/debug/kdebase-workspace-4.6.95/kdebase-workspace-4.6.95/x86_64-redhat-linux-gnu/kcontrol/desktoptheme/kcmdesktoptheme.moc:81
#57 0x000000356df8a14d in QMetaObject::activate (sender=0xfa3b70, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff9c684230) at kernel/qobject.cpp:3565
#58 0x000000356ec44322 in QAbstractButton::clicked (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:220
#59 0x000000356e987fae in QAbstractButtonPrivate::emitClicked (this=0xf68d70) at widgets/qabstractbutton.cpp:546
#60 0x000000356e9892eb in QAbstractButtonPrivate::click (this=0xf68d70) at widgets/qabstractbutton.cpp:539
#61 0x000000356e98955c in QAbstractButton::mouseReleaseEvent (this=0xfa3b70, e=0x7fff9c684b00) at widgets/qabstractbutton.cpp:1121
#62 0x000000356e614b1a in QWidget::event (this=0xfa3b70, event=0x7fff9c684b00) at kernel/qwidget.cpp:8342
#63 0x000000356e5c4564 in notify_helper (e=0x7fff9c684b00, receiver=0xfa3b70, this=0x933110) at kernel/qapplication.cpp:4495
#64 QApplicationPrivate::notify_helper (this=0x933110, receiver=0xfa3b70, e=0x7fff9c684b00) at kernel/qapplication.cpp:4467
#65 0x000000356e5c9cc3 in QApplication::notify (this=<optimized out>, receiver=0xfa3b70, e=0x7fff9c684b00) at kernel/qapplication.cpp:4038
#66 0x000000357264c0c6 in KApplication::notify (this=0x7fff9c685800, receiver=0xfa3b70, event=0x7fff9c684b00) at /usr/src/debug/kdelibs-4.6.95/kdeui/kernel/kapplication.cpp:311
#67 0x000000356df7616c in QCoreApplication::notifyInternal (this=0x7fff9c685800, receiver=0xfa3b70, event=0x7fff9c684b00) at kernel/qcoreapplication.cpp:853
#68 0x000000356e5c5532 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:231
#69 QApplicationPrivate::sendMouseEvent (receiver=0xfa3b70, event=0x7fff9c684b00, alienWidget=0xfa3b70, nativeWidget=0xac1660, buttonDown=0xfa3b70, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3153
#70 0x000000356e640af5 in QETWidget::translateMouseEvent (this=0xac1660, event=<optimized out>) at kernel/qapplication_x11.cpp:4473
#71 0x000000356e63f9ba in QApplication::x11ProcessEvent (this=0x7fff9c685800, event=0x7fff9c6853c0) at kernel/qapplication_x11.cpp:3599
#72 0x000000356e6672cc in x11EventSourceDispatch (s=0x92a3c0, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#73 0x0000003a52a427ed in g_main_dispatch (context=0x9290e0) at gmain.c:2441
#74 g_main_context_dispatch (context=0x9290e0) at gmain.c:3014
#75 0x0000003a52a42fc8 in g_main_context_iterate (context=0x9290e0, block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3092
#76 0x0000003a52a4325c in g_main_context_iteration (context=0x9290e0, may_block=1) at gmain.c:3155
#77 0x000000356dfa4faf in QEventDispatcherGlib::processEvents (this=0x8f3990, flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#78 0x000000356e666fbe in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:207
#79 0x000000356df752a2 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#80 0x000000356df754f7 in QEventLoop::exec (this=0x7fff9c685790, flags=...) at kernel/qeventloop.cpp:204
#81 0x000000356df79f35 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1125
#82 0x000000000040a855 in main (argc=5, argv=0x7fff9c685ac8) at /usr/src/debug/kdebase-workspace-4.6.95/kdebase-workspace-4.6.95/systemsettings/app/main.cpp:49

Reported using DrKonqi
Comment 1 thomas gahr 2011-08-02 19:24:39 UTC
Created attachment 62483 [details]
New crash information added by DrKonqi

kcmshell4 () on KDE Platform 4.6.95 (4.7 RC2) using Qt 4.8.0

- What I was doing when the application crashed:

Tried to view details of a window decoration in get hot new stuff.
This crash obviously happens randomly. The first time it happened while browsing through plasma themes (see original post), but it was not reproducible.
Now I've been browsing through window decorations for quite some time until now it crashed - again upon clicking "details" on an entry for a theme.

Btw. sorry if this is posted in the wrong category (System Settings), DrKonqui suggested this and I don't know how to change it.

-- Backtrace (Reduced):
#6  0x0000003a52e352d5 in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#7  0x0000003a52e36beb in __GI_abort () at abort.c:93
[...]
#11 0x0000003572c76ec8 in Attica::Provider::voteForContent (this=0x19e8058, contentId=..., rating=110) at /usr/src/debug/attica-0.2.0/lib/provider.cpp:601
#12 0x000000357624e6a1 in KNS3::AtticaProvider::vote (this=0x19e8010, entry=<optimized out>, rating=110) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/attica/atticaprovider.cpp:330
#13 0x000000357622be54 in KNS3::Engine::vote (this=<optimized out>, entry=..., rating=110) at /usr/src/debug/kdelibs-4.6.95/knewstuff/knewstuff3/core/engine.cpp:480
Comment 2 thomas gahr 2011-08-02 19:33:32 UTC
And again, backtrace is identical...
So this is kinda reproducible, KHotNewStuff crashes every Xth time I click on "details" for an entry in the listView...
Comment 3 Christoph Feck 2011-08-02 22:14:06 UTC
I am a bit surprised that you (or your distribution) are using latest stuff, such as Qt 4.8, but appearantly still use an outdated libattica. It is also possible that bug 261530 is not really fixed.

To further investigate this bug, please add the following information:

- git SHA1 of "attica" checkout from which installed libattica is compiled

If you did not compile yourself, you can get this information from your distributor.
Comment 4 thomas gahr 2011-08-03 12:21:16 UTC
I see. To be honest, this is the first time I heard about libattica and now I'm a little surprised, too. I Installed Qt and KDE from the official unstable repo of fedora's KDE team - what surprises me: ususally they keep all dependencies of KDE in that repo, which makes them all fit together nicely, so why not attica?
Anyway: the libattica I have installed was built from the officially released attica 0.2.0 tar. I guess this is SHA1 7f495dc4 (Fix compile with "-DQT_NO_CAST_FROM_ASCII-DQT_NO_CAST_TO_ASCII") then since this is tagged v0.2.0.
I have no problem building my own RPM from git sources if you tell me which SHA1 to use.
If this is the cause of this bug, I'll try to get in touch with the fedora KDE guys and the attica maintainer to propose putting it into KDE-unstable repo.
Thanks,
Thomas
Comment 5 thomas gahr 2011-08-03 13:12:38 UTC
OK, what seems strange to me:

According to backtrace entry #17 KRatingWidget::ratingChanged is emitted with a rating value of 11, which in turn is caused by line 126 in entrydetailsdialog (EntryDetails::entryChanged):
   ui->ratingWidget->setRating((m_entry.rating()-20)/6)
the signal that is being emitted then calls EntryDetails::ratingChanged, where the rating passed is simply multiplied by 10 and m_engine->vote is called.

Two things here:
1) in EntryDetails::entryChanged: ui->ratingWidget is being disconnected before setting the rating so the slot EntryDetails::ratingChanged should not even be called IMO.
2) ratingWidget::rating = (entry::rating-20)/6 = 11 => entry::rating=86 ... and afterwards (in slot EntryDetails::reatingChanged): entry::rating=ratingWidget::rating*10 - this doesn't make too much sense to me.

So @1: might this be a regression in Qt?
@2: why (rating-20)/6 - why not rating/10 if afterwards it's just multiplied by 10 again? Anyways if (rating-20)/6 should project a value of 0-100 to 0-10 it might be better to divide by 8 there. What happens if entry::rating<20?

I don't mean to be a smartass, I just want to make sure attica's version is to blame before bugging the packagers.
Comment 6 thomas gahr 2011-08-03 14:43:24 UTC
Ok, seems I was wrong about the disconnect, Qt docs state:

bool QObject::disconnect ( const QObject * receiver, const char * method = 0 )
[...]
Disconnects all signals in this object from receiver's method.

So it seems the programmer was mistaken, too because the source is:
(entrydetailsdialog.cpp:125 void EntryDetails::entryChanged)

 disconnect(ui->ratingWidget);
 ui->ratingWidget->setRating((m_entry.rating()-20)/6);
 connect(ui->ratingWidget, SIGNAL(ratingChanged(uint)), this, SLOT(ratingChanged(uint)));

which makes more sense like this:

 disconnect(ui->ratingWidget,0,this,0);
 ui->ratingWidget->setRating((m_entry.rating()-20)/6);
 connect(ui->ratingWidget, SIGNAL(ratingChanged(uint)), this, SLOT(ratingChanged(uint)));
Comment 7 thomas gahr 2011-08-03 14:45:29 UTC
... or ui->ratingWidget->disconnect(this) ...
Comment 8 thomas gahr 2011-08-04 12:07:07 UTC
Created attachment 62537 [details]
proposed patch

I am proposing this patch, but without any testing - I do not have the possibility atm to set up a build-environment.
But it should work out of the box and prevent KNS3::Engine::vote from being called everytime the details-dialog is being opened.
Comment 9 Christoph Feck 2011-08-07 01:00:57 UTC
Reassigning to knewstuff developers for patch inspection.
Comment 10 thomas gahr 2011-08-26 11:51:57 UTC
No reaction to my patch?
Comment 11 Jeremy Whiting 2011-08-26 15:06:39 UTC
This should be fixed in 4.7 branch (and frameworks branch) with a similar patch.  Try with KDE/4.7 HEAD or 4.7.1 when it is released and reopen if needed.