<?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>140660</bug_id>
          
          <creation_ts>2007-01-26 12:57:11 +0000</creation_ts>
          <short_desc>Crash and data loss after applying filters</short_desc>
          <delta_ts>2007-06-27 16:49:31 +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>filtering</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>135376</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>grave</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philippe">animimotus</reporter>
          <assigned_to name="kdepim bugs">pim-bugs-null</assigned_to>
          <cc>aezekowitz</cc>
    
    <cc>csights</cc>
    
    <cc>david</cc>
    
    <cc>jonathan.anderson</cc>
    
    <cc>lambdae2</cc>
    
    <cc>m.debruijne</cc>
    
    <cc>mail</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>65</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>504147</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-01-26 12:57:11 +0000</bug_when>
    <thetext>Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

Os : kubuntu Edgy
Kde : 3.5.6 since yesterday
kmail crash before on kde 3.5.5 : rare
kmail crash now on kde 3.5.6 : always !

How to reproduce it :
- I go in inbox
- I select all mails by a [ctrl + a]
- apply rules by a [ctrl + j]
- mails are scanned and kontact crash entirely when scan is past

A made and test it severals times.

4 times later :p :
- in inbox a have til 4 occurences of most of each mails
- I made a [ctrl + *] for delete all double messages
- kmail inform me it have found many double message and delete them
- now when a stand on any mail (I read it in the preview windows), each mail becomes EMPTY !

No sender, no date, no body, no title, I Have lot all my mail !

I had made a backup for ~/.kde/ then a restore all the mail in the defaut location.

The history repeat again, in first point... :|</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504151</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-01-26 13:08:49 +0000</bug_when>
    <thetext>(no debugging symbols found)
Using host libthread_db library &quot;/lib/tls/i686/cmov/libthread_db.so.1&quot;.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1242146000 (LWP 6231)]
[New Thread -1285076064 (LWP 6247)]
[New Thread -1276683360 (LWP 6246)]
[New Thread -1268290656 (LWP 6245)]
[New Thread -1259897952 (LWP 6244)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0xb516ab69 in KMFolder::find () from /usr/lib/libkmailprivate.so
#7  0xb53cf6ec in KMHeaders::applyFiltersOnMsg ()
   from /usr/lib/libkmailprivate.so
#8  0xb516e92a in KMMainWidget::slotApplyFilters ()
   from /usr/lib/libkmailprivate.so
#9  0xb546004e in KMMainWidget::qt_invoke () from /usr/lib/libkmailprivate.so
#10 0xb6fd6957 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#11 0xb6fd73fc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#12 0xb67ec069 in KAction::activated () from /usr/lib/libkdeui.so.4
#13 0xb6824842 in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#14 0xb68f1e4f in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#15 0xb6fd6957 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#16 0xb6fd73fc in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#17 0xb75b11f9 in KAccelPrivate::menuItemActivated ()
   from /usr/lib/libkdecore.so.4
#18 0xb7600897 in KAccelPrivate::emitActivatedSignal ()
   from /usr/lib/libkdecore.so.4
#19 0xb76827fe in KAccelPrivate::eventFilter () from /usr/lib/libkdecore.so.4
#20 0xb6fd5f04 in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#21 0xb6fd5f82 in QObject::event () from /usr/lib/libqt-mt.so.3
#22 0xb700d65b in QWidget::event () from /usr/lib/libqt-mt.so.3
#23 0xb6f6db88 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#24 0xb6f6fb58 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#25 0xb7675c82 in KApplication::notify () from /usr/lib/libkdecore.so.4
#26 0xb760c757 in KAccelEventHandler::x11Event ()
   from /usr/lib/libkdecore.so.4
#27 0xb76740b3 in KApplication::x11EventFilter ()
   from /usr/lib/libkdecore.so.4
#28 0xb6eec2d3 in qt_set_x11_event_filter () from /usr/lib/libqt-mt.so.3
#29 0xb6efca62 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#30 0xb6f14320 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#31 0xb6f8825e in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#32 0xb6f8806e in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#33 0xb6f6f731 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#34 0x08061095 in ?? ()
#35 0xbfaa643c in ?? ()
#36 0x00000001 in ?? ()
#37 0x00000001 in ?? ()
#38 0x00000000 in ?? ()</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504152</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-01-26 13:10:49 +0000</bug_when>
    <thetext>***************************************************
KMail Version 1.9.6 in KDE 3.5.6 for Ubuntu package
***************************************************</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504158</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-01-26 13:21:19 +0000</bug_when>
    <thetext>Sure, it&apos;s a CRITICAL bug, it delete all the mails :)
(sorry I can&apos;t edit me, it&apos;s my first buf report)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504164</commentid>
    <comment_count>4</comment_count>
    <who name="Juan Carlos Torres">carlosdgtorres</who>
    <bug_when>2007-01-26 13:49:04 +0000</bug_when>
    <thetext>I can confirm this behavior, using KDE 3.5.6, compiled from SVN/branches:

Using host libthread_db library &quot;/lib/tls/i686/cmov/libthread_db.so.1&quot;.
[Thread debugging using libthread_db enabled]
[New Thread -1243637280 (LWP 29301)]
[New Thread -1286014048 (LWP 29433)]
[New Thread -1277621344 (LWP 29432)]
[New Thread -1269228640 (LWP 29431)]
[New Thread -1260835936 (LWP 29430)]
[KCrash handler]
#6  0xb515df3d in KMFolder::find (this=0x6f5f7265, msg=0x97ae1c0)
    at /home/jucato/kde/src/kdepim/kmail/kmfolder.cpp:429
#7  0xb51224ce in KMHeaders::applyFiltersOnMsg (this=0x8382388)
    at /home/jucato/kde/src/kdepim/kmail/kmheaders.cpp:1378
#8  0xb52b8566 in KMMainWidget::slotApplyFilters (this=0x8377dc8)
    at /home/jucato/kde/src/kdepim/kmail/kmmainwidget.cpp:1668
#9  0xb52d08be in KMMainWidget::qt_invoke (this=0x8377dc8, _id=122, 
    _o=0xbfe2cdc8) at ./kmmainwidget.moc:575
#10 0xb64e1ded in QObject::activate_signal ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#11 0xb64e29fd in QObject::activate_signal ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#12 0xb6e2ffd8 in KAction::activated (this=0x842f4f8) at ./kaction.moc:176
#13 0xb6e3083c in KAction::slotActivated (this=0x842f4f8)
    at /home/jucato/kde/src/kdelibs/kdeui/kaction.cpp:1102
#14 0xb6e30e73 in KAction::qt_invoke (this=0x842f4f8, _id=15, _o=0xbfe2ced8)
    at ./kaction.moc:218
#15 0xb64e1ded in QObject::activate_signal ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#16 0xb64e29fd in QObject::activate_signal ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#17 0xb6b901c0 in KAccelPrivate::menuItemActivated (this=0x836ee40)
    at ./kaccelprivate.moc:110
#18 0xb6b9174f in KAccelPrivate::emitActivatedSignal (this=0x836ee40, 
    pAction=0x855a2c8) at /home/jucato/kde/src/kdelibs/kdecore/kaccel.cpp:400
#19 0xb6b91e53 in KAccelPrivate::eventFilter (this=0x836ee40, 
    pEvent=0xbfe2d2ec) at /home/jucato/kde/src/kdelibs/kdecore/kaccel.cpp:370
#20 0xb64e16fc in QObject::activate_filters ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#21 0xb64e176b in QObject::event ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#22 0xb651a04c in QWidget::event ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#23 0xb6483d57 in QApplication::internalNotify ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#24 0xb6484f49 in QApplication::notify ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#25 0xb6b1291f in KApplication::notify (this=0xbfe2d774, receiver=0x8382388, 
    event=0xbfe2d2ec)
    at /home/jucato/kde/src/kdelibs/kdecore/kapplication.cpp:550
#26 0xb77f0cc1 in QApplication::sendEvent (receiver=0x8382388, 
    event=0xbfe2d2ec) at /home/jucato/kde/qt-copy/include/qapplication.h:496
#27 0xb6b92c49 in KAccelEventHandler::x11Event (this=0x8117b40, 
    pEvent=0xbfe2d638) at /home/jucato/kde/src/kdelibs/kdecore/kaccel.cpp:144
#28 0xb6b134fd in KAppX11HackWidget::publicx11Event (this=0x8117b40, 
    e=0xbfe2d638)
    at /home/jucato/kde/src/kdelibs/kdecore/kapplication.cpp:1651
#29 0xb6b097fb in KApplication::x11EventFilter (this=0xbfe2d774, 
    _event=0xbfe2d638)
    at /home/jucato/kde/src/kdelibs/kdecore/kapplication.cpp:1721
#30 0xb6414ca4 in qt_x11EventFilter ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#31 0xb6423e19 in QApplication::x11ProcessEvent ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#32 0xb6434914 in QEventLoop::processEvents ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#33 0xb649a520 in QEventLoop::enterLoop ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#34 0xb649a3e6 in QEventLoop::exec ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#35 0xb64839bf in QApplication::exec ()
   from /home/jucato/kde/qt-copy/lib/libqt-mt.so.3
