Bug 174894 - Recurring korganizer crash, related to-do culprit
Summary: Recurring korganizer crash, related to-do culprit
Status: RESOLVED FIXED
Alias: None
Product: kdepimlibs
Classification: Applications
Component: kcal (show other bugs)
Version: 4.1
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-11 20:28 UTC by Ian Turner
Modified: 2008-11-21 22:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case. (1.30 KB, text/calendar)
2008-11-13 06:40 UTC, Ian Turner
Details
More compliant test case (1.55 KB, text/calendar)
2008-11-13 22:31 UTC, Ian Turner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Turner 2008-11-11 20:28:33 UTC
Version:            (using KDE 4.1.2)
OS:                Linux
Installed from:    Ubuntu Packages

Recently I reorganized some to-do entries. As a result of this, I now see a highly reproducible crash: Whenever I do anything to change the view (clicking on a date, for example, or the "today" button), korganizer crashes. The backtrace follows; let me know if there is any other debugging I can do or if you want me to make a small test case.

Cheers,

--Ian

Application: KOrganizer (korganizer), signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb51326c0 (LWP 22774)]
[KCrash handler]
#6  KCal::Incidence::relatedTo (this=0xbfeced70)
    at /build/buildd/kdepimlibs-4.1.3/kcal/incidence.cpp:498
#7  0xb7f503a6 in KOTodoModel::reloadTodos (this=0x9e083a8)
    at /build/buildd/kdepim-4.1.3/korganizer/views/todoview/kotodomodel.cpp:253
#8  0xb7f58470 in KOTodoView::updateView (this=0x9e47810)
    at /build/buildd/kdepim-4.1.3/korganizer/views/todoview/kotodoview.cpp:311
#9  0xb7f64408 in CalendarView::updateView (this=0x9d7d2f0, start=@0x9f4e66c, 
    end=@0x9f4e66c)
    at /build/buildd/kdepim-4.1.3/korganizer/calendarview.cpp:779
#10 0xb7f64497 in CalendarView::showDates (this=0x9d7d2f0, 
    selectedDates=@0x9e470c0)
    at /build/buildd/kdepim-4.1.3/korganizer/calendarview.cpp:1636
#11 0xb7f7516d in CalendarView::qt_metacall (this=0x9d7d2f0, 
    _c=QMetaObject::InvokeMetaMethod, _id=172, _a=0xbfecf06c)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/calendarview.moc:564
#12 0xb768aa60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb768b7e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#14 0xb7f31163 in DateNavigator::datesSelected (this=0x9e470b8, 
    _t1=@0x9e470c0)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/datenavigator.moc:127
#15 0xb7f31188 in DateNavigator::emitSelected (this=0x9e470b8)
    at /build/buildd/kdepim-4.1.3/korganizer/datenavigator.cpp:263
#16 0xb7f318ed in DateNavigator::selectDates (this=0x9e470b8, d=@0x9ef61a4, 
    count=1) at /build/buildd/kdepim-4.1.3/korganizer/datenavigator.cpp:92
#17 0xb7f31e67 in DateNavigator::selectDates (this=0x9e470b8, count=1)
    at /build/buildd/kdepim-4.1.3/korganizer/datenavigator.cpp:79
#18 0xb7f780a8 in KOViewManager::showDayView (this=0x9d50438)
    at /build/buildd/kdepim-4.1.3/korganizer/koviewmanager.cpp:414
#19 0xb7f78818 in KOViewManager::qt_metacall (this=0x9d50438, 
    _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbfecf21c)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/koviewmanager.moc:102
#20 0xb768aa60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#21 0xb768ae60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#22 0xb6d5f5f1 in QAction::triggered () from /usr/lib/libQtGui.so.4
#23 0xb6d5ff5f in QAction::activate () from /usr/lib/libQtGui.so.4
#24 0xb7185592 in QToolButton::nextCheckState () from /usr/lib/libQtGui.so.4
#25 0xb70a8cd3 in ?? () from /usr/lib/libQtGui.so.4
#26 0xb70a8fa6 in QAbstractButton::mouseReleaseEvent ()
   from /usr/lib/libQtGui.so.4
#27 0xb7185a8c in QToolButton::mouseReleaseEvent ()
   from /usr/lib/libQtGui.so.4
#28 0xb6dbd9a2 in QWidget::event () from /usr/lib/libQtGui.so.4
#29 0xb70a6fbe in QAbstractButton::event () from /usr/lib/libQtGui.so.4
#30 0xb7185554 in QToolButton::event () from /usr/lib/libQtGui.so.4
#31 0xb6d658ec in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#32 0xb6d6e121 in QApplication::notify () from /usr/lib/libQtGui.so.4
#33 0xb7b44b2d in KApplication::notify (this=0xbfed00c0, receiver=0x9f9e708, 
    event=0xbfecf828)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#34 0xb7675e61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#35 0xb6d6d3ae in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/libQtGui.so.4
