Bug 252956

Summary: Unable to delete calendar-items
Product: [Applications] korganizer Reporter: pv
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash CC: smartins
Priority: NOR    
Version: 4.4.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: valgrind output

Description pv 2010-10-01 19:14:21 UTC
Application: kontact (4.4.5)
KDE Platform Version: 4.4.4 (KDE 4.4.4) "release 3"
Qt Version: 4.6.3
Operating System: Linux 2.6.34.7-0.3-desktop i686
Distribution: "openSUSE 11.3 (i586)"

-- Information about the crash:
After deleting calendar-items (both, recurring and single event), closing the program causes the popup of the crash-window. Deletion seems to work, but Opening Kontact again, the items were NOT deleted. The calendar resides on a NAS mounted as NFS-device. The same setup worked fine on Suse 11.2



The crash can be reproduced every time.

 -- Backtrace:
Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#6  begin (this=0x8bab798, incidence=0x8bf0fa0) at /usr/include/QtCore/qlist.h:93
#7  contains (this=0x8bab798, incidence=0x8bf0fa0) at /usr/include/QtCore/qlist.h:757
#8  removeRef (this=0x8bab798, incidence=0x8bf0fa0) at /usr/src/debug/kdepimlibs-4.4.4/kcal/listbase.h:118
#9  KCal::Incidence::removeRelation (this=0x8bab798, incidence=0x8bf0fa0) at /usr/src/debug/kdepimlibs-4.4.4/kcal/incidence.cpp:529
#10 0xb4bf0c38 in KCal::Incidence::~Incidence (this=0x8bf0fa0, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/incidence.cpp:201
#11 0xb4bf0f7d in KCal::Event::~Event (this=0x8bf0fa0, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/event.cpp:76
#12 0xb4bf0fc2 in KCal::Event::~Event (this=0x8bf0fa0, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/event.cpp:79
#13 0xb4c52fcf in qDeleteAll<QHash<QString, KCal::Event*>::const_iterator> (begin=..., end=...) at /usr/include/QtCore/qalgorithms.h:322
#14 0xb4c07a18 in qDeleteAll<QHash<QString, KCal::Event*> > (this=0x880ff48) at /usr/include/QtCore/qalgorithms.h:330
#15 KCal::CalendarLocal::deleteAllEvents (this=0x880ff48) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarlocal.cpp:212
#16 0xb4c06075 in KCal::CalendarLocal::close (this=0x880ff48) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarlocal.cpp:163
#17 0xb4c060f8 in KCal::ResourceCached::doClose (this=0x8813e90) at /usr/src/debug/kdepimlibs-4.4.4/kcal/resourcecached.cpp:878
#18 0xb4d261ef in KRES::Resource::close (this=0x8813e90) at /usr/src/debug/kdepimlibs-4.4.4/kresources/resource.cpp:141
#19 0xb4c056ed in KCal::CalendarResources::close (this=0x88068e8) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarresources.cpp:362
#20 0xb4c057f2 in KCal::CalendarResources::~CalendarResources (this=0x88068e8, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarresources.cpp:259
#21 0xb01ee04d in KOrg::StdCalendar::~StdCalendar (this=0x88068e8, __in_chrg=<value optimized out>) at /usr/src/debug/kdepim-4.4.4/korganizer/stdcalendar.cpp:106
#22 0xb01ee0b2 in KOrg::StdCalendar::~StdCalendar (this=0x88068e8, __in_chrg=<value optimized out>) at /usr/src/debug/kdepim-4.4.4/korganizer/stdcalendar.cpp:109
#23 0xb01ef08f in K3StaticDeleter<KOrg::StdCalendar>::destructObject (this=0xb01f10e0) at /usr/include/k3staticdeleter.h:174
#24 0xb545cb64 in K3StaticDeleterPrivate::deleteStaticDeleters () at /usr/src/debug/kdelibs-4.4.4/kde3support/kdecore/k3staticdeleter.cpp:56
#25 0xb6d1ec50 in qt_call_post_routines () at kernel/qcoreapplication.cpp:202
#26 0xb6275ffa in QApplication::~QApplication (this=0xbf9b3e34, __in_chrg=<value optimized out>) at kernel/qapplication.cpp:1018
#27 0xb7187d58 in KApplication::~KApplication (this=0xbf9b3e34, __in_chrg=<value optimized out>) at /usr/src/debug/kdelibs-4.4.4/kdeui/kernel/kapplication.cpp:879
#28 0xb7187dc8 in KUniqueApplication::~KUniqueApplication (this=0xbf9b3e34, __in_chrg=<value optimized out>) at /usr/src/debug/kdelibs-4.4.4/kdeui/kernel/kuniqueapplication.cpp:354
#29 0x0804b897 in _start ()

This bug may be a duplicate of or related to bug 236996.

Possible duplicates by query: bug 252103, bug 252084, bug 246124, bug 238029, bug 236997.

Reported using DrKonqi
Comment 1 pv 2010-10-01 19:32:13 UTC
Just found out, that simply _opening_ the calendar module once causes a crash when _closing_ the program (pending deletions from previous tries?). So it is definitely the calendar module!

