diff --git a/kde-baseapps-4.9.1-dolphin_cryptsetup_crash.patch b/kde-baseapps-4.9.1-dolphin_cryptsetup_crash.patch new file mode 100644 index 0000000..3f091f2 --- /dev/null +++ b/kde-baseapps-4.9.1-dolphin_cryptsetup_crash.patch @@ -0,0 +1,42 @@ +From: Frank Reininghaus +Date: Tue, 11 Sep 2012 17:34:23 +0000 +Subject: Fix possible crash in KStandardItemListWidget::paint() +X-Git-Url: http://quickgit.kde.org/?p=kde-baseapps.git&a=commitdiff&h=a502d3970bd0a0eb240c6b0a18e4601538bf9edb +--- +Fix possible crash in KStandardItemListWidget::paint() + +According to the backtrace in the bug report, it is possible that +KStandardItemListWidget::paint() is called if the hash m_textInfo has +not been initialised. The widget's index must be -1 in this case, see +KStandardItemListWidget::triggerCacheRefreshing(). It looks like this +can only happen if the item is about to be removed from the view, see +KItemListView::slotItemsRemoved(). + +I could not reproduce the crash, so I'm not sure why exactly this +happens, but this commit should at least prevent the crash. + +BUG: 306167 +FIXED-IN: 4.9.2 +--- + + +--- a/dolphin/src/kitemviews/kstandarditemlistwidget.cpp ++++ b/dolphin/src/kitemviews/kstandarditemlistwidget.cpp +@@ -263,6 +263,16 @@ + painter->setFont(m_customizedFont); + painter->setPen(m_isHidden ? m_additionalInfoTextColor : textColor()); + const TextInfo* textInfo = m_textInfo.value("text"); ++ ++ if (!textInfo) { ++ // It seems that we can end up here even if m_textInfo does not contain ++ // the key "text", see bug 306167. According to triggerCacheRefreshing(), ++ // this can only happen if the index is negative. This can happen when ++ // the item is about to be removed, see KItemListView::slotItemsRemoved(). ++ // TODO: try to reproduce the crash and find a better fix. ++ return; ++ } ++ + painter->drawStaticText(textInfo->pos, textInfo->staticText); + + bool clipAdditionalInfoBounds = false; + diff --git a/kde-baseapps.spec b/kde-baseapps.spec index cd2f91e..0b8f3fc 100644 --- a/kde-baseapps.spec +++ b/kde-baseapps.spec @@ -1,7 +1,7 @@ Name: kde-baseapps Summary: KDE Core Applications Version: 4.9.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 URL: https://projects.kde.org/projects/kde/kde-baseapps @@ -28,6 +28,8 @@ Patch3: kdebase-4.4.0-konqueror-kde#228593.patch Patch4: kdebase-4.3.4-bz#609039-chfn-parse.patch ## upstream patches +# http://quickgit.kde.org/?p=kde-baseapps.git&a=commit&h=a502d3970bd0a0eb240c6b0a18e4601538bf9edb +Patch100: kde-baseapps-4.9.1-dolphin_cryptsetup_crash.patch %ifnarch s390 s390x Requires: eject @@ -114,6 +116,7 @@ Requires: kdelibs4-devel %patch2 -p2 -b .home-icon %patch3 -p2 -b .kde#228593 %patch4 -p2 -b .bz#631481 +%patch100 -p1 -b .dolphin_cryptsetup_crash %build @@ -265,6 +268,9 @@ fi %changelog +* Tue Sep 11 2012 Rex Dieter 4.9.1-2 +- Cryptsetup crashes Dolphin on Closing of Loop Devic (#842164,kde#306167) + * Mon Sep 03 2012 Than Ngo - 4.9.1-1 - 4.9.1 - drop references to kdepimlibs