kontact crashing in KCal::Attachment on IMAP-based groupware

Bug #268964 reported by Matthew Carpenter
22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kdepimlibs
Fix Released
High
kdepimlibs (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Kontact crashing consistently.
Config:
* KMAIL-based groupware with some remote webdav-based calendars

Apparently when refreshing folders either on a timed-basis or via Ctrl-L, Kontact crashes with a SIGSEGV

Dump:
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 0xb5e8a920 (LWP 29816)]
[New Thread 0xb3437b90 (LWP 29930)]
[New Thread 0xb3c38b90 (LWP 29929)]
[New Thread 0xb4439b90 (LWP 29928)]
[New Thread 0xb4c3ab90 (LWP 29927)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6 0xb5f49283 in strlen () from /lib/tls/i686/cmov/libc.so.6
#7 0xb6a6179c in QString::fromUtf8 () from /usr/lib/libqt-mt.so.3
#8 0xb7ceeb31 in KCal::Attachment::Attachment () from /usr/lib/libkcal.so.2
#9 0xb7d17670 in KCal::ICalFormatImpl::readAttachment ()
   from /usr/lib/libkcal.so.2
#10 0xb7d1db03 in KCal::ICalFormatImpl::readIncidence ()
   from /usr/lib/libkcal.so.2
#11 0xb7d1de1b in KCal::ICalFormatImpl::readEvent ()
   from /usr/lib/libkcal.so.2
#12 0xb7d1ec06 in KCal::ICalFormatImpl::populate () from /usr/lib/libkcal.so.2
#13 0xb7d13cfa in KCal::ICalFormat::fromRawString ()
   from /usr/lib/libkcal.so.2
#14 0xb7d14337 in KCal::ICalFormat::load () from /usr/lib/libkcal.so.2
#15 0xb7d3ebf6 in KCal::FileStorage::load () from /usr/lib/libkcal.so.2
#16 0xb56eb20e in EventArchiver::archiveIncidences ()
   from /usr/lib/libkorganizer.so.1
#17 0xb56ebf5c in EventArchiver::run () from /usr/lib/libkorganizer.so.1
#18 0xb56ec38d in EventArchiver::runAuto () from /usr/lib/libkorganizer.so.1
#19 0xb56cb5d7 in ActionManager::slotAutoArchive ()
   from /usr/lib/libkorganizer.so.1
#20 0xb56d78bb in ActionManager::qt_invoke () from /usr/lib/libkorganizer.so.1
#21 0xb6745704 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#22 0xb67461e9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#23 0xb6ad7320 in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#24 0xb676cd0e in QTimer::event () from /usr/lib/libqt-mt.so.3
#25 0xb66d9c36 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#26 0xb66dba5f in QApplication::notify () from /usr/lib/libqt-mt.so.3
#27 0xb6e9a672 in KApplication::notify () from /usr/lib/libkdecore.so.4
#28 0xb666a28d in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#29 0xb66ccb19 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#30 0xb667f64b in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#31 0xb66f4f90 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#32 0xb66f4c8e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#33 0xb66db7df in QApplication::exec () from /usr/lib/libqt-mt.so.3
#34 0x0805c113 in ?? ()
#35 0xb5eed450 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#36 0x0805b7e1 in ?? ()

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote : Re: [Bug 268964] Re: kontact crashing in KCal::Attachment on IMAP-based groupware

On Thursday 11 September 2008, Jonathan Thomas wrote:
> *** This bug is a duplicate of bug 264370 ***
> https://bugs.launchpad.net/bugs/264370
>
> ** This bug has been marked a duplicate of bug 264370
> [intrepid] kmail crashes when reading a Google Calendar invitation email

I don't see this as a duplicate of 264370.
The backtraces are nothing alike.

I was able to resume working (Kontact was crashing every few minutes so I had
to fix it immediately) by removing numerous blank entries in the IMAP
Calendar and Journal directories.
In Kontact Mail-view they appear as Subject: "No Subject", Sender:"Unknown"
Date: "unknown" Size: "121 B" (There was some variation in size, from 117 to
124 bytes. In the Journal Folder they are more like 12 Bytes)
On the IMAP server, these looked like this:

  root@galadriel:/var/spool/cyrus/mail/g/groupware# cat Calendar/10851.
  Status: RO
  X-Status: OC
  X-KMail-EncryptionState:
  X-KMail-SignatureState:
  X-KMail-MDN-Sent:
  X-UID: 165
  X-Length: 114
  root@galadriel:/var/spool/cyrus/mail/g/groupware#

  root@galadriel:/var/spool/cyrus/mail/g/groupware# cat Journal/551.
  X-UID: 0

  root@galadriel:/var/spool/cyrus/mail/g/groupware#

Upon removing all the blank entries, Kontact no longer crashes.
Searching through Google suggests that these are remnants of KMail/Kontact
issues with DIMAP Caching? Likely related to Kontact Crashing (ironic, huh?)

Thanks,
Matt

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Yeah, perhaps that was a bit hasty right there...
Ok, to get this properly resolved we need to get a better backtrace. (Install kdepim-dbg and crash Kontact again)
Then, a report needs to be filed upstream at bugs.kde.org.

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :
Download full text (4.2 KiB)

Started happening again... and the empty entries returned.

With kdepim-dbg installed:

[Thread debugging using libthread_db enabled]
[New Thread 0xb5f00920 (LWP 8373)]
[New Thread 0xb34b0b90 (LWP 8390)]
[New Thread 0xb3cb1b90 (LWP 8389)]
[New Thread 0xb44b2b90 (LWP 8388)]
[New Thread 0xb4cb3b90 (LWP 8387)]
[KCrash handler]
#6 0xb5fbf283 in strlen () from /lib/tls/i686/cmov/libc.so.6
#7 0xb6ad779c in QString::fromUtf8 (
    utf8=0xafbb6008 <Address 0xafbb6008 out of bounds>, len=-1)
    at tools/qstring.cpp:5804
