Bug 111259 - Kio_imap crashes while trying to fetch certain mail from imaps server
Summary: Kio_imap crashes while trying to fetch certain mail from imaps server
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 06:04 UTC by David Hubner
Modified: 2009-09-03 12:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Etheral log of email causing crash (15.80 KB, application/octet-stream)
2005-08-22 11:21 UTC, David Hubner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Hubner 2005-08-22 06:04:14 UTC
Version:           3.4.1 (using KDE KDE 3.4.2)
Installed from:    Compiled From Sources
Compiler:          3.3.3 
OS:                Linux

When trying to get certain mail from a IMAPS connection, KIO_IMAP crashes, xsessions_error log below:

kio_imap: IMAP4::get -  imaps://hubnerd@hubnerd.homelinux.net:993/INBOX/;UID=423;SECTION=STRUCTURE
kio_imap: URL: box= INBOX, section= STRUCTURE, type= , uid= 423, validity= 
kio_imap: imapParse::namespaceForBox INBOX
kio_imap: IMAP4::parseURL - namespace=
kio_imap: IMAP4::parseURL - delimiter=/
kio_imap: IMAP4::parseURL - box=INBOX
kio_imap: IMAP4::parseURL - return 4
kio_imap: IMAP4Protocol::assureBox - reusing box
kio_imap: IMAP4::get -  finished
kmail: ImapAccountBase::constructParts - created id 1 of type TEXT/HTML
kmail: Falling back to normal mode
kio_imap: IMAP4::dispatch - command=80
kio_imap: IMAP4::dispatch - command=67
kio_imap: IMAP4::get -  imaps://hubnerd@hubnerd.homelinux.net:993/INBOX/;UID=423;SECTION=BODY.PEEK[TEXT]
kio_imap: URL: box= INBOX, section= BODY.PEEK[TEXT], type= , uid= 423, validity= 
kio_imap: imapParse::namespaceForBox INBOX
kio_imap: IMAP4::parseURL - namespace=
kio_imap: IMAP4::parseURL - delimiter=/
kio_imap: IMAP4::parseURL - box=INBOX
kio_imap: IMAP4::parseURL - return 5
kio_imap: IMAP4Protocol::assureBox - reusing box
kio_imap: imapParser::parseBody - discarding 423
QGArray::at: Absolute index 50 out of range
QGArray::at: Absolute index 0 out of range
kioslave: ####### CRASH ###### protocol = imaps pid = 438 signal = 11
/usr/lib/./libkio.so.4(_ZN3KIO9SlaveBase15sigsegv_handlerEi+0xd7)[0xb7d662f7]
/lib/libpthread.so.0[0xb6a8cbc5]
[0xffffe420]
/usr/lib/kde3/kio_imap4.so(_ZN10imapParser13parseUntaggedER11parseString+0x8a0)[0xb5f6c6c0]
/usr/lib/kde3/kio_imap4.so(_ZN10imapParser9parseLoopEv+0xa90)[0xb5f74a20]
/usr/lib/kde3/kio_imap4.so(_ZN13IMAP4Protocol3getERK4KURL+0x66e)[0xb5f4c3fe]
/usr/lib/./libkio.so.4(_ZN3KIO9SlaveBase8dispatchEiRK9QMemArrayIcE+0x497)[0xb7d698f7]
/usr/lib/kde3/kio_imap4.so(_ZN13IMAP4Protocol8dispatchEiRK9QMemArrayIcE+0xc9)[0xb5f5d2d9]
/usr/lib/./libkio.so.4(_ZN3KIO9SlaveBase12dispatchLoopEv+0x7d8)[0xb7d640a8]
/usr/lib/kde3/kio_imap4.so(kdemain+0x169)[0xb5f4af19]
kio_imap4 [kdeinit] imaps /tmp/ksocket-hubnerd/klauncherD1yN3b.slave-socket /tmp/ksocket-hubnerd/kmailAMAfoc.slave-socket[0x804cdd2]
kio_imap4 [kdeinit] imaps /tmp/ksocket-hubnerd/klauncherD1yN3b.slave-socket /tmp/ksocket-hubnerd/kmailAMAfoc.slave-socket[0x804e471]
kio_imap4 [kdeinit] imaps /tmp/ksocket-hubnerd/klauncherD1yN3b.slave-socket /tmp/ksocket-hubnerd/kmailAMAfoc.slave-socket[0x804e9bd]
kio_imap4 [kdeinit] imaps /tmp/ksocket-hubnerd/klauncherD1yN3b.slave-socket /tmp/ksocket-hubnerd/kmailAMAfoc.slave-socket[0x804fb12]
/lib/libc.so.6(__libc_start_main+0xbb)[0xb6864e0b]
kio_imap4 [kdeinit] imaps /tmp/ksocket-hubnerd/klauncherD1yN3b.slave-socket /tmp/ksocket-hubnerd/kmailAMAfoc.slave-socket(_ZN14QGListIteratorD2Ev+0x41)[0x804b771]
kio (Slave): slave died pid = 438
DCOP: unregister 'anonymous-438'
kdeinit: PID 438 terminated.
kwin: User timestamp, initial:4294967295
kwin: User timestamp, ASN:4294967295
kwin: User timestamp, final:'ID:41944370;WMCLASS:kmail:kmail;Caption:Error - KMail':233704