Status report (open only, no deletions):
Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#6  begin (this=0x8b539b8, incidence=0x8b991c8) at /usr/include/QtCore/qlist.h:93
#7  contains (this=0x8b539b8, incidence=0x8b991c8) at /usr/include/QtCore/qlist.h:757
#8  removeRef (this=0x8b539b8, incidence=0x8b991c8) at /usr/src/debug/kdepimlibs-4.4.4/kcal/listbase.h:118
#9  KCal::Incidence::removeRelation (this=0x8b539b8, incidence=0x8b991c8) at /usr/src/debug/kdepimlibs-4.4.4/kcal/incidence.cpp:529
#10 0xb4bfec38 in KCal::Incidence::~Incidence (this=0x8b991c8, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/incidence.cpp:201
#11 0xb4bfef7d in KCal::Event::~Event (this=0x8b991c8, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/event.cpp:76
#12 0xb4bfefc2 in KCal::Event::~Event (this=0x8b991c8, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/event.cpp:79
#13 0xb4c60fcf in qDeleteAll<QHash<QString, KCal::Event*>::const_iterator> (begin=..., end=...) at /usr/include/QtCore/qalgorithms.h:322
#14 0xb4c15a18 in qDeleteAll<QHash<QString, KCal::Event*> > (this=0x87b80c8) at /usr/include/QtCore/qalgorithms.h:330
#15 KCal::CalendarLocal::deleteAllEvents (this=0x87b80c8) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarlocal.cpp:212
#16 0xb4c14075 in KCal::CalendarLocal::close (this=0x87b80c8) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarlocal.cpp:163
#17 0xb4c140f8 in KCal::ResourceCached::doClose (this=0x87b7b00) at /usr/src/debug/kdepimlibs-4.4.4/kcal/resourcecached.cpp:878
#18 0xb4d341ef in KRES::Resource::close (this=0x87b7b00) at /usr/src/debug/kdepimlibs-4.4.4/kresources/resource.cpp:141
#19 0xb4c136ed in KCal::CalendarResources::close (this=0x87ae898) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarresources.cpp:362
#20 0xb4c137f2 in KCal::CalendarResources::~CalendarResources (this=0x87ae898, __in_chrg=<value optimized out>) at /usr/src/debug/kdepimlibs-4.4.4/kcal/calendarresources.cpp:259
#21 0xb01fc04d in KOrg::StdCalendar::~StdCalendar (this=0x87ae898, __in_chrg=<value optimized out>) at /usr/src/debug/kdepim-4.4.4/korganizer/stdcalendar.cpp:106
#22 0xb01fc0b2 in KOrg::StdCalendar::~StdCalendar (this=0x87ae898, __in_chrg=<value optimized out>) at /usr/src/debug/kdepim-4.4.4/korganizer/stdcalendar.cpp:109
#23 0xb01fd08f in K3StaticDeleter<KOrg::StdCalendar>::destructObject (this=0xb01ff0e0) at /usr/include/k3staticdeleter.h:174
#24 0xb546ab64 in K3StaticDeleterPrivate::deleteStaticDeleters () at /usr/src/debug/kdelibs-4.4.4/kde3support/kdecore/k3staticdeleter.cpp:56
#25 0xb6d2cc50 in qt_call_post_routines () at kernel/qcoreapplication.cpp:202
#26 0xb6283ffa in QApplication::~QApplication (this=0xbfcc50a4, __in_chrg=<value optimized out>) at kernel/qapplication.cpp:1018
#27 0xb7195d58 in KApplication::~KApplication (this=0xbfcc50a4, __in_chrg=<value optimized out>) at /usr/src/debug/kdelibs-4.4.4/kdeui/kernel/kapplication.cpp:879
#28 0xb7195dc8 in KUniqueApplication::~KUniqueApplication (this=0xbfcc50a4, __in_chrg=<value optimized out>) at /usr/src/debug/kdelibs-4.4.4/kdeui/kernel/kuniqueapplication.cpp:354
#29 0x0804b897 in _start ()
Comment 3 pv 2010-12-31 13:46:38 UTC
Hi Sergio,