#8 0xb7d64b31 in Attachment (this=0xad56c00,
    base64=0xafbb6008 <Address 0xafbb6008 out of bounds>, mime=@0x8077118)
    at /build/buildd/kdepim-3.5.9/./libkcal/attachment.cpp:47
#9 0xb7d8d670 in KCal::ICalFormatImpl::readAttachment (this=0x9e96b30,
    attach=0xa4e8b78)
    at /build/buildd/kdepim-3.5.9/./libkcal/icalformatimpl.cpp:1246
#10 0xb7d93b03 in KCal::ICalFormatImpl::readIncidence (this=0x9e96b30,
    parent=0xa93c8d8, tz=0x0, incidence=0xad569b8)
    at /build/buildd/kdepim-3.5.9/./libkcal/icalformatimpl.cpp:1409
#11 0xb7d93e1b in KCal::ICalFormatImpl::readEvent (this=0x9e96b30,
    vevent=0xa93c8d8, vtimezone=0x0)
    at /build/buildd/kdepim-3.5.9/./libkcal/icalformatimpl.cpp:976
#12 0xb7d94c06 in KCal::ICalFormatImpl::populate (this=0x9e96b30,
    cal=0xbfbb7280, calendar=0xa4ac200)
    at /build/buildd/kdepim-3.5.9/./libkcal/icalformatimpl.cpp:2040
#13 0xb7d89cfa in KCal::ICalFormat::fromRawString (this=0xbfbb720c,
    cal=0xbfbb7280, text=@0xbfbb719c)
    at /build/buildd/kdepim-3.5.9/./libkcal/icalformat.cpp:184
#14 0xb7d8a337 in KCal::ICalFormat::load (this=0xbfbb720c,
    calendar=0xbfbb7280, fileName=@0xbfbb73f4)
    at /build/buildd/kdepim-3.5.9/./libkcal/icalformat.cpp:98
#15 0xb7db4bf6 in KCal::FileStorage::load (this=0xbfbb73e8)
    at /build/buildd/kdepim-3.5.9/./libkcal/filestorage.cpp:97
#16 0xb576120e in EventArchiver::archiveIncidences (this=0xbfbb75b4,
    calendar=0x9067f88, widget=0x8e03cd8, incidences=@0xbfbb7500)
    at /build/buildd/kdepim-3.5.9/./korganizer/eventarchiver.cpp:162
