Bug 171787 - korganizer crashed on scrolling the weekview
Summary: korganizer crashed on scrolling the weekview
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: agendaview (weekview) (show other bugs)
Version: 4.1
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-28 13:05 UTC by Michael Leupold
Modified: 2009-02-17 08:07 UTC (History)
4 users (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 Michael Leupold 2008-09-28 13:05:53 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources

Steps to reproduce:
(1) Select the weekview (no events neccessary)
(2) Use the scrollbar to scroll up and down again
The longer korganizer runs the harder this seems to be reproducible.

I'm actually just filing this so I can put the backtrace somewhere. I hope you can reproduce it - for me it's 100% reproducible.

Application: KOrganizer (korganizer), signal SIGSEGV
Using host libthread_db library "/lib/libthread_db.so.1".
0x00007fa02cd571a1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 19907)]

Thread 2 (Thread 0x411d3950 (LWP 19908)):
#0  0x00007fa030373fcd in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007fa0305fb2b3 in QWaitConditionPrivate::wait (this=0xadd7e0, time=30000) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:86
#2  0x00007fa0305fae28 in QWaitCondition::wait (this=0xadd708, mutex=0xadd700, time=30000) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:160
#3  0x00007fa0305ebb35 in QThreadPoolThread::run (this=0x7e7380) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/concurrent/qthreadpool.cpp:141
#4  0x00007fa0305fa823 in QThreadPrivate::start (arg=0x7e7380) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/thread/qthread_unix.cpp:191
#5  0x00007fa03036ffe7 in start_thread () from /lib/libpthread.so.0
#6  0x00007fa02cd876ed in clone () from /lib/libc.so.6
#7  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7fa032b6b7a0 (LWP 19907)):
[KCrash Handler]
#5  0x00007fa02e2790ca in KOAgendaItem::paintEvent (this=0x8eccb0, ev=0x7fff3ace04a0) at /home/lemma/kde/trunk/source/KDE/kdepim/korganizer/views/agendaview/koagendaitem.cpp:794
#6  0x00007fa02f095136 in QWidget::event (this=0x8eccb0, event=0x7fff3ace04a0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:7307
#7  0x00007fa02e275d37 in KOAgendaItem::event (this=0x8eccb0, event=0x7fff3ace04a0) at /home/lemma/kde/trunk/source/KDE/kdepim/korganizer/views/agendaview/koagendaitem.cpp:1279
#8  0x00007fa02f02e143 in QApplicationPrivate::notify_helper (this=0x635620, receiver=0x8eccb0, e=0x7fff3ace04a0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qapplication.cpp:3809
#9  0x00007fa02f02ff17 in QApplication::notify (this=0x7fff3ace4ae0, receiver=0x8eccb0, e=0x7fff3ace04a0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qapplication.cpp:3774
#10 0x00007fa031b41bda in KApplication::notify (this=0x7fff3ace4ae0, receiver=0x8eccb0, event=0x7fff3ace04a0) at /home/lemma/kde/trunk/source/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#11 0x00007fa030706658 in QCoreApplication::notifyInternal (this=0x7fff3ace4ae0, receiver=0x8eccb0, event=0x7fff3ace04a0)
    at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qcoreapplication.cpp:593
#12 0x00007fa02f03c2a3 in QCoreApplication::sendSpontaneousEvent (receiver=0x8eccb0, event=0x7fff3ace04a0)
    at ../../include/QtCore/../../../../../../source/qt-copy/src/corelib/kernel/qcoreapplication.h:218