#36 0x0805c557 in main (argc=1, argv=0xbfe2d904)
    at /home/jucato/kde/src/kdepim/kontact/src/main.cpp:163
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504166</commentid>
    <comment_count>5</comment_count>
    <who name="Juan Carlos Torres">carlosdgtorres</who>
    <bug_when>2007-01-26 14:05:13 +0000</bug_when>
    <thetext>This only happens when KMail is used inside Kontact. Can&apos;t reproduce it when running KMail standalone.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504167</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-01-26 14:14:35 +0000</bug_when>
    <thetext>I have forgot to tell, it&apos;s for maildir and pop3 accounts</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504169</commentid>
    <comment_count>7</comment_count>
    <who name="Tommi Tervo">tommi.tervo</who>
    <bug_when>2007-01-26 14:20:20 +0000</bug_when>
    <thetext>Lifting severity due to data loss</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504274</commentid>
    <comment_count>8</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2007-01-26 21:53:16 +0000</bug_when>
    <thetext>Hi,

I have a possible patch that might fix this problem.  Is anyone here able to build from sources and willing to test this patch?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504305</commentid>
    <comment_count>9</comment_count>
    <who name="Stefan Werner">dustbln</who>
    <bug_when>2007-01-27 00:18:56 +0000</bug_when>
    <thetext>can also confirm it with recent 3.5.6 gentoo ebuild. did not happen with latest 3.5.5 version.

kmail (alone or with kontact) crashes if you do something with filtering. it&apos;s enough to have just a &quot;* &gt; run command: true&quot; rule to crash it after some mails have been filtered. random (seems to be) but reproducible within minutes. does happen in local and dimap folders (at least for me).
sorry that I got no backtrace

I read something about a obscure background filtering feature in this release and about some possible problems with threading... maybe thats the reason, I can&apos;t really find exact information about it and am not into the code

any help/patch would be great :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504309</commentid>
    <comment_count>10</comment_count>
      <attachid>19431</attachid>
    <who name="Allen Winter">winter</who>
    <bug_when>2007-01-27 00:23:27 +0000</bug_when>
    <thetext>Created attachment 19431
patch to attempt fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504354</commentid>
    <comment_count>11</comment_count>
    <who name="Stefan Werner">dustbln</who>
    <bug_when>2007-01-27 02:39:32 +0000</bug_when>
    <thetext>tried it, looks way better... still crashes if you select to many mails, but reasonable numbers are working (~100). only did a brief test, will check tomorrow again</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504394</commentid>
    <comment_count>12</comment_count>
    <who name="Stefan Werner">dustbln</who>
    <bug_when>2007-01-27 10:21:16 +0000</bug_when>
    <thetext>Still no problems after some heavy filter tests

Btw: I also had the experience of doubled and empty mails after each crash, so that looks to be quite common for that problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504455</commentid>
    <comment_count>13</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2007-01-27 15:53:16 +0000</bug_when>
    <thetext>Good news.
So I will commit the patch and also ask the distribution packagers to include it in a KDE 3.5.6 update.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>504457</commentid>
    <comment_count>14</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2007-01-27 16:04:44 +0000</bug_when>
    <thetext>SVN commit 627641 by winterz:

Fix for the grave bug &quot;kmail crash when I make a CTRL + J in inbox&quot;

BUGS: 140660


 M  +2 -2      kmfolder.cpp  


--- branches/KDE/3.5/kdepim/kmail/kmfolder.cpp #627640:627641
@@ -426,12 +426,12 @@
 
 int KMFolder::find( const KMMsgBase* msg ) const
 {
-  return mStorage-&gt;find( msg );
+  return mStorage ? mStorage-&gt;find( msg ) : 0;
 }
 
 int KMFolder::find( const KMMessage* msg ) const
 {
-  return mStorage-&gt;find( msg );
+  return mStorage ? mStorage-&gt;find( msg ) : 0;
 }
 
 int KMFolder::count( bool cache ) const
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>505237</commentid>
    <comment_count>15</comment_count>
    <who name="Altmenorg">anthony.mercatante</who>
    <bug_when>2007-01-30 17:23:30 +0000</bug_when>
    <thetext>I wouldn&apos;t say that&apos;s resolved...
CTRL+J issue now works, true, but if you select a big ammount of mails (I just tested with ~300) it still crashes, and corrupts the datas.
I just lost all the mails I received the past 15 days on an imap account, with the exact same behavior seen before the patch was released.
The only difference is that the number of emails scanned changed, from 1 to a big number.
Can you please reopen the bug if that confirm Stefan Werner&apos;s post ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>507432</commentid>
    <comment_count>16</comment_count>
    <who name="Allen Winter">winter</who>
    <bug_when>2007-02-07 19:22:19 +0000</bug_when>
    <thetext>SVN commit 631330 by winterz:

possible fix to &quot; kmail crash when I make a CTRL + J in inbox &quot;
CCBUG: 140660

would appreciate people testing this.
find a folder with about 500 or messages.
select all messages
apply all filters (ctrl+j)


 M  +2 -1      branches/work/kdepim-3.5.5+/kmail/folderstorage.cpp  
 M  +2 -2      branches/work/kdepim-3.5.5+/kmail/kmfolder.cpp  
 M  +15 -14    branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp  


