Summary: | korganizer crashed on scrolling the weekview | ||
---|---|---|---|
Product: | [Applications] korganizer | Reporter: | Michael Leupold <lemma> |
Component: | agendaview (weekview) | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | christophe, kevin.kofler, smartins, tuju |
Priority: | NOR | ||
Version: | 4.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Michael Leupold
2008-09-28 13:05:53 UTC
Same faulty line, different triggering conditions: https://bugs.kde.org/show_bug.cgi?id=171651 Possibly the same bug (well, same as bug 171651) in kdepim 3.5.10: https://bugzilla.redhat.com/show_bug.cgi?id=465211 The offending line: > if ( mIncidence->type() == "Todo" > && !KOPrefs::instance()->todosUseCategoryColors() ) { There's a check earlier in that function: if ( !mIncidence ) { return; } and the KDE 3 version had this comment for it: //HACK // to reproduce a crash: // 1. start Kontact with the Calendar as the initial module // 2. immediately select the summary (which must include appt and to-do) // causes a crash for me every time in this method unless we make // the following check if ( !mIncidence )return; but apparently mIncidence can't just be NULL, it can also be an invalid pointer. :-( Got this when unchecked the resource: ==14128== Invalid read of size 4 ==14128== at 0x47EAB2C: KOAgendaItem::paintEvent(QPaintEvent*) (koagendaitem.cpp:803) ==14128== by 0x5816322: QWidget::event(QEvent*) (qwidget.cpp:7307) ==14128== by 0x47E8842: KOAgendaItem::event(QEvent*) (koagendaitem.cpp:1325) ==14128== by 0x57BDF7E: QApplicationPrivate::notify_helper(QObject*, QEvent*) (qapplication.cpp:3809) ==14128== by 0x57C2A1B: QApplication::notify(QObject*, QEvent*) (qapplication.cpp:3774) ==14128== by 0x41F365F: KApplication::notify(QObject*, QEvent*) (kapplication.cpp:307) ==14128== by 0x5459396: QCoreApplication::notifyInternal(QObject*, QEvent*) (qcoreapplication.cpp:593) ==14128== by 0x581B3AD: qt_sendSpontaneousEvent(QObject*, QEvent*) (qcoreapplication.h:218) ==14128== by 0x580EC79: QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*) (qwidget.cpp:4642) ==14128== by 0x580F3EF: QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*) (qwidget.cpp:4741) ==14128== by 0x580F2D2: QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*) (qwidget.cpp:4731) ==14128== by 0x580F2D2: QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*) (qwidget.cpp:4731) ==14128== Address 0x78056d0 is 0 bytes inside a block of size 28 free'd ==14128== at 0x402292C: operator delete(void*) (vg_replace_malloc.c:342) ==14128== by 0x452A184: KCal::Event::~Event() (event.cpp:78) ==14128== by 0x4552C0E: void qDeleteAll<QHash<QString, KCal::Event*>::const_iterator>(QHash<QString, KCal::Event*>::const_iterator, QHash<QString, KCal::Event*>::const_iterator) (qalgorithms.h:352) ==14128== by 0x4550C5F: KCal::CalendarLocal::deleteAllEvents() (qalgorithms.h:360) ==14128== by 0x454F093: KCal::CalendarLocal::close() (calendarlocal.cpp:167) ==14128== by 0x45A85B7: KCal::ResourceCached::doClose() (resourcecached.cpp:878) ==14128== by 0x4CEC378: KRES::Resource::close() (resource.cpp:141) ==14128== by 0x48BC58A: ResourceView::closeResource(KCal::ResourceCalendar*) (resourceview.cpp:489) ==14128== by 0x48C1345: ResourceView::qt_metacall(QMetaObject::Call, int, void**) (resourceview.moc:106) ==14128== by 0x546E2AA: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3028) ==14128== by 0x546E913: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3098) ==14128== by 0x4599DF3: KCal::ResourceCalendar::resourceSaved(KCal::ResourceCalendar*) (resourcecalendar.moc:129) The incidence got deleted because the calendar got closed. KOAgendaItem::paintEvent expected mIncidence to point to something. SVN commit 924015 by smartins: requestClose() must be called before save() because save() causes resourceClosed() to be called. Currently, the first time a resource is closed it doesn't really get closed but it stays marked to be closed (because of requestClose()), then, when a normal save comes, like when you add an incidence, closeResource() will close the resource because there's a pending close request, all incidences are freed and you get a KOAgendaItem::paintEvent() crash. CCBUG: 171651 CCBUG: 171787 M +3 -1 resourceview.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=924015 I reproduced the crash and fixed it, but there are so many paintEvent bug reports that I'm not sure which ones got fixed. The backtrace I got was very similar to 171651 and 171787 So can you retest after updating korganizer from trunk? Bug 171651 and bug 171787. Can't reproduce this bug any longer on trunk r926723. |