#13 0x00007fa02f0a4945 in qt_sendSpontaneousEvent (receiver=0x8eccb0, event=0x7fff3ace04a0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qapplication_x11.cpp:4594
#14 0x00007fa02f09dd4d in QWidgetPrivate::drawWidget (this=0x8ecd60, pdev=0x65f8d8, rgn=@0x7fff3ace0740, offset=@0x7fff3ace07c0, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4642
#15 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x8cea60, pdev=0x65f8d8, siblings=@0x7fff3ace0d90, index=0, rgn=@0x7fff3ace0880, offset=@0x7fff3ace1070, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#16 0x00007fa02f09e4be in QWidgetPrivate::paintSiblingsRecursive (this=0x8cea60, pdev=0x65f8d8, siblings=@0x7fff3ace0d90, index=1, rgn=@0x7fff3ace09b0, offset=@0x7fff3ace1070, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4731
#17 0x00007fa02f09e4be in QWidgetPrivate::paintSiblingsRecursive (this=0x8cea60, pdev=0x65f8d8, siblings=@0x7fff3ace0d90, index=2, rgn=@0x7fff3ace0ae0, offset=@0x7fff3ace1070, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4731
#18 0x00007fa02f09e4be in QWidgetPrivate::paintSiblingsRecursive (this=0x8cea60, pdev=0x65f8d8, siblings=@0x7fff3ace0d90, index=3, rgn=@0x7fff3ace0c10, offset=@0x7fff3ace1070, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4731
#19 0x00007fa02f09e4be in QWidgetPrivate::paintSiblingsRecursive (this=0x8cea60, pdev=0x65f8d8, siblings=@0x7fff3ace0d90, index=4, rgn=@0x7fff3ace0ff0, offset=@0x7fff3ace1070, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4731
#20 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x8cea60, pdev=0x65f8d8, rgn=@0x7fff3ace0ff0, offset=@0x7fff3ace1070, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#21 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x8cd8a0, pdev=0x65f8d8, siblings=@0x7fff3ace1180, index=0, rgn=@0x7fff3ace13e0, offset=@0x7fff3ace1460, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#22 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x8cd8a0, pdev=0x65f8d8, rgn=@0x7fff3ace13e0, offset=@0x7fff3ace1460, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#23 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x8ccf00, pdev=0x65f8d8, siblings=@0x7fff3ace1570, index=2, rgn=@0x7fff3ace17d0, offset=@0x7fff3ace1850, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#24 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x8ccf00, pdev=0x65f8d8, rgn=@0x7fff3ace17d0, offset=@0x7fff3ace1850, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#25 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x8caf30, pdev=0x65f8d8, siblings=@0x7fff3ace1a90, index=4, rgn=@0x7fff3ace1910, offset=@0x7fff3ace1d70, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#26 0x00007fa02f09e4be in QWidgetPrivate::paintSiblingsRecursive (this=0x8caf30, pdev=0x65f8d8, siblings=@0x7fff3ace1a90, index=5, rgn=@0x7fff3ace1cf0, offset=@0x7fff3ace1d70, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4731
#27 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x8caf30, pdev=0x65f8d8, rgn=@0x7fff3ace1cf0, offset=@0x7fff3ace1d70, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#28 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x8b8770, pdev=0x65f8d8, siblings=@0x7fff3ace1e80, index=2, rgn=@0x7fff3ace20e0, offset=@0x7fff3ace2160, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#29 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x8b8770, pdev=0x65f8d8, rgn=@0x7fff3ace20e0, offset=@0x7fff3ace2160, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#30 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x8c8590, pdev=0x65f8d8, siblings=@0x7fff3ace2270, index=1, rgn=@0x7fff3ace24d0, offset=@0x7fff3ace2550, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#31 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x8c8590, pdev=0x65f8d8, rgn=@0x7fff3ace24d0, offset=@0x7fff3ace2550, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#32 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x82b610, pdev=0x65f8d8, siblings=@0x7fff3ace2660, index=1, rgn=@0x7fff3ace28c0, offset=@0x7fff3ace2940, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#33 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x82b610, pdev=0x65f8d8, rgn=@0x7fff3ace28c0, offset=@0x7fff3ace2940, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#34 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x84e530, pdev=0x65f8d8, siblings=@0x7fff3ace2a50, index=2, rgn=@0x7fff3ace2cb0, offset=@0x7fff3ace2d30, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#35 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x84e530, pdev=0x65f8d8, rgn=@0x7fff3ace2cb0, offset=@0x7fff3ace2d30, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#36 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x818040, pdev=0x65f8d8, siblings=@0x7fff3ace2f70, index=2, rgn=@0x7fff3ace2df0, offset=@0x7fff3ace3250, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#37 0x00007fa02f09e4be in QWidgetPrivate::paintSiblingsRecursive (this=0x818040, pdev=0x65f8d8, siblings=@0x7fff3ace2f70, index=3, rgn=@0x7fff3ace31d0, offset=@0x7fff3ace3250, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4731
#38 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x818040, pdev=0x65f8d8, rgn=@0x7fff3ace31d0, offset=@0x7fff3ace3250, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#39 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x7017c0, pdev=0x65f8d8, siblings=@0x7fff3ace3360, index=4, rgn=@0x7fff3ace35c0, offset=@0x7fff3ace3640, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#40 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x7017c0, pdev=0x65f8d8, rgn=@0x7fff3ace35c0, offset=@0x7fff3ace3640, flags=4, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#41 0x00007fa02f09e602 in QWidgetPrivate::paintSiblingsRecursive (this=0x6df330, pdev=0x65f8d8, siblings=@0x7fff3ace3750, index=5, rgn=@0x7fff3ace39c0, offset=@0x65b508, flags=4, 
    sharedPainter=0x9e07b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4741
#42 0x00007fa02f09e18e in QWidgetPrivate::drawWidget (this=0x6df330, pdev=0x65f8d8, rgn=@0x7fff3ace39c0, offset=@0x65b508, flags=5, sharedPainter=0x9e07b0)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:4683
#43 0x00007fa02f233f74 in QWidgetBackingStore::cleanRegion (this=0x65b4f0, rgn=@0x7fff3ace3b40, widget=0x6df580, recursiveCopyToScreen=true)
    at /home/lemma/kde/trunk/source/qt-copy/src/gui/painting/qbackingstore.cpp:1041