--- branches/work/kdepim-3.5.5+/kmail/folderstorage.cpp #631329:631330
@@ -451,7 +451,8 @@
     if (msg-&gt;parent())
     {
       int idx = msg-&gt;parent()-&gt;find(msg);
-      take(idx);
+      if ( idx &gt;= 0 )
+        take(idx);
     }
   }
 }
--- branches/work/kdepim-3.5.5+/kmail/kmfolder.cpp #631329:631330
@@ -426,12 +426,12 @@
 
 int KMFolder::find( const KMMsgBase* msg ) const
 {
-  return mStorage ? mStorage-&gt;find( msg ) : 0;
+  return mStorage ? mStorage-&gt;find( msg ) : -1;
 }
 
 int KMFolder::find( const KMMessage* msg ) const
 {
-  return mStorage ? mStorage-&gt;find( msg ) : 0;
+  return mStorage ? mStorage-&gt;find( msg ) : -1;
 }
 
 int KMFolder::count( bool cache ) const
--- branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp #631329:631330
@@ -1380,8 +1380,9 @@
     HeaderItem *nextItem = prepareMove( &amp;contentX, &amp;contentY );
 
     KMMessageList* msgList = selectedMsgs();
-    if (msgList-&gt;isEmpty())
+    if (msgList-&gt;count() &lt; 1)
       return;
+
     finalizeMove( nextItem, contentX, contentY );
 
     CREATE_TIMER(filter);
@@ -1404,20 +1405,20 @@
         KApplication::kApplication()-&gt;eventLoop()-&gt;processEvents( QEventLoop::ExcludeUserInput, 50 );
       }
       int idx = msgBase-&gt;parent()-&gt;find(msgBase);
-      assert(idx != -1);
-      KMMessage * msg = msgBase-&gt;parent()-&gt;getMsg(idx);
-      if (msg-&gt;transferInProgress()) continue;
-      msg-&gt;setTransferInProgress(true);
-      if ( !msg-&gt;isComplete() )
-      {
-        FolderJob *job = mFolder-&gt;createJob(msg);
-        connect(job, SIGNAL(messageRetrieved(KMMessage*)),
-                     SLOT(slotFilterMsg(KMMessage*)));
-        job-&gt;start();
-      } else {
-        if (slotFilterMsg(msg) == 2) break;
+      if ( idx &gt;= 0 ) {
+        KMMessage * msg = msgBase-&gt;parent()-&gt;getMsg(idx);
+        if (msg-&gt;transferInProgress()) continue;
+        msg-&gt;setTransferInProgress(true);
+        if ( !msg-&gt;isComplete() ) {
+          FolderJob *job = mFolder-&gt;createJob(msg);
+          connect(job, SIGNAL(messageRetrieved(KMMessage*)),
+                  SLOT(slotFilterMsg(KMMessage*)));
+          job-&gt;start();
+        } else {
+          if (slotFilterMsg(msg) == 2) break;
+        }
+        progressItem-&gt;incCompletedItems();
       }
-      progressItem-&gt;incCompletedItems();
     }
     progressItem-&gt;setComplete();
     progressItem = 0;
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>507481</commentid>
    <comment_count>17</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-02-07 22:16:25 +0000</bug_when>
    <thetext>Reopening this, since the fix is not yet confirmed and I want to mark bug #141346 as a duplicate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>507484</commentid>
    <comment_count>18</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-02-07 22:18:52 +0000</bug_when>
    <thetext>*** Bug 141346 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>507560</commentid>
    <comment_count>19</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-02-08 02:08:55 +0000</bug_when>
    <thetext>The bug seems to be older than one year http://bugs.kde.org/show_bug.cgi?id=122028 or not ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509947</commentid>
    <comment_count>20</comment_count>
    <who name="Jonathan Marten">jjm</who>
    <bug_when>2007-02-18 18:52:21 +0000</bug_when>
    <thetext>*** Bug 141872 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>509951</commentid>
    <comment_count>21</comment_count>
      <attachid>19731</attachid>
    <who name="Allen Winter">winter</who>
    <bug_when>2007-02-18 19:00:11 +0000</bug_when>
    <thetext>Created attachment 19731
an attempt to fix this crash

I made my comment above into a more a real patch that can more easily be tested</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>510231</commentid>
    <comment_count>22</comment_count>
    <who name="Bram Schoenmakers">me</who>
    <bug_when>2007-02-19 23:33:58 +0000</bug_when>
    <thetext>@Philippe: so what does bug 122028 to do with this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>511502</commentid>
    <comment_count>23</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-02-26 08:41:48 +0000</bug_when>
    <thetext>@Bram Schoenmakers : cause exist the comments #3 and #5
http://bugs.kde.org/show_bug.cgi?id=122028#c3

