Bug 79500

Summary: search caused crash and now cannot re-start kmail gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)
Product: [Applications] kmail Reporter: Doug Burke <dburke>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Other   
Latest Commit: Version Fixed In:
Attachments: This email causes kmail to crash
backtract from kmail crash when it processes the email in the previous attatchment
tar file of ~/.kde/.../kmail/search/

Description Doug Burke 2004-04-12 17:30:30 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    Compiled From Sources
Compiler:          gcc version 3.3 20030304 (Apple Computer, Inc. build 1495) Thread model: posix
OS:          Other

I am using kmail installed on OS-X (10.3.3) using fink - the fink listing has it as version 3.2.1-21. It was compiled from sources rather than use the binary install that fink provides.

I have used the Search functionality once before in this version of kmail (it worked fine, but was on a different filder to the one used here). When I tried another search (a simple one, looking for a single name in the From field of my inbox), kmail crashed. I'll attach the backtrace to the end of this message.

If I try and re-start kmail it crashes almost immediately (it has displayed the "kmail tip" wizard but I can't tell how much further it gets). Here's the end of the screen output I get:

<--
kmail: 
**
** ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) **
**
kmail: Unknown codec "7bit" requested!
kmail: KMReaderWin  -  finished parsing and displaying of message.
kmime_codec_qp.cpp:285: failed assertion `mBadChar == 0'
*** KMail got signal 6 (Crashing)
DCOP: unregister 'kmail'
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kmail path = <unknown> pid = 3277
DCOP: register 'anonymous-3278' -> number of clients is now 3
DCOP:  'anonymous-3278' now known as 'drkonqi-3278'

Here is the contents of my ".kde/share/apps/kmail/search/Last Search" file - the only file in this directory (other than a ".Last Search.index.search.ids" file).

[Search Folder]
Base=inbox
Recursive=true
contentsA=castander
fieldA=From
funcA=contains
name=<unknown>
operator=and
rules=1

If I delete both these files then I can re-start kmail.

Here's the backtrace:

Reading symbols for shared libraries ...........................................
..... done
Attaching to program: `/sw/bin/kmail', process 3277.
Reading symbols for shared libraries ++++++++++++++++++++++++++++...............
................................................. done
0x900315a4 in wait4 ()
#0  0x900315a4 in wait4 ()
#1  0x02c6a7c0 in KCrash::defaultCrashHandler(int) ()
#2  <signal handler called>
#3  0x90042aac in kill ()
#4  0x9009ec34 in abort ()
#5  0x018f9f18 in __eprintf ()
#6  0x018d0e44 in KMime::QuotedPrintableDecoder::decode(char const*&, char const
*, char*&, char const*) ()
#7  0x018cdda8 in KMime::Codec::decode(char const*&, char const*, char*&, char c
onst*, bool) const ()
#8  0x018cdaf8 in KMime::Codec::decode(QMemArray<char> const&, bool) const ()
#9  0x0110a8c0 in KMMsgBase::decodeRFC2047String(QCString const&) ()
#10 0x010f90d0 in KMSearchRuleString::matches(DwString const&, KMMessage&, DwBoy
erMoore const*, int) const ()
#11 0x010fb138 in KMSearchPattern::matches(DwString const&) const ()
#12 0x010fb36c in KMSearchPattern::matches(unsigned) const ()
#13 0x011be3f0 in KMSearch::slotProcessNextBatch() ()
#14 0x011c28b0 in KMSearch::qt_invoke(int, QUObject*) ()
#15 0xef9029e0 in QObject::activate_signal(QConnectionList*, QUObject*) ()
#16 0xef9028c8 in QObject::activate_signal(int) ()
#17 0xef91c018 in QTimer::event(QEvent*) ()
#18 0xef8bdea0 in QApplication::internalNotify(QObject*, QEvent*) ()
#19 0xef8bda98 in QApplication::notify(QObject*, QEvent*) ()
#20 0x02be9720 in KApplication::notify(QObject*, QEvent*) ()
#21 0xef8afe5c in QEventLoop::activateTimers() ()
#22 0xef879b20 in QEventLoop::processEvents(unsigned) ()
#23 0xef8ccb98 in QEventLoop::enterLoop() ()
#24 0xef8cca84 in QEventLoop::exec() ()
#25 0x00002b4c in main ()
#26 0x00002628 in _start (argc=1, argv=0xbffffa08, envp=0xbffffa10) at /SourceCa
che/Csu/Csu-47/crt.c:267
#27 0x8fe1a58c in __dyld__dyld_start ()
Comment 1 Don Sanders 2004-04-14 08:45:17 UTC
Does removing the ~/.kde/share/apps/kmail/search/Last\ Search file 
enable you to start KMail again?

It looks like KMime is having trouble parsing this mail(/header).

Don.

Comment 2 Doug Burke 2004-04-14 14:41:33 UTC
Don,

Sorry I hadn't made the report clearer. If I remove the ".kde/share/apps/kmail/search/Last Search" file then I was able to re-start KMail.