Thanks
Comment 1 Carsten Burghardt 2005-08-22 07:40:12 UTC
> /usr/lib/kde3/kio_imap4.so(_ZN10imapParser13parseUntaggedER11parseString+0x
>8a0)[0xb5f6c6c0]


Thanks for the backtrace. Can you provide the email that causes this crash or 
- even better - an ethereal log between your client and the imap server when 
you click on the mail and the kioslave crashes?
Comment 2 David Hubner 2005-08-22 11:21:05 UTC
Created attachment 12319 [details]
Etheral log of email causing crash

Here is the etheral log of the email that causes the crash.
Comment 3 Will Saxon 2008-02-10 08:25:11 UTC
I just found this as a duplicate to a bug I was about to file. I can't believe this has been an issue since 2005!!

I am using KDE 3.5.8, Kmail 1.9.7. I compiled from Gentoo portage using GCC 4.1.2 (gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2)). I am using amd64.

When I start KMail I get a few errors in my .xsession-errors, but then when I go to view my mailbox I get a failure window like this:

"Error while retrieving messages. The process for the imaps://imap.gmail.com protocol died unexpectedly."

I also get the following in my .xsession-errors:

QGArray::at: Absolute index 0 out of range
kioslave: ####### CRASH ###### protocol = imaps pid = 24109 signal = 11

I don't believe that a specific message causes this problem. I have set up a separate folder on my imap account and moved mail back and forth between it and my INBOX to try and find a mail that causes a crash. I have not been able to pinpoint a mail - I can move thousands of mails over and load them without a crash, but then if I delete ~/.kde/share/apps/kmail and reload the same folder, it will crash before it is able to download all the mails that did not cause a crash before. 
Comment 4 Dylan Fahey 2008-06-25 19:10:41 UTC
I have a similar problem as well.  I am not sure that it is caused by a specific message, however it happens on both of my gmail accounts that I have set up.  The protocol dies before I download all of my messages, so on both the most recent thing in my inbox is about a year old.  Every other folder loads just fine however. (sent mail, drafts, spam, etc.)  Otherwise I get the following message;
Error while retrieving messages.
The process for the imaps://imap.gmail.com protocol died unexpectedly.
 
The Details are as follows. 
Unexpected Program Termination 
Unexpected Program Termination
The program on your computer which provides access to the imaps://imap.gmail.com protocol has unexpectedly terminated.

If I start kmail from terminal, when I click the get mail button it works fine, and the problem only occurs when I click on the inbox and it tries to sync.  Here is the terminal output that occurs when I click on the inbox.  

WeaverThreadLogger: thread (ID: 1) suspended.
WeaverThreadLogger: thread (ID: 2) suspended.
WeaverThreadLogger: thread (ID: 3) suspended.
WeaverThreadLogger: thread (ID: 4) suspended.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "move_message_to_folder"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "copy_message_to_folder"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "jump_to_folder"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "jump_to_folder"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "cancel"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "inc_current_folder"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "dec_current_folder"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "select_current_folder"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "inc_current_message"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "dec_current_message"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "select_current_message"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "edit"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "delete"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "post_message"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "use_template"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x81e6480 ): KAccel object already contains an action name "display_message"
dylan@lappy8600:~$ kio (KIOConnection): ERROR: Could not write data
kio (KIOConnection): ERROR: Could not write data
kio (KIOConnection): ERROR: Could not write data

Comment 5 Will Saxon 2009-02-01 01:25:38 UTC
I am just now trying KMail 1.11.0 and I am not experiencing the problem. It may be fixed.