For me, the bug have destroy 625 mails this morning. Nice for a Monday \o/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>511509</commentid>
    <comment_count>24</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-02-26 09:42:43 +0000</bug_when>
    <thetext>http://img92.imageshack.us/my.php?image=kmailkrashia3.jpg</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>511751</commentid>
    <comment_count>25</comment_count>
    <who name="Myriam Schweingruber">myriam</who>
    <bug_when>2007-02-27 14:13:07 +0000</bug_when>
    <thetext>sorry, the patch for me only avoids to lose the data, but filtering on large amount of mails still crashes.
see attached crash report</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>511752</commentid>
    <comment_count>26</comment_count>
    <who name="Myriam Schweingruber">myriam</who>
    <bug_when>2007-02-27 14:15:05 +0000</bug_when>
    <thetext>Crash report:
(no debugging symbols found)
Using host libthread_db library &quot;/lib/tls/i686/cmov/libthread_db.so.1&quot;.
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1243138352 (LWP 26265)]
[New Thread -1292788848 (LWP 26354)]
[New Thread -1284396144 (LWP 26353)]
[New Thread -1276003440 (LWP 26352)]
[New Thread -1267610736 (LWP 26351)]
[KCrash handler]
#6  0x00000000 in ?? ()
#7  0xb4bd6114 in KMFolder::find () from /usr/lib/libkmailprivate.so
#8  0xb4e9013c in KMHeaders::applyFiltersOnMsg ()
   from /usr/lib/libkmailprivate.so
#9  0xb4bd9dea in KMMainWidget::slotApplyFilters ()
   from /usr/lib/libkmailprivate.so
#10 0xb4ec83be in KMMainWidget::qt_invoke () from /usr/lib/libkmailprivate.so
#11 0xb6f80813 in QObject::activate_signal (this=0x8a81700, clist=0x8a81938, 
    o=0xbfc00cec) at kernel/qobject.cpp:2356
#12 0xb6f812b8 in QObject::activate_signal (this=0x8a81700, signal=2)
    at kernel/qobject.cpp:2325
#13 0xb67524c9 in KAction::activated () from /usr/lib/libkdeui.so.4
#14 0xb678acb2 in KAction::slotActivated () from /usr/lib/libkdeui.so.4
#15 0xb68582ef in KAction::qt_invoke () from /usr/lib/libkdeui.so.4
#16 0xb6f80813 in QObject::activate_signal (this=0xa6192d8, clist=0xa33f2b8, 
    o=0xbfc00dfc) at kernel/qobject.cpp:2356
#17 0xb6f812b8 in QObject::activate_signal (this=0xa6192d8, signal=2)
    at kernel/qobject.cpp:2325
#18 0xb75693d9 in KAccelPrivate::menuItemActivated ()
   from /usr/lib/libkdecore.so.4
#19 0xb75b7557 in KAccelPrivate::emitActivatedSignal ()
   from /usr/lib/libkdecore.so.4
#20 0xb7618a6e in KAccelPrivate::eventFilter () from /usr/lib/libkdecore.so.4
#21 0xb6f7fdc0 in QObject::activate_filters (this=0x80be888, e=0xbfc0127c)
    at kernel/qobject.cpp:903
#22 0xb6f7fe3e in QObject::event (this=0x80be888, e=0xbfc0127c)
    at kernel/qobject.cpp:735
#23 0xb6fb7517 in QWidget::event (this=0x80be888, e=0xbfc0127c)
    at kernel/qwidget.cpp:4678
#24 0xb708db2e in QMainWindow::event (this=0x80be888, e=0xbfc0127c)
    at widgets/qmainwindow.cpp:1687
#25 0xb6f179e8 in QApplication::internalNotify (this=0xbfc0176c, 
    receiver=0x80be888, e=0xbfc0127c) at kernel/qapplication.cpp:2635
#26 0xb6f199b8 in QApplication::notify (this=0xbfc0176c, receiver=0x89db870, 
    e=0xbfc0127c) at kernel/qapplication.cpp:2392
#27 0xb7653d52 in KApplication::notify () from /usr/lib/libkdecore.so.4
#28 0xb75c4cb7 in KAccelEventHandler::x11Event ()
   from /usr/lib/libkdecore.so.4
#29 0xb7652183 in KApplication::x11EventFilter ()
   from /usr/lib/libkdecore.so.4
#30 0xb6e96133 in qt_x11EventFilter (ev=0xbfc015e8)
    at kernel/qapplication_x11.cpp:388
#31 0xb6ea68c2 in QApplication::x11ProcessEvent (this=0xbfc0176c, 
    event=0xbfc015e8) at kernel/qapplication_x11.cpp:3345
#32 0xb6ebe180 in QEventLoop::processEvents (this=0x80aa788, flags=4)
    at kernel/qeventloop_x11.cpp:192
#33 0xb6f320be in QEventLoop::enterLoop (this=0x80aa788)
    at kernel/qeventloop.cpp:198