#36 0xb6dd7696 in ?? () from /usr/lib/libQtGui.so.4
#37 0xb6dd6a25 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#38 0xb6e007ea in ?? () from /usr/lib/libQtGui.so.4
#39 0xb588e6f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#40 0xb5891da3 in ?? () from /usr/lib/libglib-2.0.so.0
#41 0xb5891f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#42 0xb76a0478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#43 0xb6dffee5 in ?? () from /usr/lib/libQtGui.so.4
#44 0xb767452a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#45 0xb76746ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#46 0xb7676da5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#47 0xb6d65767 in QApplication::exec () from /usr/lib/libQtGui.so.4
#48 0x0804ea50 in main (argc=)
    at /build/buildd/kdepim-4.1.3/korganizer/main.cpp:58
#0  0xb80ce430 in __kernel_vsyscall ()
Comment 1 Ian Turner 2008-11-13 06:40:03 UTC
Created attachment 28527 [details]
Test case.

This is the smallest test case that I have found that reproduces this bug. Oddly, removing any one of the to-dos makes the crash go away, with the exception of the last one ("Event 1"). You can remove the last one and the bug stays.

Let me know if you need any other help with this issue.
Comment 2 Ian Turner 2008-11-13 06:41:26 UTC
Sometimes I see this other (related) backtrace instead of the one in Comment #0:

Application: KOrganizer (korganizer), signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb5001a90 (LWP 5325)]
[KCrash handler]
#6  0xb79d3ab6 in KOTodoModel::moveIfParentChanged (this=0x8f8b458, 
    curNode=0x8f82138, todo=0x90d97d0, addParentIfMissing=true)
    at /build/buildd/kdepim-4.1.3/korganizer/views/todoview/kotodomodel.cpp:377
#7  0xb79d63a6 in KOTodoModel::reloadTodos (this=0x8f8b458)
    at /build/buildd/kdepim-4.1.3/korganizer/views/todoview/kotodomodel.cpp:253
#8  0xb79de470 in KOTodoView::updateView (this=0x8f7b4c0)
    at /build/buildd/kdepim-4.1.3/korganizer/views/todoview/kotodoview.cpp:311
#9  0xb79ea408 in CalendarView::updateView (this=0x8f68630, start=@0x90975fc, 
    end=@0x90975fc)
    at /build/buildd/kdepim-4.1.3/korganizer/calendarview.cpp:779
#10 0xb79ea497 in CalendarView::showDates (this=0x8f68630, 
    selectedDates=@0x8fc4348)
    at /build/buildd/kdepim-4.1.3/korganizer/calendarview.cpp:1636
#11 0xb79fb16d in CalendarView::qt_metacall (this=0x8f68630, 
    _c=QMetaObject::InvokeMetaMethod, _id=172, _a=0xbfd9b4fc)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/calendarview.moc:564
#12 0xb7e92a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#13 0xb7e937e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#14 0xb79b7163 in DateNavigator::datesSelected (this=0x8fc4340, 
    _t1=@0x8fc4348)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/datenavigator.moc:127
#15 0xb79b7188 in DateNavigator::emitSelected (this=0x8fc4340)
    at /build/buildd/kdepim-4.1.3/korganizer/datenavigator.cpp:263
#16 0xb79b86b7 in DateNavigator::qt_metacall (this=0x8fc4340, 
    _c=QMetaObject::InvokeMetaMethod, _id=1, _a=0xbfd9b60c)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/datenavigator.moc:98
#17 0xb7e92a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#18 0xb7e937e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#19 0xb79ba8d3 in DateNavigatorContainer::datesSelected (this=0x8f4daf8, 
    _t1=@0xbfd9b844)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/datenavigatorcontainer.moc:125
#20 0xb79bc066 in DateNavigatorContainer::qt_metacall (this=0x8f4daf8, 
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfd9b70c)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/datenavigatorcontainer.moc:96
#21 0xb7e92a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#22 0xb7e937e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#23 0xb79b8b53 in KDateNavigator::datesSelected (this=0x8f8b530, 
    _t1=@0xbfd9b844)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/kdatenavigator.moc:121
#24 0xb79ba5aa in KDateNavigator::qt_metacall (this=0x8f8b530, 
    _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xbfd9b80c)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/kdatenavigator.moc:93
#25 0xb7e92a60 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#26 0xb7e937e2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#27 0xb7a71db3 in KODayMatrix::selected (this=0x8fa4e88, _t1=@0xbfd9b844)
    at /build/buildd/kdepim-4.1.3/obj-i486-linux-gnu/korganizer/kodaymatrix.moc:94