I tried to tar up this folder so I could re-try the search; is there a way I can find out whch mail message is causing the problem [it's not a small folder so it would have to be an automatic method]?

Doug
Comment 3 Doug Burke 2004-04-14 21:50:23 UTC
Created attachment 5645 [details]
This email causes kmail to crash

Whilst not found during a search, the appearance of this mail in my inbox
causes kmail to crash. This is a real show stopper as you have to know which
file to manually delete in your inbox [or whatever folder it is].

I'll attatch the backtrace, but it appears similar to the previous crashes I
was seeing. Just to note that this email was not the cause of the original
crash I reported. I also slightly sanitized it by changing the recipients email
address (but I did check that this made no difference to the crash).
Comment 4 Doug Burke 2004-04-14 21:53:38 UTC
Created attachment 5647 [details]
backtract from kmail crash when it processes the email in the previous attatchment

This is the backtrace from kmail when it crashed whilst trying to process the
email in the previous attachement (#5645). The screen output from kmail looked
like:

: set Msg, force = true
khtml (part): DONE: 133
kmail: set Msg, force = true
khtml (part): DONE: 6
kmail: (42742, last 0) &#40;&#44305;??)ī??? ??ġ????????? twd ai pbc ????,
readyToShow true
kmail: set Msg, force = false
kmail: 
#######
#######
#######  parseMsg(KMMessage* aMsg == aMsg )
#######
#######
kmail: 
     ----->  First body part *was* found, filling the Mime Part Tree
kmail: 
	partNode::partNode()	  explicitType == DwMime::kTypeUnknown
kmail: 
kmail:	     Inserting one item into MimePartTree
kmail:		       Content-Type: multipart/alternative
kmail:	     Inserting one item into MimePartTree
kmail:		       Content-Type: text/html
kmail: partNode::findType() is looking at Multipart/Alternative
kmail: partNode::findType() is looking at Text/HTML
kmail: KMMessage::emailAddrAsAnchor('"????" <zanz5aooo0x0u@yahoo.co.kr>')
returns:
--><a
href="mailto:%22%3D%3Futf-8%3Fq%3F%3DC2%3DB0%3DC2%3DA8%3DC2%3DBB%3DC3%3DA7%3F%3D%22%20%3Czanz5aooo0x0u%40yahoo.co.kr%3E">&quot;????&quot;
&lt;zanz5aooo0x0u@yahoo.co.kr&gt;</a><--
kmail: KMMessage::emailAddrAsAnchor('xxxxxx@cfa.harvard.edu') returns:
--><a href="mailto:xxxxxx%40cfa.harvard.edu">xxxxxx@cfa.harvard.edu</a><--
kmail: 
**
** ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) **
**
kmail: partNode::findType() is looking at Text/HTML
kmail: partNode::findType() is looking at Text/HTML
kmail: 
**
** ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) **
**
kmime_codec_qp.cpp:285: failed assertion `mBadChar == 0'
*** KMail got signal 6 (Crashing)
DCOP: unregister 'kmail'
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = kmail path = <unknown> pid = 854
DCOP: register 'anonymous-855' -> number of clients is now 2
DCOP:  'anonymous-855' now known as 'drkonqi-855'
DCOP: unregister 'drkonqi-855'
Comment 5 Don Sanders 2004-04-15 06:52:39 UTC
I created a new folder containing the attached message, but I can't 
reproduce a crash. 

Maybe some information got lost, you might have to create a new 
folder, copy the message into that folder and then send me a 
compressed copy of that folder to make sure no information in the 
message got lost.

Also it's possible I can't produce this because i'm currently using 
intel rather than ppc.

Don.

Comment 6 Doug Burke 2004-04-15 16:20:32 UTC
I created a new top-level folder (in maildir format), saved the attatchemnt into this directory (using a name that was very similar to one from a different folder, as I don't know the rules for the file names). Then I started kmail, and everything was okay (as this new folder wasn't selected). Once I selected the new folder, I got the same behavior as above:

a) kmail crashed
b) in terminal from which I ran kmail, I see the following

kmime_codec_qp.cpp:285: failed assertion `mBadChar == 0' 
 *** KMail got signal 6 (Crashing) 
c) the backtrace looks exceedingly similar to the one already attatched.

Since I used the attatchment (id=5645) then I assume it's a processor/compiler/whatever issue and not due to information loss.

Comment 7 Don Sanders 2004-04-16 07:27:27 UTC
> Since I used the attatchment (id=5645) then I assume it's a
> processor/compiler/whatever issue and not due to information loss.

Ok. I have an OS X machine that I want to install the fink packages on 
but just haven't had time to do so yet. Now I have an additional 
incentive.

Don.

Comment 8 Ernest ter Kuile 2004-05-04 19:59:23 UTC
similar problem here. 

Kmail freezes after a second Search.

kill+restart freeze again. Screen is build up, but down in left corner the word "Initializing" never disappears.

Kmail version 1.6.2 using 3.2.2 (version is from debian/unstable)
version number in debian is 4:3.2.2-2

Can be repeated at will using content from same ~/.kde/.../kmail/search directory, but only tested at home.

resolved by moving ~/.kde/.../kmail/search dir to something else, and kmail restarts as normal. moving dir back and kmail freezes again.

no back trace (no crash)

tared ~/.kde/.../kmail/search directory renamed to search.freeze
attached below.

note: is on home pc. Is switched off at night, but usually switches itself back on at noon (GMT-1)

email for file if address above does not work: ernestjw at xs4all dot nl
Comment 9 Ernest ter Kuile 2004-05-04 20:03:58 UTC
Created attachment 5880 [details]
tar file of ~/.kde/.../kmail/search/
Comment 10 Ernest ter Kuile 2004-05-04 21:20:03 UTC
from previous part of my report:
> note: is on home pc. Is switched off at night, but usually switches
> itself back on at noon (GMT-1) 
>
> email for file if address above does not work: ernestjw at xs4all dot nl

euh, this part of the report was confusing (I should re-read before submitting) and also made irrelevant, as I managed to include tar file as attachment.

sorry about that.
Comment 11 Doug Burke 2004-06-07 17:59:31 UTC
Just to note that I still see this behavior (crash when selecting the folder containg the email) when using the 3.2.2-21 package of kmail from fink.
Comment 12 Till Adam 2004-07-18 16:13:13 UTC

*** This bug has been marked as a duplicate of 75001 ***