#44 0x00007fa02f234956 in qt_syncBackingStore (widget=0x6df580) at /home/lemma/kde/trunk/source/qt-copy/src/gui/painting/qbackingstore.cpp:319
#45 0x00007fa02f095721 in QWidget::event (this=0x6df580, event=0xa1adf0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qwidget.cpp:7453
#46 0x00007fa02f470cdc in QMainWindow::event (this=0x6df580, event=0xa1adf0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/widgets/qmainwindow.cpp:1274
#47 0x00007fa031c05282 in KMainWindow::event (this=0x6df580, ev=0xa1adf0) at /home/lemma/kde/trunk/source/KDE/kdelibs/kdeui/widgets/kmainwindow.cpp:1064
#48 0x00007fa031c41b11 in KXmlGuiWindow::event (this=0x6df580, ev=0xa1adf0) at /home/lemma/kde/trunk/source/KDE/kdelibs/kdeui/xmlgui/kxmlguiwindow.cpp:125
#49 0x00007fa02f02e143 in QApplicationPrivate::notify_helper (this=0x635620, receiver=0x6df580, e=0xa1adf0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qapplication.cpp:3809
#50 0x00007fa02f02ff17 in QApplication::notify (this=0x7fff3ace4ae0, receiver=0x6df580, e=0xa1adf0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qapplication.cpp:3774
#51 0x00007fa031b41bda in KApplication::notify (this=0x7fff3ace4ae0, receiver=0x6df580, event=0xa1adf0) at /home/lemma/kde/trunk/source/KDE/kdelibs/kdeui/kernel/kapplication.cpp:307
#52 0x00007fa030706658 in QCoreApplication::notifyInternal (this=0x7fff3ace4ae0, receiver=0x6df580, event=0xa1adf0) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qcoreapplication.cpp:593
#53 0x00007fa03070ada7 in QCoreApplication::sendEvent (receiver=0x6df580, event=0xa1adf0) at ../../include/QtCore/../../../../../../source/qt-copy/src/corelib/kernel/qcoreapplication.h:215
#54 0x00007fa030706c81 in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x6164b0) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1204
#55 0x00007fa030706f4e in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qcoreapplication.cpp:1097
#56 0x00007fa03073d307 in QCoreApplication::sendPostedEvents () at ../../include/QtCore/../../../../../../source/qt-copy/src/corelib/kernel/qcoreapplication.h:220
#57 0x00007fa03073c531 in postEventSourceDispatch (s=0x638150) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:211
#58 0x00007fa02a20e0f2 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#59 0x00007fa02a211396 in ?? () from /usr/lib/libglib-2.0.so.0
#60 0x00007fa02a21182f in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#61 0x00007fa03073b6b8 in QEventDispatcherGlib::processEvents (this=0x634410, flags=@0x7fff3ace4950) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qeventdispatcher_glib.cpp:325
#62 0x00007fa02f0e6627 in QGuiEventDispatcherGlib::processEvents (this=0x634410, flags=@0x7fff3ace49b0) at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qguieventdispatcher_glib.cpp:204
#63 0x00007fa030703070 in QEventLoop::processEvents (this=0x7fff3ace4a60, flags=@0x7fff3ace4a10) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qeventloop.cpp:149
#64 0x00007fa03070326c in QEventLoop::exec (this=0x7fff3ace4a60, flags=@0x7fff3ace4a70) at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qeventloop.cpp:200
#65 0x00007fa03070705b in QCoreApplication::exec () at /home/lemma/kde/trunk/source/qt-copy/src/corelib/kernel/qcoreapplication.cpp:851
#66 0x00007fa02f02dea4 in QApplication::exec () at /home/lemma/kde/trunk/source/qt-copy/src/gui/kernel/qapplication.cpp:3337
#67 0x000000000040b444 in main (argc=1, argv=0x7fff3ace4c88) at /home/lemma/kde/trunk/source/KDE/kdepim/korganizer/main.cpp:58
Comment 1 Kevin Kofler 2008-10-02 10:10:42 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. :-(
Comment 2 Sergio Martins 2009-02-08 06:54:05 UTC
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.
Comment 3 Sergio Martins 2009-02-09 22:37:26 UTC
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
Comment 4 Sergio Martins 2009-02-09 22:44:36 UTC
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?
Comment 5 Juha Tuomala 2009-02-10 08:04:15 UTC
Bug 171651 and bug 171787.
Comment 6 Michael Leupold 2009-02-17 08:07:49 UTC
Can't reproduce this bug any longer on trunk r926723.