#28 0xb7a7225c in KODayMatrix::mouseReleaseEvent (this=0x8fa4e88, 
    e=0xbfd9bd98) at /build/buildd/kdepim-4.1.3/korganizer/kodaymatrix.cpp:416
#29 0xb6b489a2 in QWidget::event () from /usr/lib/libQtGui.so.4
#30 0xb7a74afe in KODayMatrix::event (this=0x8fa4e88, event=0xbfd9bd98)
    at /build/buildd/kdepim-4.1.3/korganizer/kodaymatrix.cpp:374
#31 0xb6af08ec in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#32 0xb6af9121 in QApplication::notify () from /usr/lib/libQtGui.so.4
#33 0xb748fb2d in KApplication::notify (this=0xbfd9c630, receiver=0x8fa4e88, 
    event=0xbfd9bd98)
    at /build/buildd/kde4libs-4.1.3/kdeui/kernel/kapplication.cpp:311
#34 0xb7e7de61 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#35 0xb6af83ae in QApplicationPrivate::sendMouseEvent ()
   from /usr/lib/libQtGui.so.4
#36 0xb6b62696 in ?? () from /usr/lib/libQtGui.so.4
#37 0xb6b61a25 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#38 0xb6b8b7ea in ?? () from /usr/lib/libQtGui.so.4
#39 0xb66c56f8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#40 0xb66c8da3 in ?? () from /usr/lib/libglib-2.0.so.0
#41 0xb66c8f61 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#42 0xb7ea8478 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#43 0xb6b8aee5 in ?? () from /usr/lib/libQtGui.so.4
#44 0xb7e7c52a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#45 0xb7e7c6ea in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#46 0xb7e7eda5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#47 0xb6af0767 in QApplication::exec () from /usr/lib/libQtGui.so.4
#48 0x0804ea50 in main (argc=150055336, argv=0x21)
    at /build/buildd/kdepim-4.1.3/korganizer/main.cpp:58
#0  0xb7f9c430 in __kernel_vsyscall ()
Comment 3 Thomas Thrainer 2008-11-13 21:47:36 UTC
Hi!

Thanks for the bug report! I looked at your .ics file and noticed, that "Event 1" is related to a non-existing todo. KOrganizer is not supposed to create such invalid relations, but should not crash either when opening such files. Did you create the testcase with KOrganizer or by hand?

I tried your testcase, but was able to open it without crash. I tried to click on today, switching some dates and update the view, but still no crash. I am using KOrganizer from KUbuntu too, the exact version is 4:4.1.2-0ubuntu1~hardy1~ppa1. To you use the version from 8.10?

Are your calendars (or your todo's) read-only in any regard? There was recently this commit (http://websvn.kde.org/?view=rev&revision=874506) which could have fixed your problem (an will be included in 4.1.3). But this fix is only in relation with read-only todo's, so I don't know if it is relevant for you. If you can compile from source it would be cool if you could check with the newest version in trunk or the current 4.1 branch (it already includes the mentioned fix).

Thanks again for the bug report and the backtraces,

Thomas
Comment 4 Ian Turner 2008-11-13 22:20:48 UTC
Tom,

Thanks for looking at this. It is indeed a curious bug. Here are some facts that I hope will answer your question:

1. The test case was created by extracting different parts of my actual file until I couldn't find anything else to remove that would still demonstrate the bug.

2. Obviously I did not succeed 100% at this attempt; removing the Related-To on "Event 1" leaves the bug in place. Removing other Related-To entries in the original test case does prevent the bug.

3. The original ics file did not contain any dangling references; I wrote a perl script to verify that.

4. Reintroducing the parent of "event 1" does not change the bug. I will attach a new test case which also demonstrates the crash without dangling references.

5. None of the ics files that I am aware of are read-only; if there are other potentially affected files, let me know.

6. This is with korganizer-4:4.1.2-0ubuntu2 on Intrepid Ibix 8.10 including backports and updates.
Comment 5 Ian Turner 2008-11-13 22:31:54 UTC
Created attachment 28551 [details]
More compliant test case
Comment 6 Ian Turner 2008-11-13 22:34:53 UTC
Oh, and I'm willing to try out trunk korganizer (I assume I have to do trunk everything in that case), but I don't really have time to futz around with making packages. Are you aware of a simple tutorial on building KDE packages for Ubuntu? (Or better yet, nightly built packages?)
Comment 7 Allen Winter 2008-11-21 22:04:24 UTC
I cannot reproduce this bug in trunk.
I'm pretty sure a fix was committed into the 4.1 branch on 10/21
so it should have been part of 4.1.3.

But for sure it will be in KDE 4.2.0 and KDE 4.1.4.