Bug 159247 - Binary attachments to events cause crashes
Summary: Binary attachments to events cause crashes
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: 3.5
Platform: Ubuntu Linux
: NOR crash with 20 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 158810 159532 160212 161244 164046 166167 166205 166213 170184 179166 187544 (view as bug list)
Depends on:
Blocks: 179166
  Show dependency treegraph
 
Reported: 2008-03-13 16:54 UTC by Terry Herckenrath
Modified: 2009-03-18 19:36 UTC (History)
13 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 Terry Herckenrath 2008-03-13 16:54:43 UTC
Version:            (using KDE 3.5.8)
Installed from:    Ubuntu Packages
OS:                Linux

Yesterday (2008-03-12) I set a task reminder for the following day (today - 2008-03-13) without any problems.

This morning when trying to start Korganizer after the reminder was supposed to go off, Korganizer crashes consistently. It makes no difference whether KMail is running.

-- Starting korganizer transcript --
korganizer
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
kbuildsycoca running...
DCOP Cleaning up dead connections.
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
DCOP aborting (delayed) call from 'anonymous-12357' to 'korgac'
KCrash: Application 'korgac' crashing...
ERROR: Communication problem with korgac, it probably crashed.
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
DCOP aborting (delayed) call from 'anonymous-12342' to 'korganizer'
ERROR: Communication problem with korganizer, it probably crashed.
KCrash: Application 'korganizer' crashing...
terry@terry:~$ X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device
X Error: BadDevice, invalid or uninitialized input device 158
  Major opcode:  146
  Minor opcode:  3
  Resource id:  0x0
Failed to open device

-- korgac backtrace --
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1234991424 (LWP 12361)]
[KCrash handler]
#6  0xb7200cc2 in QString::fromUtf8 (
    utf8=0xb0330008 <Address 0xb0330008 out of bounds>, len=-1)
    at tools/qstring.cpp:5795
#7  0xb7ea25cd in Attachment (this=0x81e2660, 
    base64=0xb0330008 <Address 0xb0330008 out of bounds>, mime=@0x805ab00)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/attachment.cpp:47
#8  0xb7ecc4e0 in KCal::ICalFormatImpl::readAttachment (this=0x8157c78, 
    attach=0x81634a8)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:1239
#9  0xb7ed21bf in KCal::ICalFormatImpl::readIncidence (this=0x8157c78, 
    parent=0x815b0c8, tz=0x0, incidence=0x81e2150)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:1402
#10 0xb7ed344e in KCal::ICalFormatImpl::readTodo (this=0x8157c78, 
    vtodo=0x815b0c8)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:898
#11 0xb7ed3b9f in KCal::ICalFormatImpl::populate (this=0x8157c78, 
    cal=0x8153010, calendar=0x8158148)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:2011
#12 0xb7ec890a in KCal::ICalFormat::fromRawString (this=0xbfb16edc, 
    cal=0x8153010, text=@0xbfb16e6c)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformat.cpp:184
#13 0xb7ec8f70 in KCal::ICalFormat::load (this=0xbfb16edc, calendar=0x8153010, 
    fileName=@0xbfb16f40)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformat.cpp:98
#14 0xb7ef2de3 in KCal::FileStorage::load (this=0xbfb16f34)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/filestorage.cpp:97
#15 0xb7eba4e4 in KCal::CalendarLocal::load (this=0x8153010, 
    fileName=@0xbfb16f94, format=0x0)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/calendarlocal.cpp:66
#16 0xb7ef6722 in KCal::ResourceLocal::doLoad (this=0x8152fd8)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/resourcelocal.cpp:154
#17 0xb7ef5ada in KCal::ResourceCalendar::load (this=0x8152fd8)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/resourcecalendar.cpp:123
#18 0xb7f01b2e in KCal::CalendarResources::load (this=0x813e5f0)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/calendarresources.cpp:143
#19 0x08055f74 in KOAlarmClient (this=0x8064630, parent=0x0, name=0x0)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./korganizer/korgac/koalarmclient.cpp:59
#20 0x080519bb in MyApp::newInstance (this=0xbfb178d0)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./korganizer/korgac/korgacmain.cpp:45
#21 0xb7600e2f in KUniqueApplication::processDelayed (this=0xbfb178d0)
    at /build/buildd/kdelibs-3.5.8/./kdecore/kuniqueapplication.cpp:444
