Bug 206628 - Ktimetracker is crashing without any apparent reason (QTreeWidgetItemIteratorPrivate::next,..., TaskView::itemAt, TaskView::count)
Summary: Ktimetracker is crashing without any apparent reason (QTreeWidgetItemIterator...
Status: RESOLVED WORKSFORME
Alias: None
Product: ktimetracker
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: Thorsten Staerk
URL:
Keywords:
: 206767 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-07 14:05 UTC by Vincent Panel
Modified: 2019-11-17 21:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Panel 2009-09-07 14:05:10 UTC
Application that crashed: ktimetracker
Version of the application: 4.3.0
KDE Version: 4.3.1 (KDE 4.3.1)
Qt Version: 4.5.2
Operating System: Linux 2.6.31-desktop-0.rc8.1mnb i686
Distribution: "Mandriva Linux 2010.0"

 -- Backtrace:
Application: KTimeTracker (ktimetracker), signal: Segmentation fault
[KCrash Handler]
#6  0xb7282947 in QTreeWidgetItemIteratorPrivate::next (this=0x92aa0a8, current=0x92a9858) at ../../src/corelib/tools/qlist.h:87
#7  0xb7282bf9 in QTreeWidgetItemIterator::operator++ (this=0xbff0f74c) at itemviews/qtreewidgetitemiterator.cpp:184
#8  0xb381352d in TaskView::itemAt (this=0x9432060, i=0) at /usr/src/debug/kdepim-4.3.1/ktimetracker/taskview.cpp:400
#9  0xb381375f in TaskView::count (this=0x9432060) at /usr/src/debug/kdepim-4.3.1/ktimetracker/taskview.cpp:631
#10 0xb38287dd in TimetrackerWidget::slotUpdateButtons (this=0x8fd4660) at /usr/src/debug/kdepim-4.3.1/ktimetracker/timetrackerwidget.cpp:648
#11 0xb382a5cf in TimetrackerWidget::qt_metacall (this=0x8fd4660, _c=QMetaObject::InvokeMetaMethod, _id=66, _a=0xbff0f93c) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/timetrackerwidget.moc:257
#12 0xb67b7c44 in QMetaObject::activate (sender=0x8fd4660, from_signal_index=30, to_signal_index=30, argv=0x0) at kernel/qobject.cpp:3112
#13 0xb67b8965 in QMetaObject::activate (sender=0x8fd4660, m=0xb384bb70, local_signal_index=3, argv=0x0) at kernel/qobject.cpp:3186
#14 0xb3824005 in TimetrackerWidget::updateButtons (this=0x8fd4660) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/timetrackerwidget.moc:288
#15 0xb3829f82 in TimetrackerWidget::qt_metacall (this=0x8fd4660, _c=QMetaObject::InvokeMetaMethod, _id=3, _a=0xbff0fa7c) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/timetrackerwidget.moc:179
#16 0xb67b7c44 in QMetaObject::activate (sender=0x9432060, from_signal_index=124, to_signal_index=124, argv=0x0) at kernel/qobject.cpp:3112
#17 0xb67b8965 in QMetaObject::activate (sender=0x9432060, m=0xb384b100, local_signal_index=2, argv=0x0) at kernel/qobject.cpp:3186
#18 0xb3811735 in TaskView::updateButtons (this=0x9432060) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/taskview.moc:236
#19 0xb3811ffd in TaskView::stopTimerFor (this=0x9432060, task=0x947b2e0) at /usr/src/debug/kdepim-4.3.1/ktimetracker/taskview.cpp:784
#20 0xb38168db in TaskView::qt_metacall (this=0x9432060, _c=QMetaObject::InvokeMetaMethod, _id=37, _a=0xbff0fc58) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/taskview.moc:195
#21 0xb67b7c44 in QMetaObject::activate (sender=0x943ca08, from_signal_index=5, to_signal_index=5, argv=0xbff0fc58) at kernel/qobject.cpp:3112
#22 0xb67b8965 in QMetaObject::activate (sender=0x943ca08, m=0xb384a368, local_signal_index=1, argv=0xbff0fc58) at kernel/qobject.cpp:3186
#23 0xb37f75a5 in DesktopTracker::leftActiveDesktop (this=0x943ca08, _t1=0x947b2e0) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/desktoptracker.moc:95
#24 0xb37f7956 in DesktopTracker::registerForDesktops (this=0x943ca08, task=0x947b2e0, desktopList={{p = 0x80b3030, d = 0x80b3030}}) at /usr/src/debug/kdepim-4.3.1/ktimetracker/desktoptracker.cpp:122
#25 0xb3811d3a in TaskView::deletingTask (this=0x9432060, deletedTask=0x947b2e0) at /usr/src/debug/kdepim-4.3.1/ktimetracker/taskview.cpp:1025
#26 0xb381686b in TaskView::qt_metacall (this=0x9432060, _c=QMetaObject::InvokeMetaMethod, _id=34, _a=0xbff0fe98) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/taskview.moc:192
#27 0xb67b7c44 in QMetaObject::activate (sender=0x947b2e0, from_signal_index=5, to_signal_index=5, argv=0xbff0fe98) at kernel/qobject.cpp:3112
#28 0xb67b8965 in QMetaObject::activate (sender=0x947b2e0, m=0xb384b064, local_signal_index=1, argv=0xbff0fe98) at kernel/qobject.cpp:3186
#29 0xb380bf75 in Task::deletingTask (this=0x947b2e0, _t1=0x947b2e0) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/task.moc:95
#30 0xb380fabe in ~Task (this=0x947b2e0) at /usr/src/debug/kdepim-4.3.1/ktimetracker/task.cpp:141
#31 0xb72565f6 in QTreeModel::clear (this=0x92d8620) at itemviews/qtreewidget.cpp:166
#32 0xb38053a8 in KarmStorage::buildTaskView (this=0x93d2da0, rc=0x92685c0, view=0x9432060) at /usr/src/debug/kdepim-4.3.1/ktimetracker/karmstorage.cpp:247
#33 0xb38131d7 in TaskView::iCalFileModified (this=0x9432060, rc=0x92685c0) at /usr/src/debug/kdepim-4.3.1/ktimetracker/taskview.cpp:501
#34 0xb38169b4 in TaskView::qt_metacall (this=0x9432060, _c=QMetaObject::InvokeMetaMethod, _id=45, _a=0xbff101c8) at /usr/src/debug/kdepim-4.3.1/build/ktimetracker/taskview.moc:206
#35 0xb67b7c44 in QMetaObject::activate (sender=0x92685c0, from_signal_index=4, to_signal_index=4, argv=0xbff101c8) at kernel/qobject.cpp:3112
#36 0xb67b8965 in QMetaObject::activate (sender=0x92685c0, m=0xb7f987d4, local_signal_index=0, argv=0xbff101c8) at kernel/qobject.cpp:3186
#37 0xb7f3b865 in KCal::ResourceCalendar::resourceChanged () from /usr/lib/libkcal.so.4
#38 0xb7f3c255 in KCal::ResourceLocal::reload () from /usr/lib/libkcal.so.4
#39 0xb7f3d4d6 in KCal::ResourceLocal::qt_metacall () from /usr/lib/libkcal.so.4
#40 0xb67b7c44 in QMetaObject::activate (sender=0x94a518c, from_signal_index=4, to_signal_index=4, argv=0xbff102f8) at kernel/qobject.cpp:3112
#41 0xb67b8965 in QMetaObject::activate (sender=0x94a518c, m=0xb7bdb2e4, local_signal_index=0, argv=0xbff102f8) at kernel/qobject.cpp:3186
#42 0xb7a35a75 in KDirWatch::dirty () from /usr/lib/libkio.so.5
#43 0xb7a35da6 in KDirWatch::setDirty () from /usr/lib/libkio.so.5
#44 0xb7a37092 in ?? () from /usr/lib/libkio.so.5
#45 0xb7a3aac7 in ?? () from /usr/lib/libkio.so.5
#46 0xb7a3bff4 in ?? () from /usr/lib/libkio.so.5
#47 0xb67b7c44 in QMetaObject::activate (sender=0x90e7d08, from_signal_index=4, to_signal_index=4, argv=0x0) at kernel/qobject.cpp:3112
#48 0xb67b8965 in QMetaObject::activate (sender=0x90e7d08, m=0xb6894904, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3186
#49 0xb67f3365 in QTimer::timeout (this=0x90e7d08) at .moc/release-shared/moc_qtimer.cpp:128
#50 0xb67bd576 in QTimer::timerEvent (this=0x90e7d08, e=0xbff10a00) at kernel/qtimer.cpp:261
#51 0xb67b18fb in QObject::event (this=0x90e7d08, e=0xbff10a00) at kernel/qobject.cpp:1074
#52 0xb6c766cc in QApplicationPrivate::notify_helper (this=0x8f04620, receiver=0x90e7d08, e=0xbff10a00) at kernel/qapplication.cpp:4056
#53 0xb6c7e10e in QApplication::notify (this=0xbff10d40, receiver=0x90e7d08, e=0xbff10a00) at kernel/qapplication.cpp:3603
#54 0xb7707a78 in KApplication::notify () from /usr/lib/libkdeui.so.5
#55 0xb67a175e in QCoreApplication::notifyInternal (this=0xbff10d40, receiver=0x90e7d08, event=0xbff10a00) at kernel/qcoreapplication.cpp:610
#56 0xb67cfc31 in QTimerInfoList::activateTimers (this=0x8f06f84) at ../../src/corelib/kernel/qcoreapplication.h:213
#57 0xb67cd47e in timerSourceDispatch (source=0x8f06f50) at kernel/qeventdispatcher_glib.cpp:165
#58 0xb5524b12 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#59 0xb55283e8 in ?? () from /usr/lib/libglib-2.0.so.0
#60 0xb552850e in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#61 0xb67cd3c8 in QEventDispatcherGlib::processEvents (this=0x8efc4a0, flags={i = 36}) at kernel/qeventdispatcher_glib.cpp:327
#62 0xb6d1851a in QGuiEventDispatcherGlib::processEvents (this=0x8efc4a0, flags={i = 36}) at kernel/qguieventdispatcher_glib.cpp:202
#63 0xb679fd7d in QEventLoop::processEvents (this=0xbff10c84, flags=) at kernel/qeventloop.cpp:149
#64 0xb67a01c9 in QEventLoop::exec (this=0xbff10c84, flags={i = 0}) at kernel/qeventloop.cpp:201
#65 0xb67a2660 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#66 0xb6c76544 in QApplication::exec () at kernel/qapplication.cpp:3525
#67 0x0805f50d in main (argc=1, argv=0xbff11084) at /usr/src/debug/kdepim-4.3.1/ktimetracker/main.cpp:137

Reported using DrKonqi
Comment 1 Vincent Panel 2009-09-07 14:07:41 UTC
I was just doing nothing in particular and ktimetracker was in the systray when this bug makes it crash. This crash happens quite often (launch ktimetracker and wait 5 minutes), but I can't find the way to reproduce it in a reliable way.
Comment 2 Thorsten Staerk 2009-09-07 15:07:42 UTC
I cannot reproduce but maybe I can solve the issue nevertheless.
Comment 3 Vincent Panel 2009-09-08 12:08:44 UTC
I think it happened when ktimetracker automatically saved the document. I also think I was using korganizer at the same time (on the same file). This may explain the problem.
Comment 4 Dario Andres 2009-09-09 15:25:23 UTC
*** Bug 206767 has been marked as a duplicate of this bug. ***
Comment 5 Thorsten Staerk 2009-09-29 08:55:44 UTC
This is the code:

Task* TaskView::itemAt(int i)
/* This procedure delivers the item at the position i in the KTreeWidget.
Every item is a task. The items are counted linearily. The uppermost item
has the number i=0. */
{
  if ( topLevelItemCount() == 0 ) return 0;
  
  QTreeWidgetItemIterator item( this );
  while( *item && i-- ) ++item;
  
  kDebug( 5970 ) << "Leaving TaskView::itemAt" << "returning " << (*item==0);
  if ( !( *item ) )
    return 0;
  else
    return (Task*)*item;
}

It crashes in the while line. I cannot reproduce nor understand.
Comment 6 Thorsten Staerk 2009-09-29 08:58:46 UTC
According to #7 from your backtrace, the ++ operator makes it crash.
Comment 7 Thorsten Staerk 2009-09-29 09:04:52 UTC
QTreeWidgetItemIteratorPrivate::next is broken for you in my opinion. That means, install a decent Qt. How did you install Qt?
Comment 8 Andrew Crouthamel 2018-09-04 18:54:54 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I will be closing this bug.