#34 0xb6f31ece in QEventLoop::exec (this=0x80aa788)
    at kernel/qeventloop.cpp:145
#35 0xb6f19591 in QApplication::exec (this=0xbfc0176c)
    at kernel/qapplication.cpp:2758
#36 0x08061e25 in ?? ()
#37 0xbfc0176c in ?? ()
#38 0x00000001 in ?? ()
#39 0x00000001 in ?? ()
#40 0x00000000 in ?? ()
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>519721</commentid>
    <comment_count>27</comment_count>
    <who name="Jonathan Anderson">jonathan.anderson</who>
    <bug_when>2007-04-10 16:04:10 +0000</bug_when>
    <thetext>FWIW, I get this crash when using standalone KMail, as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>520356</commentid>
    <comment_count>28</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-04-12 21:43:23 +0000</bug_when>
    <thetext>*** Bug 144157 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526315</commentid>
    <comment_count>29</comment_count>
    <who name="Pradeepto K. Bhattacharya">pradeepto</who>
    <bug_when>2007-05-17 17:14:57 +0000</bug_when>
    <thetext>SVN commit 665658 by pradeepto:

Merge .. from 3.5 ...
SVN commit 627641 by winterz:

Fix for the grave bug &quot;kmail crash when I make a CTRL + J in inbox&quot;

BUGS: 140660


 M  +2 -2      kmfolder.cpp  


--- branches/kdepim/enterprise/kdepim/kmail/kmfolder.cpp #665657:665658
@@ -422,12 +422,12 @@
 
 int KMFolder::find( const KMMsgBase* msg ) const
 {
-  return mStorage-&gt;find( msg );
+  return mStorage ? mStorage-&gt;find( msg ) : 0;
 }
 
 int KMFolder::find( const KMMessage* msg ) const
 {
-  return mStorage-&gt;find( msg );
+  return mStorage ? mStorage-&gt;find( msg ) : 0;
 }
 
 int KMFolder::count( bool cache ) const
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526429</commentid>
    <comment_count>30</comment_count>
    <who name="Michiel de Bruijne">m.debruijne</who>
    <bug_when>2007-05-17 23:33:19 +0000</bug_when>
    <thetext>Hi,

I&apos;m using Gentoo package kde-base/kmail-3.5.6-r3. This version has this patch applied however I just lost my email due to this bug. It seems that this bug isn&apos;t fixed yet. Would someone who is able to please reopen this bug. At the moment kmail isn&apos;t very reliable and this results in data loss.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526530</commentid>
    <comment_count>31</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-05-18 12:43:58 +0000</bug_when>
    <thetext>Reopening because of comment #30.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>529069</commentid>
    <comment_count>32</comment_count>
    <who name="Bram Schoenmakers">me</who>
    <bug_when>2007-05-31 18:13:49 +0000</bug_when>
    <thetext>*** Bug 146204 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>529073</commentid>
    <comment_count>33</comment_count>
    <who name="Abe Ezekowitz">aezekowitz</who>
    <bug_when>2007-05-31 18:24:51 +0000</bug_when>
    <thetext>bug 146204 should probably not be marked as a duplicate in my opinion as there is no report of data loss in that one, kmail just sigsev&apos;s. I have had the very same issue. Also, I am running Gentoo using KDE 3.5.7 and this has been happening since 3.5.5 on Kubuntu. It seems to me that this bug is upstream to KDE.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530105</commentid>
    <comment_count>34</comment_count>
    <who name="Elián Hanisch">lambdae2</who>
    <bug_when>2007-06-06 01:45:15 +0000</bug_when>
    <thetext>I</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>530395</commentid>
    <comment_count>35</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-06-07 18:38:54 +0000</bug_when>
    <thetext>&gt;bug 146204 should probably not be marked as a duplicate in my opinion as there is no report of data loss in that one
No, it is a duplicate, it is the exact same backtrace. Maybe this problem does not always trigger data loss or the reporter of that bug did just not report it.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>533568</commentid>
    <comment_count>36</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-06-26 16:12:06 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 135376 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>533747</commentid>
    <comment_count>37</comment_count>
    <who name="Philippe">animimotus</who>
    <bug_when>2007-06-27 16:36:38 +0000</bug_when>
    <thetext>Should we vote now for the other bug? ^^

60 votes for the other bug report + 136 for this one...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>533750</commentid>
    <comment_count>38</comment_count>
    <who name="Thomas McGuire">mcguire</who>
    <bug_when>2007-06-27 16:49:30 +0000</bug_when>
    <thetext>&gt;Should we vote now for the other bug? ^^ 
 
