Version: (using KDE KDE 3.3.1) Installed from: Gentoo Packages Compiler: gcc (GCC) 3.3.4 20040623 (Gentoo Linux 3.3.4-r1, ssp-3.3.2-2, pie-8.7.6) OS: Linux Today I received two mails on our Exchange 2003 server (sorry dont blame me for that) which are crashing the newimap process of my Kmail. The Mail was forwarded as attachment by a colleague which also uses KMail. Normaly that works fine, but these two mails cant be read. If I click on them I get the following error message: Error while retrieving messages from the server. Unexpected Program Termination The program on your computer which provides access to the newimap://merenge.intern.snom.de protocol has unexpectedly terminated. Details of the request: URL: (unknown) Date and time: Friday 26 November 2004 12:30 Additional information: newimap://merenge.intern.snom.de I can provide network dumps, which contain fetching a working mail and afterwards trying to fetch one of the problematic ones. But I do not want to make the content of the mails public.
Either you send me the mail directly or I need a backtrace. See the kioslave debugging howto: http://webcvs.kde.org/cgi-bin/cvsweb.cgi/~checkout~/kdebase/kioslave/DEBUG.howto?rev=1.5;content-type=text%2Fplain
In advance: I upgraded to 3.3.2 but the problem still persits. I tried my best but unfortunately I get so many unresolved frames in gdb that I fear the backtrace is not really usefull: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 27384)] 0x4690674f in QGDict::hashKeyString () from /usr/qt/3/lib/libqt-mt.so.3 (gdb) where #0 0x4690674f in QGDict::hashKeyString () from /usr/qt/3/lib/libqt-mt.so.3 #1 0x4690725c in QGDict::look_string () from /usr/qt/3/lib/libqt-mt.so.3 #2 0x407bc3d6 in QDict<QString>::insert (this=0x0, k=@0x0, d=0x0) at qdict.h:65 #3 0x4099f307 in mimeHeader::addParameter () from /usr/kde/3.3/lib/kde3/kio_newimap4.so #4 0xbfffdeb0 in ?? () #5 0xbfffdf20 in ?? () #6 0x08155a38 in ?? () #7 0x00000000 in ?? () #8 0x08155a48 in ?? () #9 0x0815673f in ?? () #10 0xbfffde88 in ?? () #11 0x468f5f8a in QCString::~QCString () from /usr/qt/3/lib/libqt-mt.so.3 Previous frame inner to this frame (corrupt stack?) Output on the console looks like this: kio_imap: IMAP4::get - finished kmail: ImapJob::slotGetMessageResult - retrieved part 1 kmail: KMMessage::updateBodyPart 1 kmail: ISubject::notify 1 kmail: KMReaderWin::update - message kmail: parseMsg(KMMessage* aMsg == aMsg ) kmail: partNode::partNode() explicitType == DwMime::kTypeUnknown kmail: kmail: partNode::partNode() explicitType == DwMime::kTypeUnknown kmail: kmail: + Multipart/Mixed kmail: + Text/Plain kmail: + Message/Rfc822 kmail: Inserting one item into MimePartTree kmail: Content-Type: Multipart/Mixed kmail: Inserting one item into MimePartTree kmail: Content-Type: MESSAGE/RFC822 kmail: Inserting one item into MimePartTree kmail: Content-Type: TEXT/PLAIN kmail: partNode::findType() is looking at Multipart/Mixed kmail: partNode::findType() is looking at Text/Plain kmail: partNode::findType() is looking at Message/Rfc822 kmail: final presence: '' kmail: ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) kmail: ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) kmail: -----> Initially processing data of embedded RfC 822 message kmail: kmail: -----> Store RfC 822 message header "From: " kmail: kmail: final presence: '' kmail: copy parts kmail: -----> Inserting items into MimePartTree kmail: kmail: Inserting one item into MimePartTree kmail: Content-Type: text/plain kmail: <----- Finished inserting items into MimePartTree kmail: kmail: -----> Now parsing the MimePartTree kmail: kmail: ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) kmail: <----- Finished parsing the MimePartTree in insertAndParseNewChildNode() kmail: kmail: KMReaderWin - finished parsing and displaying of message. kio_imap: IMAP4::dispatch - command=67 kio_imap: IMAP4::get - newimap://ohlmeini%40intern.snom.de@merenge.intern.snom.de:143/INBOX/;UID=779;SECTION=BODY.PEEK[2.MIME] kio_imap: URL: box= INBOX, section= BODY.PEEK[2.MIME], type= , uid= 779, validity= kio_imap: IMAP4::parseURL: box INBOX kio_imap: IMAP4::parseURL - return 5 kio_imap: IMAP4Protocol::assureBox - reusing box kio_imap: mimeHeader::parseHeader - starting parsing So it seems always to fail when trying to parse a header. Intersting was, that when I allready had attached gdb to the IMAP process and then opened the mailbox with one of the problematic messages as allready selected message, it did not failed, like it did when I moved from one message to another and hitted a problematic one. As a developer I'm familiar with gdb and could try to track it down on my own. But I guess you would be faster. Would you prefer to get the problematic messages (which probably does not guarantee that you can reproduce the problem), or should I try to debug it (maybe with your help)?
> I tried my best but unfortunately I get so many unresolved frames in gdb > that I fear the backtrace is not really usefull: Did you compile the imap4 kioslave (kdepim/kioslave/imap4) with debugging turned on? Please check out the kioslave from cvs (KDE_3_3_BRANCH) and give it a try with --enable-debug=full.
My experience may or may not be related. I'm using Kmail 1.7.2 (Using KDE 3.3.2 Level 'a' unoffical build of SUSE). Retrieval of IMAP messages keeps hanging, so I often click on the 'abort' buton on the detailed progess window. This time, when I clicked on the 'abort' button, then the 'close' button, I saw: Unexpected Program Termination The program on your computer which provides access to the newimap://mail.maths.unsw.edu.au protocol has unexpectedly terminated. Details of the request: URL: (unknown) Date and time: Sunday 02 January 2005 09:58 Additional information: newimap://mail.maths.unsw.edu.au Possible causes: This is most likely to be caused by a bug in the program. Please consider submitting a full bug report as detailed below.
I fetched kdelibs and kdepim from the KDE_3_3_BRANCH and compiled both with --enable-debug=full. As usual ;) when trying to debug, the problem went away. For the next step I will try to compile the CVS branch without debug. Let's see if then the error occurs then (what unfortunately would mean that it is probably a timeming issue, which is very hard to find). I did not saw any bigger changes on the KDE_3_3_BRANCH since the release which would explain, why the error does not occur with the CVS code, right?
I'm now using the CVS code from KDE_3_3_BRANCH and the error still occurs. Unexpected Program Termination The program on your computer which provides access to the newimap://mail.maths.unsw.edu.au protocol has unexpectedly terminated. Details of the request: URL: (unknown) Date and time: Friday 28 January 2005 17:11 Additional information: newimap://mail.maths.unsw.edu.au Possible causes: This is most likely to be caused by a bug in the program. Please consider submitting a full bug report as detailed below.
> I'm now using the CVS code from KDE_3_3_BRANCH and the error still occurs. Then I need a backtrace. Please compile the kdepim package with debugging enabled. You can get the backrace of the imap4 kioslave with this howto: http://webcvs.kde.org/*checkout*/kdebase/kioslave/DEBUG.howto?rev=1.6
I've now compiled with debug and in addition have started to take a look at debug output, eg. kmail: processNextCheck, remaining 1 kmail: for host mail.maths.unsw.edu.au current connections=0 and limit is 0 kmail: connection limit reached: false kmail: processing next mail check for maths kmail: processNextCheck, remaining 0 kmail: account maths finished check kmail: connections to server mail.maths.unsw.edu.au now -1 kmail: check mail started - connections for host mail.maths.unsw.edu.au now is 0 The relevant code seems to be that in kmail/kmacctmgr.cpp near line 148: if ( !hostname.isEmpty() ) { if ( mServerConnections.find( hostname ) != mServerConnections.end() ) { mServerConnections[hostname] -= 1; kdDebug(5006) << "connections to server " << hostname << " now " << mServerConnections[hostname] << endl; } } Should mServerConnections[hostname] ever go negative? What are the consequences of it going negative?
> The relevant code seems to be that in kmail/kmacctmgr.cpp near line 148: The imap4 kioslave crashes and not kmail so you're looking in the wrong place ;-)
I may be looking in the wrong place for this particular bug, but mServerConnections[hostname] still goes negative. Isn't this a symptom of something going wrong somewhere?
Nope, this is only cosmetic and already fixed in kdepim HEAD. If you still see the crash I either need the mail or a valid backtrace.
Hi, I don't have a backtrace, but I tracked the IMAP protocol (see below). The problem arises on some IMAP servers (the same message does not cause problems when copied to annother server). In fact, 1) when you doubleclick on the message, it shows correctly (in a new window)! 2) you may copy correctly the message to another server 3) it is only the preview window that causes the crash I also noted that multipart messages are the cause of the problem. Single messages are fine, as well as attachements. I attach 2 listings: a) Buggy conversation: Kmail throws the Unexpected Program Termination b) Correct conversation: the same message causes no problem when read from on another server Aurelien ------- BUGGY IMAP CONVERSATION ---------------------------------------- 6 NOOP * 59 EXISTS * OK [UIDVALIDITY 0] 6 OK NOOP completed 7 UID FETCH 102 (UID RFC822.HEADER RFC822.SIZE FLAGS) * 59 FETCH (FLAGS () UID 102 RFC822.SIZE 7246 RFC822.HEADER {1127} Delivered-To: aurelien@cognitec.be Return-Path: <credit.manager@transatel.com> Received: from smtp.transatel.com (web1.transatel.com [::ffff:82.138.79.7]) by mail.cognitec.be with esmtp; Tue, 12 Jul 2005 18:48:55 +0200 Received: from gate.transatel.com (unknown [192.168.4.1]) .by smtp.transatel.com (Postfix) with ESMTP id 6728527AA1 .for <aurelien.slodzian@cognitec.be>; Tue, 12 Jul 2005 17:20:43 +0200 (CEST) Received: from Marlene (unknown [192.168.4.80]) .by gate.transatel.com (Postfix) with ESMTP id 434BE36C912 .for <aurelien.slodzian@cognitec.be>; Tue, 12 Jul 2005 17:18:44 +0200 (CEST) From: "Credit Manager" <credit.manager@transatel.com> To: aurelien.slodzian@cognitec.be Subject: Trabnsatel facture Date: Tue, 12 Jul 2005 17:20:43 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0046_01C58706.08A260A0" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcWG8vJ49Eoq+rBSQ42IUAJLa/x93w== Message-Id: <20050712151844.434BE36C912@gate.transatel.com> X-Length: 7217 X-UID: 232 ) 7 OK FETCH Completed 8 UID FETCH 102 (BODYSTRUCTURE) * 59 FETCH (UID 102 BODYSTRUCTURE (("text" "plain" () NIL NIL "quoted-printable" 646 38)("text" "html" () NIL NIL "quoted-printable" 5087 78) "alternative")) 8 OK FETCH Completed 9 UID FETCH 102 (UID RFC822.SIZE FLAGS BODY.PEEK[1.MIME]) * 59 FETCH (FLAGS () UID 102 RFC822.SIZE 7246 BODY[1.MIME] "text/plain; .charset="iso-8859-1"") 9 OK FETCH Completed * BYE Stream closed --- THE SAME FROM ANOTHER SERVER -> NO BUG ------------------------------ 1797 NOOP 1797 OK NOOP completed 1798 UID FETCH 9 (UID RFC822.HEADER RFC822.SIZE FLAGS) * 4 FETCH (UID 9 RFC822.HEADER {1128} Delivered-To: aurelien@cognitec.be Return-Path: <credit.manager@transatel.com> Received: from smtp.transatel.com (web1.transatel.com [::ffff:82.138.79.7]) by mail.cognitec.be with esmtp; Tue, 12 Jul 2005 18:48:55 +0200 Received: from gate.transatel.com (unknown [192.168.4.1]) .by smtp.transatel.com (Postfix) with ESMTP id 6728527AA1 .for <aurelien.slodzian@cognitec.be>; Tue, 12 Jul 2005 17:20:43 +0200 (CEST) Received: from Marlene (unknown [192.168.4.80]) .by gate.transatel.com (Postfix) with ESMTP id 434BE36C912 .for <aurelien.slodzian@cognitec.be>; Tue, 12 Jul 2005 17:18:44 +0200 (CEST) From: "Credit Manager" <credit.manager@transatel.com> To: aurelien.slodzian@cognitec.be Subject: Trabnsatel facture Date: Tue, 12 Jul 2005 17:20:43 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0046_01C58706.08A260A0" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcWG8vJ49Eoq+rBSQ42IUAJLa/x93w== Message-Id: <20050712151844.434BE36C912@gate.transatel.com> X-Length: 7217 X-UID: 39 RFC822.SIZE 7245 FLAGS (\Seen)) 1798 OK FETCH completed. 1799 UID FETCH 9 (BODYSTRUCTURE) * 4 FETCH (UID 9 BODYSTRUCTURE (("text" "plain" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 646 39 NIL NIL NIL)("text" "html" ("charset" "iso-8859-1") NIL NIL "quoted-printable" 5087 102 NIL NIL NIL) "alternative" ("boundary" "----=_NextPart_000_0046_01C58706.08A260A0") NIL NIL)) 1799 OK FETCH completed. 1800 UID FETCH 9 (UID RFC822.SIZE FLAGS BODY.PEEK[TEXT]) * 4 FETCH (UID 9 RFC822.SIZE 7245 FLAGS (\Seen) BODY[TEXT] {6117} This is a multi-part message in MIME format. ------=_NextPart_000_0046_01C58706.08A260A0 Content-Type: text/plain; .charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Bonjour Mr. Slodzian, =20 Suite =E0 notre entretien t=E9l=E9phonique de ce jour veuillez trouver = ci-dessous nos coordonn=E9es bancaires : =20 Merci de nous confirmer votre accord et effectuer un virement sur notre compte bancaire en Belgique dont voici les coordonn=E9es. =20 BANQUE FORTIS (Bruxelles) Transatel N=B0 Compte 001-3725564-64. IBAN : BE29 001372556464 SWIFT : GEBABEBB =20 Cordialement, =20 =20 Nicoliene Langereis Credit Management Department =20 TRANSATEL=20 Immeuble Le Monge=20 22, place des Vosges=20 92979 Paris la D=E9fense Cedex France=20 =20 Tel.+33(0)1.55.70.73.86 =20 ------=_NextPart_000_0046_01C58706.08A260A0 Content-Type: text/html; .charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2900.2668" name=3DGENERATOR></HEAD> <BODY> <DIV> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20 class=3D077440115-12072005>Bonjour Mr. Slodzian,</SPAN></SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20 class=3D077440115-12072005></SPAN></SPAN> </P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN=20 class=3D077440115-12072005></SPAN>Suite =E0 notre entretien = t=E9l=E9phonique de ce jour=20 veuillez trouver ci-dessous nos coordonn=E9es = bancaires :</SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><FONT face=3DArial=20 size=3D2></FONT> </P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Merci de = nous=20 confirmer votre accord et effectuer un virement sur notre compte = bancaire en=20 Belgique dont voici les coordonn=E9es.</SPAN><SPAN=20 style=3D"COLOR: black"><?xml:namespace prefix =3D o ns =3D=20 "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><B=20 style=3D"mso-bidi-font-weight: normal"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: = Arial"><o:p> </o:p></SPAN></B></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><B=20 style=3D"mso-bidi-font-weight: normal"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">BANQUE=20 FORTIS</SPAN></B><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">=20 (Bruxelles)</SPAN><SPAN style=3D"COLOR: black"><o:p></o:p></SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: = Arial">Transatel<o:p></o:p></SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">N=B0 Compte=20 001-3725564-64.</SPAN><SPAN style=3D"COLOR: = black"><o:p></o:p></SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">IBAN : = <SPAN=20 style=3D"mso-spacerun: yes"> </SPAN>BE29=20 001372556464<o:p></o:p></SPAN></P> <P class=3DMsoNormal style=3D"MARGIN: 0cm 0cm 0pt"><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">SWIFT : = GEBABEBB<o:p></o:p></SPAN></P></DIV> <DIV><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: = 'Times New Roman'; mso-ansi-language: FR; mso-fareast-language: FR; = mso-bidi-language: AR-SA"></SPAN> </DIV> <DIV><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: = 'Times New Roman'; mso-ansi-language: FR; mso-fareast-language: FR; = mso-bidi-language: AR-SA"><SPAN=20 class=3D077440115-12072005>Cordialement,</SPAN></SPAN></DIV> <DIV><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: = 'Times New Roman'; mso-ansi-language: FR; mso-fareast-language: FR; = mso-bidi-language: AR-SA"><SPAN=20 class=3D077440115-12072005></SPAN></SPAN> </DIV> <DIV><SPAN=20 style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-fareast-font-family: = 'Times New Roman'; mso-ansi-language: FR; mso-fareast-language: FR; = mso-bidi-language: AR-SA"><SPAN=20 class=3D077440115-12072005></SPAN> </SPAN></DIV> <DIV align=3Dleft><FONT face=3DArial size=3D2><STRONG>Nicoliene=20 Langereis</STRONG></FONT></DIV> <DIV align=3Dleft><FONT face=3DArial size=3D2>Credit Management=20 Department</FONT></DIV> <DIV align=3Dleft><FONT face=3DArial size=3D2></FONT> </DIV> <DIV align=3Dleft><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><FONT=20 color=3D#000000>TRANSATEL</FONT></SPAN><FONT color=3D#000000><SPAN=20 style=3D"COLOR: navy"> <BR></SPAN><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Immeuble Le=20 Monge</SPAN></FONT></FONT><FONT color=3D#000000><SPAN style=3D"COLOR: = navy">=20 <BR></SPAN><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">22, place des = Vosges</SPAN></FONT></FONT><FONT color=3D#000000><SPAN style=3D"COLOR: = navy">=20 <BR></SPAN><FONT face=3DArial size=3D2><SPAN=20 style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">92979 Paris = la D=E9fense=20 Cedex France</SPAN></FONT><SPAN style=3D"COLOR: navy"> = </SPAN></FONT></DIV> <DIV align=3Dleft><FONT face=3DArial size=3D2><SPAN=20 style=3D"COLOR: navy"></SPAN></FONT> </DIV> <DIV align=3Dleft><FONT face=3DArial color=3D#000000 size=3D2><SPAN=20 style=3D"COLOR: = navy">Tel.+33(0)1.55.70.73.86</SPAN></FONT><o:p></o:p></DIV> <DIV> </DIV></BODY></HTML> ------=_NextPart_000_0046_01C58706.08A260A0-- ) 1800 OK FETCH completed.
In KDE4, the IMAP slave cannot crash anymore like the backtrace in comment #2 shows (the dict is now passed by reference, not by pointer). There might be still a problem somewhere else. If you still have this problem, please reopen.