#17 0xb5761f5c in EventArchiver::run (this=0xbfbb75b4, calendar=0x9067f88,
    limitDate=@0xbfbb7578, widget=0x8e03cd8, withGUI=<value optimized out>,
    errorIfNone=false)
    at /build/buildd/kdepim-3.5.9/./korganizer/eventarchiver.cpp:116
#18 0xb576238d in EventArchiver::runAuto (this=0xbfbb75b4,
    calendar=0x9067f88, widget=0x8e03cd8, withGUI=<value optimized out>)
    at /build/buildd/kdepim-3.5.9/./korganizer/eventarchiver.cpp:70
#19 0xb57415d7 in ActionManager::slotAutoArchive (this=0x9067da0)
    at /build/buildd/kdepim-3.5.9/./korganizer/actionmanager.cpp:1906
#20 0xb574d8bb in ActionManager::qt_invoke (this=0x9067da0, _id=42,
    _o=0xbfbb7688) at ./actionmanager.moc:329
#21 0xb67bb704 in QObject::activate_signal (this=0x91f76e8, clist=0x91f7750,
    o=0xbfbb7688) at kernel/qobject.cpp:2359
#22 0xb67bc1e9 in QObject::activate_signal (this=0x91f76e8, signal=2)
    at kernel/qobject.cpp:2328
#23 0xb6b4d320 in QTimer::timeout (this=0x91f76e8)
    at .moc/debug-shared-mt/moc_qtimer.cpp:82
#24 0xb67e2d0e in QTimer::event (this=0x91f76e8, e=0xbfbb7988)
    at kernel/qtimer.cpp:222
#25 0xb674fc36 in...

Read more...

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Ok, I had a talk with upstream. They say that the bug is due to the old version of libical that Kontact is currently using, and that they will start using a more modern version of libical which doesn't have this crash in KDE 4.2.

Basically, binary attachments cause this crash. Upstream suggested to read the calendar in SunBird, which supposedly strips binary attachments from the calendar. The calendar can then be read in Kontact without issue.

Changed in kdepimlibs:
importance: Undecided → Low
status: New → Triaged
Changed in kdepimlibs:
status: Unknown → Confirmed
Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

Unfortunately, I have not idea how to make sunbird talk to my IMAP server for
IMAP-based calendars. Also, I have both ical and kcal entries (years of using kontact
in different versions with different configs and defaults) and I'm not sure how well
Sunbird will make sense of them.

Here another tidbit. When running Kontact from the cli, I get these types of
messages:
libkcal: ERROR: Can't read uid map
file '/home/matt/.kde/share/apps/kcal/uidmaps/remote_6jHWxKC30M'
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key
QGDict::hashKeyString: Invalid null key

Does that make any sense?

Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

Jonathan,

Is there any way to replace the version of libical used in 8.04? I just upgraded to 8.10 and I'm miserable. I'd like to keep using 8.04 until kde4.2 is included in kubuntu (9.04?) but Kontact crashes regularly, and it's lost >1GB of email in the process. I've had to restore from backups on my mailserver and go through all the hassle of mail-caching resync, etc.... Yes, I have 2.5gb in my mail account.

Help?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

About the only way I can see is to use KDE 4.2 in Intrepid: http://www.kubuntu.org/news/kde-4.2

Changed in kdepimlibs:
status: Confirmed → Fix Released
Revision history for this message
Matthew Carpenter (matt-eisgr) wrote :

Is that fix released for Intrepid? or for Hardy?

Thx
Matt

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

That was the KDE bug being marked fixed for KDE 4.2.0, which is available for 8.10 and the development version of 9.04.
Unfortunately I think the changes are too widespread to be made to the KDE 3.5 packages for Hardy.

Changed in kdepimlibs:
status: Triaged → Fix Released
Revision history for this message
ilia (ilia) wrote :

The bug still happens in KDE 4.2 from PPA because it still uses old libical 0.33. Please make sure new libical will be used in Kubuntu release (it would be better to upgrade libical in PPA too).
Citing http://bugs.kde.org/show_bug.cgi?id=159247#c18 :

Allen Winter 2009-02-03 02:17:54
I'm closing this bug as it is fixed in KOrganizer 4.2.0 and above, but also please make sure that you are using libical-0.41 or above as well.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Jaunty has libical 0.43, I suppose we should backport that to the PPA.

Changed in kdepimlibs:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.