&gt;60 votes for the other bug report + 136 for this one... 
Yes, vote for the other bug report please. Bugzilla does not transfer votes automatically when marking bugs as duplicates.
 
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>19431</attachid>
            <date>2007-01-27 00:23:27 +0000</date>
            <delta_ts>2007-02-18 19:00:11 +0000</delta_ts>
            <desc>patch to attempt fix</desc>
            <filename>kmail-140660.patch</filename>
            <type>text/plain</type>
            <size>539</size>
            <attacher name="Allen Winter">winter</attacher>
            
              <data encoding="base64">SW5kZXg6IGttZm9sZGVyLmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBrbWZvbGRlci5jcHAJKHJldmlzaW9u
IDYyNzUyOCkKKysrIGttZm9sZGVyLmNwcAkod29ya2luZyBjb3B5KQpAQCAtNDI2LDEyICs0MjYs
MTIgQEAgaW50IEtNRm9sZGVyOjptb3ZlTXNnKFFQdHJMaXN0PEtNTWVzc2FnZQogCiBpbnQgS01G
b2xkZXI6OmZpbmQoIGNvbnN0IEtNTXNnQmFzZSogbXNnICkgY29uc3QKIHsKLSAgcmV0dXJuIG1T
dG9yYWdlLT5maW5kKCBtc2cgKTsKKyAgcmV0dXJuIG1TdG9yYWdlID8gbVN0b3JhZ2UtPmZpbmQo
IG1zZyApIDogMDsKIH0KIAogaW50IEtNRm9sZGVyOjpmaW5kKCBjb25zdCBLTU1lc3NhZ2UqIG1z
ZyApIGNvbnN0CiB7Ci0gIHJldHVybiBtU3RvcmFnZS0+ZmluZCggbXNnICk7CisgIHJldHVybiBt
U3RvcmFnZSA/IG1TdG9yYWdlLT5maW5kKCBtc2cgKSA6IDA7CiB9CiAKIGludCBLTUZvbGRlcjo6
Y291bnQoIGJvb2wgY2FjaGUgKSBjb25zdAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>19731</attachid>
            <date>2007-02-18 19:00:11 +0000</date>
            <delta_ts>2007-02-18 19:00:11 +0000</delta_ts>
            <desc>an attempt to fix this crash</desc>
            <filename>kmail-140660.patch</filename>
            <type>text/plain</type>
            <size>2623</size>
            <attacher name="Allen Winter">winter</attacher>
            
              <data encoding="base64">SW5kZXg6IGttaGVhZGVycy5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0ga21oZWFkZXJzLmNwcAkocmV2aXNp
