Summary: | [PATCH] GetHotNewStuff (Plasma theme) crashes when trying to view details of a theme | ||
---|---|---|---|
Product: | [Unmaintained] kdelibs | Reporter: | thomas gahr <kde-bugzilla> |
Component: | knewstuff | Assignee: | Jeremy Whiting <jpwhiting> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | cfeck, gladhorn, kde-bugzilla |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
New crash information added by DrKonqi
proposed patch |
Description
thomas gahr
2011-08-02 18:49:02 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
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... 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. 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 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. 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))); ... or ui->ratingWidget->disconnect(this) ... 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.
Reassigning to knewstuff developers for patch inspection. No reaction to my patch? 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. |