<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>132008</bug_id>
          
          <creation_ts>2006-08-07 14:25:47 +0000</creation_ts>
          <short_desc>Kmail crashes on startup in partNode::findType (partNode.cpp:401)</short_desc>
          <delta_ts>2007-09-14 12:17:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>Unmaintained</classification>
          <product>kmail</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Gentoo Packages</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Naga">nagatoro</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>krzysztof_opyrchal</cc>
    
    <cc>w.richert</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>458649</commentid>
    <comment_count>0</comment_count>
    <who name="Naga">nagatoro</who>
    <bug_when>2006-08-07 14:25:47 +0000</bug_when>
    <thetext>Version:           3.5.4 (using KDE KDE 3.5.3)
Installed from:    Gentoo Packages
Compiler:          x86_64-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1) 
OS:                Linux

When starting Kmail (or Kontact) I get this crash on startup. Or rather when Kmail is searching for new messages from the IMAP server.

Backtrace:
======
Using host libthread_db library &quot;/lib/libthread_db.so.1&quot;.
[Thread debugging using libthread_db enabled]
[New Thread 47580678487856 (LWP 26655)]
[New Thread 1107310928 (LWP 26698)]
[New Thread 1098918224 (LWP 26697)]
[New Thread 1090525520 (LWP 26696)]
[New Thread 1082132816 (LWP 26695)]
[KCrash handler]
#5  partNode::findType (this=0x0, type=2, subType=1, deep=true, wide=false)
    at partNode.cpp:401
#6  0x00002b4636dfa84b in KMMessage::parseTextStringFromDwPart (
    this=&lt;value optimized out&gt;, root=0x0, parsedString=@0x7fff74260040, 
    codec=@0x7fff74260078, isHTML=@0x7fff7426010f) at kmmessage.cpp:718
#7  0x00002b4636dfa9e2 in KMMessage::asPlainText (this=0x0, 
    aStripSignature=false, allowDecryption=false) at kmmessage.cpp:739
#8  0x00002b4636dfb1f2 in KMMsgIndex::addMessage (this=0xbf21e0, serNum=0)
    at index.cpp:294
#9  0x00002b4636dfb41b in KMMsgIndex::act (this=0xbf21e0) at index.cpp:318
#10 0x00002b4636dfb752 in KMMsgIndex::qt_invoke (this=0xbf21e0, _id=7, 
    _o=0x7fff74260300) at index.moc:123
#11 0x00002b463b14b6ec in QObject::activate_signal (this=0xb8f1d0, 
    clist=&lt;value optimized out&gt;, o=0x7fff74260300) at kernel/qobject.cpp:2356
#12 0x00002b463b14c393 in QObject::activate_signal (this=0x0, 
    signal=&lt;value optimized out&gt;) at kernel/qobject.cpp:2325
#13 0x00002b463b16a975 in QTimer::event (this=0xb8f1d0, e=0x2)
    at kernel/qtimer.cpp:219
#14 0x00002b463b0f55f5 in QApplication::internalNotify (
    this=&lt;value optimized out&gt;, receiver=0xb8f1d0, e=0x7fff742605a0)
    at kernel/qapplication.cpp:2635
#15 0x00002b463b0f61f7 in QApplication::notify (this=0x7fff74260800, 
    receiver=0xb8f1d0, e=0x7fff742605a0) at kernel/qapplication.cpp:2358
#16 0x00002b463a559ba0 in KApplication::notify (this=0x7fff74260800, 
    receiver=0xb8f1d0, event=0x7fff742605a0) at kapplication.cpp:550
#17 0x00002b463b0ebd32 in QEventLoop::activateTimers (
    this=&lt;value optimized out&gt;) at kernel/qapplication.h:496
#18 0x00002b463b0acf12 in QEventLoop::processEvents (this=0x5f4410, flags=0)
    at kernel/qeventloop_x11.cpp:389
#19 0x00002b463b109dd2 in QEventLoop::enterLoop (this=0x0)
    at kernel/qeventloop.cpp:198
#20 0x00002b463b109c82 in QEventLoop::exec (this=0x0)
    at kernel/qeventloop.cpp:145
#21 0x0000000000402c9d in main (argc=&lt;value optimized out&gt;, 
    argv=&lt;value optimized out&gt;) at main.cpp:110
#22 0x00002b463d4f1134 in __libc_start_main (main=0x402b60 &lt;main&gt;, argc=1, 
    ubp_av=0x7fff74260cd8, init=&lt;value optimized out&gt;, 
    fini=&lt;value optimized out&gt;, rtld_fini=&lt;value optimized out&gt;, 
    stack_end=0x7fff74260cc8) at libc-start.c:238
#23 0x0000000000402a29 in _start ()
Current language:  auto; currently c

======</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458655</commentid>
    <comment_count>1</comment_count>
    <who name="Tommi Tervo">tommi.tervo</who>
    <bug_when>2006-08-07 14:49:15 +0000</bug_when>
    <thetext>*** Bug 126161 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458884</commentid>
    <comment_count>2</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2006-08-08 02:35:08 +0000</bug_when>
    <thetext>SVN commit 570894 by winterz:

Possible fix for bug#132008.

If you can compile yourself it would be great if you could test.
Else, you&apos;ll need to wait until KDE 3.5.5 to see if it works for you.

BUGS: 132008


 M  +3 -1      kmmessage.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmmessage.cpp #570893:570894