b24gNjMxMzI5KQorKysga21oZWFkZXJzLmNwcAkocmV2aXNpb24gNjMxMzMwKQpAQCAtMTM4MCw4
ICsxMzgwLDkgQEAKICAgICBIZWFkZXJJdGVtICpuZXh0SXRlbSA9IHByZXBhcmVNb3ZlKCAmY29u
dGVudFgsICZjb250ZW50WSApOwogCiAgICAgS01NZXNzYWdlTGlzdCogbXNnTGlzdCA9IHNlbGVj
dGVkTXNncygpOwotICAgIGlmIChtc2dMaXN0LT5pc0VtcHR5KCkpCisgICAgaWYgKG1zZ0xpc3Qt
PmNvdW50KCkgPCAxKQogICAgICAgcmV0dXJuOworCiAgICAgZmluYWxpemVNb3ZlKCBuZXh0SXRl
bSwgY29udGVudFgsIGNvbnRlbnRZICk7CiAKICAgICBDUkVBVEVfVElNRVIoZmlsdGVyKTsKQEAg
LTE0MDQsMjAgKzE0MDUsMjAgQEAKICAgICAgICAgS0FwcGxpY2F0aW9uOjprQXBwbGljYXRpb24o
KS0+ZXZlbnRMb29wKCktPnByb2Nlc3NFdmVudHMoIFFFdmVudExvb3A6OkV4Y2x1ZGVVc2VySW5w
dXQsIDUwICk7CiAgICAgICB9CiAgICAgICBpbnQgaWR4ID0gbXNnQmFzZS0+cGFyZW50KCktPmZp
bmQobXNnQmFzZSk7Ci0gICAgICBhc3NlcnQoaWR4ICE9IC0xKTsKLSAgICAgIEtNTWVzc2FnZSAq
IG1zZyA9IG1zZ0Jhc2UtPnBhcmVudCgpLT5nZXRNc2coaWR4KTsKLSAgICAgIGlmIChtc2ctPnRy
YW5zZmVySW5Qcm9ncmVzcygpKSBjb250aW51ZTsKLSAgICAgIG1zZy0+c2V0VHJhbnNmZXJJblBy
b2dyZXNzKHRydWUpOwotICAgICAgaWYgKCAhbXNnLT5pc0NvbXBsZXRlKCkgKQotICAgICAgewot
ICAgICAgICBGb2xkZXJKb2IgKmpvYiA9IG1Gb2xkZXItPmNyZWF0ZUpvYihtc2cpOwotICAgICAg
ICBjb25uZWN0KGpvYiwgU0lHTkFMKG1lc3NhZ2VSZXRyaWV2ZWQoS01NZXNzYWdlKikpLAotICAg
ICAgICAgICAgICAgICAgICAgU0xPVChzbG90RmlsdGVyTXNnKEtNTWVzc2FnZSopKSk7Ci0gICAg
ICAgIGpvYi0+c3RhcnQoKTsKLSAgICAgIH0gZWxzZSB7Ci0gICAgICAgIGlmIChzbG90RmlsdGVy
TXNnKG1zZykgPT0gMikgYnJlYWs7CisgICAgICBpZiAoIGlkeCA+PSAwICkgeworICAgICAgICBL
TU1lc3NhZ2UgKiBtc2cgPSBtc2dCYXNlLT5wYXJlbnQoKS0+Z2V0TXNnKGlkeCk7CisgICAgICAg
IGlmIChtc2ctPnRyYW5zZmVySW5Qcm9ncmVzcygpKSBjb250aW51ZTsKKyAgICAgICAgbXNnLT5z
ZXRUcmFuc2ZlckluUHJvZ3Jlc3ModHJ1ZSk7CisgICAgICAgIGlmICggIW1zZy0+aXNDb21wbGV0
ZSgpICkgeworICAgICAgICAgIEZvbGRlckpvYiAqam9iID0gbUZvbGRlci0+Y3JlYXRlSm9iKG1z
Zyk7CisgICAgICAgICAgY29ubmVjdChqb2IsIFNJR05BTChtZXNzYWdlUmV0cmlldmVkKEtNTWVz
c2FnZSopKSwKKyAgICAgICAgICAgICAgICAgIFNMT1Qoc2xvdEZpbHRlck1zZyhLTU1lc3NhZ2Uq
KSkpOworICAgICAgICAgIGpvYi0+c3RhcnQoKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAg
ICBpZiAoc2xvdEZpbHRlck1zZyhtc2cpID09IDIpIGJyZWFrOworICAgICAgICB9CisgICAgICAg
IHByb2dyZXNzSXRlbS0+aW5jQ29tcGxldGVkSXRlbXMoKTsKICAgICAgIH0KLSAgICAgIHByb2dy
ZXNzSXRlbS0+aW5jQ29tcGxldGVkSXRlbXMoKTsKICAgICB9CiAgICAgcHJvZ3Jlc3NJdGVtLT5z
ZXRDb21wbGV0ZSgpOwogICAgIHByb2dyZXNzSXRlbSA9IDA7CkluZGV4OiBmb2xkZXJzdG9yYWdl
LmNwcAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09Ci0tLSBmb2xkZXJzdG9yYWdlLmNwcAkocmV2aXNpb24gNjMxMzI5KQor
KysgZm9sZGVyc3RvcmFnZS5jcHAJKHJldmlzaW9uIDYzMTMzMCkKQEAgLTQ1MSw3ICs0NTEsOCBA
QAogICAgIGlmIChtc2ctPnBhcmVudCgpKQogICAgIHsKICAgICAgIGludCBpZHggPSBtc2ctPnBh
cmVudCgpLT5maW5kKG1zZyk7Ci0gICAgICB0YWtlKGlkeCk7CisgICAgICBpZiAoIGlkeCA+PSAw
ICkKKyAgICAgICAgdGFrZShpZHgpOwogICAgIH0KICAgfQogfQpJbmRleDoga21mb2xkZXIuY3Bw
Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT0KLS0tIGttZm9sZGVyLmNwcAkocmV2aXNpb24gNjMxMzI5KQorKysga21mb2xk
ZXIuY3BwCShyZXZpc2lvbiA2MzEzMzApCkBAIC00MjYsMTIgKzQyNiwxMiBAQAogCiBpbnQgS01G
b2xkZXI6OmZpbmQoIGNvbnN0IEtNTXNnQmFzZSogbXNnICkgY29uc3QKIHsKLSAgcmV0dXJuIG1T
dG9yYWdlID8gbVN0b3JhZ2UtPmZpbmQoIG1zZyApIDogMDsKKyAgcmV0dXJuIG1TdG9yYWdlID8g
bVN0b3JhZ2UtPmZpbmQoIG1zZyApIDogLTE7CiB9CiAKIGludCBLTUZvbGRlcjo6ZmluZCggY29u
c3QgS01NZXNzYWdlKiBtc2cgKSBjb25zdAogewotICByZXR1cm4gbVN0b3JhZ2UgPyBtU3RvcmFn
ZS0+ZmluZCggbXNnICkgOiAwOworICByZXR1cm4gbVN0b3JhZ2UgPyBtU3RvcmFnZS0+ZmluZCgg
bXNnICkgOiAtMTsKIH0KIAogaW50IEtNRm9sZGVyOjpjb3VudCggYm9vbCBjYWNoZSApIGNvbnN0
Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>