#22 0xb76028e8 in KUniqueApplication::qt_invoke (this=0xbfb178d0, _id=19, 
    _o=0xbfb172c8) at ./kuniqueapplication.moc:86
#23 0xb6ee4893 in QObject::activate_signal (this=0x80ec2c0, clist=0x80ec4c8, 
    o=0xbfb172c8) at kernel/qobject.cpp:2356
#24 0xb72708ec in QSignal::signal (this=0x80ec2c0, t0=@0x80ec2e8)
    at .moc/debug-shared-mt/moc_qsignal.cpp:100
#25 0xb6f04842 in QSignal::activate (this=0x80ec2c0) at kernel/qsignal.cpp:212
#26 0xb6f0c258 in QSingleShotTimer::event (this=0x80ec298)
    at kernel/qtimer.cpp:286
#27 0xb6e7baf0 in QApplication::internalNotify (this=0xbfb178d0, 
    receiver=0x80ec298, e=0xbfb17618) at kernel/qapplication.cpp:2635
#28 0xb6e7d91f in QApplication::notify (this=0xbfb178d0, receiver=0x80ec298, 
    e=0xbfb17618) at kernel/qapplication.cpp:2358
#29 0xb7641cd2 in KApplication::notify (this=0xbfb178d0, receiver=0x80ec298, 
    event=0xbfb17618)
    at /build/buildd/kdelibs-3.5.8/./kdecore/kapplication.cpp:550
#30 0xb6e0e209 in QApplication::sendEvent (receiver=0x80ec298, 
    event=0xbfb17618) at ../include/qapplication.h:520
#31 0xb6e6e53b in QEventLoop::activateTimers (this=0x80952e0)
    at kernel/qeventloop_unix.cpp:556
#32 0xb6e22d49 in QEventLoop::processEvents (this=0x80952e0, flags=4)
    at kernel/qeventloop_x11.cpp:389
#33 0xb6e961ce in QEventLoop::enterLoop (this=0x80952e0)
    at kernel/qeventloop.cpp:198
#34 0xb6e95fde in QEventLoop::exec (this=0x80952e0)
    at kernel/qeventloop.cpp:145
#35 0xb6e7d699 in QApplication::exec (this=0xbfb178d0)
    at kernel/qapplication.cpp:2758
#36 0x080518e7 in main (argc=)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./korganizer/korgac/korgacmain.cpp:85
#37 0xb6680050 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#38 0x080516c1 in _start ()
-- korgac backtrace --

-- korganizer backtrace --
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1242642048 (LWP 12343)]
[KCrash handler]
#6  0xb6ab5cc2 in QString::fromUtf8 (
    utf8=0xafcd4008 <Address 0xafcd4008 out of bounds>, len=-1)
    at tools/qstring.cpp:5795
#7  0xb79625cd in Attachment (this=0x836c218, 
    base64=0xafcd4008 <Address 0xafcd4008 out of bounds>, mime=@0xb6c73348)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/attachment.cpp:47
#8  0xb798c4e0 in KCal::ICalFormatImpl::readAttachment (this=0x8181c30, 
    attach=0x83d02b0)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:1239
#9  0xb79921bf in KCal::ICalFormatImpl::readIncidence (this=0x8181c30, 
    parent=0x85d89d0, tz=0x0, incidence=0x836bf38)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:1402
#10 0xb799344e in KCal::ICalFormatImpl::readTodo (this=0x8181c30, 
    vtodo=0x85d89d0)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:898
#11 0xb7993b9f in KCal::ICalFormatImpl::populate (this=0x8181c30, 
    cal=0x8421230, calendar=0x82f0650)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformatimpl.cpp:2011
#12 0xb798890a in KCal::ICalFormat::fromRawString (this=0xbfa9bdbc, 
    cal=0x8421230, text=@0xbfa9bd4c)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformat.cpp:184
#13 0xb7988f70 in KCal::ICalFormat::load (this=0xbfa9bdbc, calendar=0x8421230, 
    fileName=@0xbfa9be20)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/icalformat.cpp:98