I ran valgrind, but valgrind ends before korganizer starts (see attachment).
So no report is created :(
May be I'am doing something wrong by calling valgrind.
I also noticed that no ~/.valgrindrc file is created after running 
valgrind????
Happy New Year!
Peter
> https://bugs.kde.org/show_bug.cgi?id=252956
> 
> 
> Sergio Martins <iamsergio@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ---------------------------------------------------------------------------
> - CC|                            |iamsergio@gmail.com
> 
> 
> 
> 
> --- Comment #2 from Sergio Martins <iamsergio gmail com>  2010-12-31
> 03:02:39 --- Can you get a valgrind report?
> 
> http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_usefu
> l_crash_reports#Retrieving_a_backtrace_with_Valgrind
Comment 4 Sergio Martins 2010-12-31 14:21:54 UTC
Try:

( make sure korganizer/kontact is not running )

valgrind korganizer --nofork &> valgrind.out

And wait for it to start and crash
Comment 5 pv 2010-12-31 14:23:38 UTC
Followup:
May be this helps (gdb output)

Am Freitag, 31. Dezember 2010, 03:02:41 schrieb Sergio Martins:
> https://bugs.kde.org/show_bug.cgi?id=252956
> 
> 
> Sergio Martins <iamsergio@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ---------------------------------------------------------------------------
> - CC|                            |iamsergio@gmail.com
> 
> 
> 
> 
> --- Comment #2 from Sergio Martins <iamsergio gmail com>  2010-12-31
> 03:02:39 --- Can you get a valgrind report?
> 
> http://techbase.kde.org/Development/Tutorials/Debugging/How_to_create_usefu
> l_crash_reports#Retrieving_a_backtrace_with_Valgrind
Comment 6 pv 2010-12-31 14:38:11 UTC
tnx for the info, here it is...
The crash-notification displayed _after_ I closed the program manually!
Did not crash while I deleted entries, strange.

Peter

Am Freitag, 31. Dezember 2010, 14:21:55 schrieb Sergio Martins:
> https://bugs.kde.org/show_bug.cgi?id=252956
> 
> 
> 
> 
> 
> --- Comment #4 from Sergio Martins <iamsergio gmail com>  2010-12-31
> 14:21:54 --- Try:
> 
> ( make sure korganizer/kontact is not running )
> 
> valgrind korganizer --nofork &> valgrind.out
> 
> And wait for it to start and crash
Comment 7 Sergio Martins 2011-01-01 21:19:29 UTC
I don't see any attachment, please go to https://bugs.kde.org/show_bug.cgi?id=252956 and add it directly.

Thanks!
Comment 8 pv 2011-01-02 14:18:14 UTC
Created attachment 55469 [details]
valgrind output
Comment 9 Sergio Martins 2011-01-02 15:41:05 UTC
==8992== Invalid read of size 4
==8992==    at 0x44C3C3A: KCal::Incidence::removeRelation(KCal::Incidence*) (incidence.cpp:529)
==8992==    by 0x44CDC37: KCal::Incidence::~Incidence() (incidence.cpp:201)
==8992==    by 0x44CDF7C: KCal::Event::~Event() (event.cpp:76)
==8992==    by 0x44CDFC1: KCal::Event::~Event() (event.cpp:79)
==8992==    by 0x452FFCE: void qDeleteAll<QHash<QString, KCal::Event*>::const_iterator>(QHash<QString, KCal::Event*>::const_iterator, QHash<QString, KCal::Event*>::const_iterator) (qalgorithms.h:322)
==8992==    by 0x44E4A17: KCal::CalendarLocal::deleteAllEvents() (qalgorithms.h:330)
==8992==    by 0x44E3074: KCal::CalendarLocal::close() (calendarlocal.cpp:163)
==8992==    by 0x44E30F7: KCal::ResourceCached::doClose() (resourcecached.cpp:878)
==8992==    by 0x60751EE: KRES::Resource::close() (resource.cpp:141)
==8992==    by 0x44E26EC: KCal::CalendarResources::close() (calendarresources.cpp:362)
==8992==    by 0x44E27F1: KCal::CalendarResources::~CalendarResources() (calendarresources.cpp:259)
==8992==    by 0x492704C: KOrg::StdCalendar::~StdCalendar() (stdcalendar.cpp:106)
==8992==  Address 0xbf1c674 is 268 bytes inside a block of size 3,168 free'd
==8992==    at 0x40266AD: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==8992==    by 0x4E3B5D9: QPainterPath::~QPainterPath() (qpainterpath_p.h:171)
==8992==    by 0x4E2E5F2: QPainter::drawEllipse(QRect const&) (qpainter.cpp:4297)
==8992==    by 0x8ED39F9: ??? (in /usr/lib/kde4/plugins/styles/oxygen.so)
==8992==    by 0x8ED46D3: ??? (in /usr/lib/kde4/plugins/styles/oxygen.so)
==8992==    by 0x8F05A68: ??? (in /usr/lib/kde4/plugins/styles/oxygen.so)
==8992==    by 0x8F19C12: ??? (in /usr/lib/kde4/plugins/styles/oxygen.so)
==8992==    by 0x8EF786D: ??? (in /usr/lib/kde4/plugins/styles/oxygen.so)
==8992==    by 0x416E6FE: KStyle::drawControl(QStyle::ControlElement, QStyleOption const*, QPainter*, QWidget const*) const (kstyle.cpp:1905)
==8992==    by 0x8EFB2A8: ??? (in /usr/lib/kde4/plugins/styles/oxygen.so)
==8992==    by 0x515DA55: QMenu::paintEvent(QPaintEvent*) (qmenu.cpp:2185)
==8992==    by 0x4D20F59: QWidget::event(QEvent*) (qwidget.cpp:8190)
Comment 10 Christophe Marin 2011-01-15 14:36:26 UTC
dup of bug 230733 ?
Comment 11 Sergio Martins 2011-07-15 13:56:27 UTC
KCal is no longer used.

Try kdepim 4.6.