@@ -706,6 +706,8 @@
                                            const QTextCodec*&amp; codec,
                                            bool&amp; isHTML ) const
 {
+  if ( !root ) return;
+
   isHTML = false;
   // initialy parse the complete message to decrypt any encrypted parts
   {
@@ -3819,7 +3821,7 @@
 //-----------------------------------------------------------------------------
 QCString KMMessage::charset() const
 {
-  if ( mMsg-&gt;Headers().HasContentType() ) {  
+  if ( mMsg-&gt;Headers().HasContentType() ) {
     DwMediaType &amp;mType=mMsg-&gt;Headers().ContentType();
     mType.Parse();
     DwParameter *param=mType.FirstParameter();
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>458931</commentid>
    <comment_count>3</comment_count>
    <who name="Naga">nagatoro</who>
    <bug_when>2006-08-08 07:08:48 +0000</bug_when>
    <thetext>Sorry to say this but it seems like it now crashes further down :(

Using host libthread_db library &quot;/lib/libthread_db.so.1&quot;.
[Thread debugging using libthread_db enabled]
[New Thread 47925711609648 (LWP 26346)]
[New Thread 1107310928 (LWP 26352)]
[New Thread 1098918224 (LWP 26351)]
[New Thread 1090525520 (LWP 26350)]
[New Thread 1082132816 (LWP 26349)]
[KCrash handler]
#5  KMMessage::asPlainText (this=0x0, aStripSignature=false, 
    allowDecryption=false) at kmmessage.cpp:743
#6  0x00002b968c735222 in KMMsgIndex::addMessage (this=0xbf2340, serNum=0)
    at index.cpp:294
#7  0x00002b968c73544b in KMMsgIndex::act (this=0xbf2340) at index.cpp:318
#8  0x00002b968c735782 in KMMsgIndex::qt_invoke (this=0xbf2340, _id=7, 
    _o=0x7fff1e9269d0) at index.moc:123
#9  0x00002b9690a856ec in QObject::activate_signal (this=0xbee2b0, 
    clist=&lt;value optimized out&gt;, o=0x7fff1e9269d0) at kernel/qobject.cpp:2356
#10 0x00002b9690a86393 in QObject::activate_signal (this=0x0, 
    signal=&lt;value optimized out&gt;) at kernel/qobject.cpp:2325
#11 0x00002b9690aa4975 in QTimer::event (this=0xbee2b0, e=0x0)
    at kernel/qtimer.cpp:219
#12 0x00002b9690a2f5f5 in QApplication::internalNotify (
    this=&lt;value optimized out&gt;, receiver=0xbee2b0, e=0x7fff1e926c70)
    at kernel/qapplication.cpp:2635
#13 0x00002b9690a301f7 in QApplication::notify (this=0x7fff1e926ed0, 
    receiver=0xbee2b0, e=0x7fff1e926c70) at kernel/qapplication.cpp:2358
#14 0x00002b968fe93ba0 in KApplication::notify (this=0x7fff1e926ed0, 
    receiver=0xbee2b0, event=0x7fff1e926c70) at kapplication.cpp:550
#15 0x00002b9690a25d32 in QEventLoop::activateTimers (
    this=&lt;value optimized out&gt;) at kernel/qapplication.h:496
#16 0x00002b96909e6f12 in QEventLoop::processEvents (this=0x5f4410, flags=0)
    at kernel/qeventloop_x11.cpp:389
#17 0x00002b9690a43dd2 in QEventLoop::enterLoop (this=0x0)
    at kernel/qeventloop.cpp:198
#18 0x00002b9690a43c82 in QEventLoop::exec (this=0x0)
    at kernel/qeventloop.cpp:145
#19 0x0000000000402c9d in main (argc=&lt;value optimized out&gt;, 
    argv=&lt;value optimized out&gt;) at main.cpp:110
#20 0x00002b9692e2b134 in __libc_start_main (main=0x402b60 &lt;main&gt;, argc=1, 
    ubp_av=0x7fff1e9273a8, init=&lt;value optimized out&gt;, 
    fini=&lt;value optimized out&gt;, rtld_fini=&lt;value optimized out&gt;, 
    stack_end=0x7fff1e927398) at libc-start.c:238
#21 0x0000000000402a29 in _start ()
Current language:  auto; currently c
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>459029</commentid>
    <comment_count>4</comment_count>
    <who name="Naga">nagatoro</who>
    <bug_when>2006-08-08 16:08:22 +0000</bug_when>
    <thetext>note: a workaround until I stumble upon the offending message I guess is to delete kmailrc and recreate the accounts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>459030</commentid>
    <comment_count>5</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2006-08-08 16:11:02 +0000</bug_when>
    <thetext>SVN commit 571073 by winterz:

Another attempt at fixing this bug.

BUGS: 132008


 M  +1 -0      kmmessage.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmmessage.cpp #571072:571073
@@ -738,6 +738,7 @@
   const QTextCodec * codec = 0;
 
   partNode * root = partNode::fromMessage( this );
+  if ( !root ) return QString::null;
   parseTextStringFromDwPart( root, parsedString, codec, isHTML );
   delete root;
 
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>459067</commentid>
    <comment_count>6</comment_count>
    <who name="Naga">nagatoro</who>
    <bug_when>2006-08-08 18:49:41 +0000</bug_when>
    <thetext>This one did it.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>459068</commentid>
    <comment_count>7</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2006-08-08 18:50:55 +0000</bug_when>
    <thetext>Great.
Thanks for helping to test.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>470763</commentid>
    <comment_count>8</comment_count>
    <who name="Philip Rodrigues">phil</who>
    <bug_when>2006-09-18 11:14:00 +0000</bug_when>
    <thetext>*** Bug 134255 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>