#14 0xb79b2de3 in KCal::FileStorage::load (this=0xbfa9be14)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/filestorage.cpp:97
#15 0xb797a4e4 in KCal::CalendarLocal::load (this=0x8421230, 
    fileName=@0xbfa9be74, format=0x0)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/calendarlocal.cpp:66
#16 0xb79b6722 in KCal::ResourceLocal::doLoad (this=0x84211f8)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/resourcelocal.cpp:154
#17 0xb79b5ada in KCal::ResourceCalendar::load (this=0x84211f8)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/resourcecalendar.cpp:123
#18 0xb79c1b2e in KCal::CalendarResources::load (this=0x826b030)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./libkcal/calendarresources.cpp:143
#19 0x0805264c in KOrganizerApp::processCalendar (this=0xbfa9c8a4, 
    url=@0xbfa9bfe8)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./korganizer/koapp.cpp:143
#20 0x08052aea in KOrganizerApp::newInstance (this=0xbfa9c8a4)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./korganizer/koapp.cpp:89
#21 0xb6eb5e2f in KUniqueApplication::processDelayed (this=0xbfa9c8a4)
    at /build/buildd/kdelibs-3.5.8/./kdecore/kuniqueapplication.cpp:444
#22 0xb6eb78e8 in KUniqueApplication::qt_invoke (this=0xbfa9c8a4, _id=19, 
    _o=0xbfa9c298) at ./kuniqueapplication.moc:86
#23 0x0805235f in KOrganizerApp::qt_invoke (this=0xbfa9c8a4, _id=19, 
    _o=0xbfa9c298) at ./koapp.moc:77
#24 0xb6799893 in QObject::activate_signal (this=0x80a7fc8, clist=0x80a8208, 
    o=0xbfa9c298) at kernel/qobject.cpp:2356
#25 0xb6b258ec in QSignal::signal (this=0x80a7fc8, t0=@0x80a7ff0)
    at .moc/debug-shared-mt/moc_qsignal.cpp:100
#26 0xb67b9842 in QSignal::activate (this=0x80a7fc8) at kernel/qsignal.cpp:212
#27 0xb67c1258 in QSingleShotTimer::event (this=0x80a7fa0)
    at kernel/qtimer.cpp:286
#28 0xb6730af0 in QApplication::internalNotify (this=0xbfa9c8a4, 
    receiver=0x80a7fa0, e=0xbfa9c5e8) at kernel/qapplication.cpp:2635
#29 0xb673291f in QApplication::notify (this=0xbfa9c8a4, receiver=0x80a7fa0, 
    e=0xbfa9c5e8) at kernel/qapplication.cpp:2358
#30 0xb6ef6cd2 in KApplication::notify (this=0xbfa9c8a4, receiver=0x80a7fa0, 
    event=0xbfa9c5e8)
    at /build/buildd/kdelibs-3.5.8/./kdecore/kapplication.cpp:550
#31 0xb66c3209 in QApplication::sendEvent (receiver=0x80a7fa0, 
    event=0xbfa9c5e8) at ../include/qapplication.h:520
#32 0xb672353b in QEventLoop::activateTimers (this=0x80951c0)
    at kernel/qeventloop_unix.cpp:556
#33 0xb66d7d49 in QEventLoop::processEvents (this=0x80951c0, flags=4)
    at kernel/qeventloop_x11.cpp:389
#34 0xb674b1ce in QEventLoop::enterLoop (this=0x80951c0)
    at kernel/qeventloop.cpp:198
#35 0xb674afde in QEventLoop::exec (this=0x80951c0)
    at kernel/qeventloop.cpp:145
#36 0xb6732699 in QApplication::exec (this=0xbfa9c8a4)
    at kernel/qapplication.cpp:2758
#37 0x08050ae4 in main (argc=)
    at /build/buildd/kdepim-3.5.7enterprise20070926/./korganizer/main.cpp:58
#38 0xb5f34050 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#39 0x080508c1 in _start ()
-- korganizer backtrace --
Comment 1 Terry Herckenrath 2008-03-13 17:12:07 UTC
I forgot to mention that I'm running korganizer under Gnome in Ubuntu Gutsy.
Comment 2 Allen Winter 2008-03-14 15:58:49 UTC
I bet you have a binary attachment for one of your to-dos.

