Version: 1.6 (using KDE KDE 3.2.0) Installed from: Compiled From Sources Compiler: gcc 3.3 APPLE version Darwin 7.2, OSX 10.3 OS: Other after starting up, I choose a message to display and ... kmail: ** ** ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) ** ** kmime_codec_qp.cpp:285: failed assertion `mBadChar == 0' *** KMail got signal 6 (Crashing)
Please attach the message to this bug report.
*** Bug 75123 has been marked as a duplicate of this bug. ***
Anyway I can help to troubleshoot this bug? I'd like to have kmail working on my machine too.
-I had to backtrack to KDE 3.1.x, there KMail works fine. -[The message cannot be displayed, its soo private.] -Will try again later with a clean recompile of KDE 3.2 from newest sources (CVS?), 3.1.x should be removed completely prior to that.
A backtrace of the crash might provide some insights. You should compile with full debug information (i.e. configure with --enable-debug=full) in order to get a useful backtrace. Also please try to create a non-private test message.
Strange, but for me after re-compiling kdepim with full debug support, I got kmail come up without a problem. Can provide an output from 'kmail' command if someone is interested.
Still crashes in version 3.2.1, OS X 10.3, compiled from fink, same error as Alexander Diemand was experiencing... Specifically compiled kdepim and kdelibs with --enable-debug=full and it didn't stop crashing. Same email does NOT make kmail crash on gentoo box with 3.2.1 installed. Including both trace, console output and email message that was making it crash It seems to crash when displaying non-us emails and spam.
Created attachment 5471 [details] Backtrace that kmail generates after crashing, Kde 3.2.1, OS X 10.3, Fink This is the backtrace that kmail generates after crashing with signal 6 Error: kmime_codec_qp.cpp:285: failed assertion `mBadChar == 0' *** KMail got signal 6 (Crashing)
Created attachment 5472 [details] Console output that kmail generates during the crash. Compiled kdepim and kdelibs with --enable-debug=full
Created attachment 5473 [details] Email that makes kmail crash Kde 3.2.1, OS X 10.3, compiled from source using fink
I have exactly the same problem like Alexander. It looks like a problem with mimetypes. ciao chris <-------snip-------konsole---------> kmail: ** ** ObjectTreeParser::parseObjectTree( node OK, showOnlyOneMimePart: FALSE ) ** ** kmail: partNode::findType() is looking at Text/Plain kmail: partNode::findType() is looking at Text/HTML kmail: partNode::findType() is looking at Text/Plain 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 = 16048 QSettings::sync: filename is null/empty DCOP: register 'anonymous-16062' -> number of clients is now 1 DCOP: 'anonymous-16062' now known as 'drkonqi-16062' DCOP: unregister 'drkonqi-16062' DCOPServer : slotTerminate() -> sending terminateKDE signal. klauncher: KLauncher::process ---> terminateKDE Mutex destroy failure: Device busy kdeinit: PID 16055 terminated. kdeinit: terminate KDE. DCOP: unregister 'klauncher' DCOPServer : slotSuicide() -> exit. ICE default IO error handler doing an exit(), pid = 16061, errno = 0 ICE default IO error handler doing an exit(), pid = 16057, errno = 0 <---------snip-------backtrace log--------------> Reading symbols for shared libraries ................................................ done Attaching to program: `/sw/bin/kmail', process 6699. Reading symbols for shared libraries ++++++++++++++++++++++++++................................................................ done 0x900315a4 in wait4 () #0 0x900315a4 in wait4 () #1 0x0288b7c0 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 const*, bool) const () #8 0x010d30e0 in KMMessagePart::bodyDecoded() const () #9 0x01187b40 in KMail::ObjectTreeParser::processTextPlainSubtype(partNode*, KMail::ProcessResult&) () #10 0x01182ca8 in KMail::ObjectTreeParser::parseObjectTree(partNode*) () #11 0x011884f8 in KMail::ObjectTreeParser::stdChildHandling(partNode*) () #12 0x011887bc in KMail::ObjectTreeParser::processMultiPartAlternativeSubtype(partNode*, KMail::ProcessResult&) () #13 0x01182ca8 in KMail::ObjectTreeParser::parseObjectTree(partNode*) () #14 0x010b6030 in KMReaderWin::parseMsg(KMMessage*) () #15 0x010b501c in KMReaderWin::displayMessage() () #16 0x010b4b40 in KMReaderWin::updateReaderWin() () #17 0x010bba70 in KMReaderWin::qt_invoke(int, QUObject*) () #18 0xefa359e0 in QObject::activate_signal(QConnectionList*, QUObject*) () #19 0xefa358c8 in QObject::activate_signal(int) () #20 0xefa4f018 in QTimer::event(QEvent*) () #21 0xef9f0ea0 in QApplication::internalNotify(QObject*, QEvent*) () #22 0xef9f0a98 in QApplication::notify(QObject*, QEvent*) () #23 0x0280a720 in KApplication::notify(QObject*, QEvent*) () #24 0xef9e2e5c in QEventLoop::activateTimers() () #25 0xef9acb20 in QEventLoop::processEvents(unsigned) () #26 0xef9ffb98 in QEventLoop::enterLoop() () #27 0xef9ffa84 in QEventLoop::exec() () #28 0x00002b4c in main () #29 0x00002628 in _start (argc=1, argv=0xbffffcf0, envp=0xbffffcf8) at /SourceCache/Csu/Csu-46/crt.c:267 #30 0x0000249c in start ()
*** Bug 79500 has been marked as a duplicate of this bug. ***
*** Bug 80693 has been marked as a duplicate of this bug. ***
I've been working on packaging KDE 3.3 for Fink, and this still occurs. Is there anything I can do, debug-wise, that would help track this down? I'm hesitant to release an update until we can figure this out...
Yes! I would like to come back and work with kmail. The problem is with some hacks in the file: KDE_CVS/kdepim/libkdenetwork/kmime_codec_qp.cpp in member function: QuotedPrintableDecoder::decode where they try to filter out control chars by setting a flag named "mBadChar" to the value of the evil character and then make sure that this flag is still equal to '0' before any output (assert). I never managed to get the CVS version to compile, so debugging was not that successfull. But if someone with a decent setup of KDE sources and experiences in this area could just try this and tweak the logic around "mBadChar"; it would be of tremendous help. Could an overflow of an "unsigned char" assignment be the source of all problems?
I can confirm this still happens with KDE 3.3.1 on Mac OS X. I tried looking into the kmime_codec_qp.cpp code but I'm not that much of a coder, it's beyond me. =) KMail is pretty useless currently on OSX with this error. I don't suppose anyone has something to try? I'd be happy to help test any changes... I'd pay money to get this bug fixed, if that helps any. ;)
What happens if you simply comment out the assert( mBadChar == 0 ) in kmime_codec_qp.cpp?
Ok, as already mentioned, I can't reproduce this on Linux/x86. If one of the reporters with a PPC (Mac) could run KMail from the debugger and set breakpoints on the three statements in kmime_codec_qp.cpp that assign to mBadChar (not counting the initialisation in the Decoder constructor), and execute the following commands in gdb if the breakpoint is hit: gdb> print ch gdb> print scursor-3 gdb> next # to execute the "mBadChar = ch" line gdb> print mBadChar This would be very much appreciated. Note: these lines are _never_ hit in my installation. You can also experiment with declaring mBadChar to be of type "unsigned char" instead of "char".
On Sunday 24 October 2004 05:14, you wrote: <snip> > I'm compiling the latest 3.3.1 version so i can reproduce the crash. > Would you mind posting step-by-step debugger instructions that you > want us to do, because i'm not familiar with gdb at all... Or you can > ssh/vnc to my box and try to do it yourself... <snip> In libkdenetwork/kmime_codec_qp.cpp, there are three lines in which "ch" is assigned to "mBadChar": mBadChar = ch; Please precede each of those with these lines: kdDebug() << "Setting mBadChar to " << int(ch) << endl; kdDebug() << "here: \"" << QCString( scursor - 3, 10 ) << "\"" << endl; and add kdDebug() << "mBadChar is really: " << int(mBadChar) << endl; after the mBadChar = ch; line Then recompile and attach the debug output to the bugreport. If you get an compile error, add #include <kdebug.h> to the top of kmime_codec_qp.cpp. Thanks, Marc
I did your changes, but apparently it never got that far: kmime_codec_qp.cpp:285: failed assertion `mBadChar == 0' 285 is the assert *before* the mInsideHexChar check.
also, changing it to unsigned char did not help. Before that first assert, I put the kdDebug line, and ended up with this in the logs: kmail: mBadChar is: 209 kmime_codec_qp.cpp:286: failed assertion `mBadChar == 0'
*** Bug 79274 has been marked as a duplicate of this bug. ***
Created attachment 8314 [details] patch that fixes attached is a patch from Luis Pedro that seems to fix the issue (it works for me, at least, on my 10.3 box with KDE 3.3.1)
Hmm, if this patch really fixes the problem then this smells a lot like a compiler bug (on Mac OS X). I think I remember a similar fix quite some time ago. Since it's better to have an application that doesn't crash on some architectures than to save a few bits of memory, please commit the fix. I guess the second part of the patch (adding of assert(mAccu == 0);) isn't part of the patch, so please don't commit this part. If someone with a PPC has time to investigate this problem it would probably be good to report this problem to the gcc people.
How does one implement this patch? Are there some really simple instructions? Thanks, Brian On Nov 17, 2004, at 7:47 AM, Benjamin Reed wrote: > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. > > http://bugs.kde.org/show_bug.cgi?id=75001 > > > > > ------- Additional Comments From ranger befunk com 2004-11-17 15:47 > ------- > Created an attachment (id=8314) > --> (http://bugs.kde.org/attachment.cgi?id=8314&action=view) > patch that fixes > > attached is a patch from Luis Pedro that seems to fix the issue (it > works for > me, at least, on my 10.3 box with KDE 3.3.1) >
you have to checkout the source via cvs and apply the patch via patch < filename. After that you can start compiling. (see also: http://folk.uio.no/bro/anoncvs.html you ony have to build the module kdepim). But it can go terribly wrong, so use a test machine...
CVS commit by tilladam: Since it appears to fix a crash on OSX and doesn't hurt much ... BUG: 75001 M +5 -5 kmime_codec_qp.cpp 1.14 --- kdepim/libkmime/kmime_codec_qp.cpp #1.13:1.14 @@ -126,9 +126,9 @@ class QuotedPrintableDecoder : public De saw the first nibble '=X' */ - const bool mQEncoding : 1; - bool mInsideHexChar : 1; - bool mFlushing : 1; - bool mExpectLF : 1; - bool mHaveAccu : 1; + const bool mQEncoding; + bool mInsideHexChar; + bool mFlushing; + bool mExpectLF; + bool mHaveAccu; protected: friend class QuotedPrintableCodec;