I've been trying to track down this bug for a long time.
I'll try again.  I think the problem is really in the
3rd party ical library.

Anyway, you might be able to "fix" the crash by removing the
"bad" to-do, or by removing the binary attachment from the to-do.
Comment 3 Terry Herckenrath 2008-03-14 16:04:07 UTC
First of all, it has become apparent that the title of this bug report is incorrect - it should really be: "KOrganizer crashes on decoding attachment".

I initially thought I has set a reminder for the first time and that the crash was related to that.

It turns out that I did NOT set a reminder, so then I started playing around with the contents of the .ics file.

First I removed all start / end information, still thinking the crash was somehow related to the scheduling of the event/todo. After I removed the start/end information, I tried to open the .ics file by double-clicking and again KOrganizer crashed, but this time the backtrace looked different. It was telling me that it crashed while reading an attachment.

Next I removed the attachment data from the original copy of the .ics file and sure enough, the crash no longer occurred.

The original .ics file can be retrieved from here since it is too large to attach: http://cactuscoder.com/korganizer.crash.ics.tar.gz

Hopefully this will enable you to determine what attachment caused the crash and why... :-)
Comment 4 Thomas McGuire 2008-07-09 20:19:38 UTC
*** Bug 158810 has been marked as a duplicate of this bug. ***
Comment 5 Thomas McGuire 2008-07-09 20:20:13 UTC
*** Bug 160212 has been marked as a duplicate of this bug. ***
Comment 6 Thomas McGuire 2008-07-09 20:20:14 UTC
*** Bug 159532 has been marked as a duplicate of this bug. ***
Comment 7 Thomas McGuire 2008-07-09 20:20:18 UTC
*** Bug 161244 has been marked as a duplicate of this bug. ***
Comment 8 Thomas McGuire 2008-07-09 20:20:30 UTC
*** Bug 166167 has been marked as a duplicate of this bug. ***
Comment 9 Thomas McGuire 2008-07-10 12:24:46 UTC
*** Bug 164046 has been marked as a duplicate of this bug. ***
Comment 10 Thomas McGuire 2008-07-10 12:24:53 UTC
*** Bug 166213 has been marked as a duplicate of this bug. ***
Comment 11 Thomas McGuire 2008-07-10 12:30:46 UTC
*** Bug 166205 has been marked as a duplicate of this bug. ***
Comment 12 Ian Turner 2008-10-08 07:27:06 UTC
I am also able to reproduce this bug (using korganizer 3.5.9 on Ubuntu 8.04 "Hardy Heron"). I see crashes in korganizer and korgac. I am available to help diagnose and/or debug this issue, if such help is needed.

Also, should this bug be reassigned to the iCal team?
Comment 13 Allen Winter 2008-10-08 14:42:59 UTC
Ian,

Good timing.
On/About 13 October the kdepim in trunk will require the new libical v0.33 (or higher) from the freeassociation project on SourceForge.  I am on that project team.  I hope you can help test kdepim trunk after that date.

We could not re-assign this bug to the libical project because we long ago forked our own local copy.  We did that because maintenance/support/activity had  stopped on libical.  But now there is an active community there.

My testing with the new libical seems to indicate that this bug is fixed.  But we'll know better after 13 Oct.
Comment 14 Dario Andres 2008-12-06 03:42:50 UTC
*** Bug 170184 has been marked as a duplicate of this bug. ***
Comment 15 Ian Turner 2009-01-17 00:36:26 UTC
I still witness this issue after upgrading to korganizer 4.1.4.
Comment 16 Allen Winter 2009-01-17 01:02:48 UTC
The fix is in the upcoming KDE 4.2.0.

Although I believe a very recent openSuSE also has the fix in KDE 4.1.4.
Comment 17 Christophe Giboudeaux 2009-01-19 20:50:13 UTC
*** Bug 179166 has been marked as a duplicate of this bug. ***
Comment 18 Allen Winter 2009-02-03 02:17:54 UTC
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.

Comment 19 Sergio Martins 2009-03-18 19:36:06 UTC
*** Bug 187544 has been marked as a duplicate of this bug. ***