From kmail-devel Sun Feb 25 12:39:38 2007 From: Andreas Gungl Date: Sun, 25 Feb 2007 12:39:38 +0000 To: kmail-devel Subject: Reason for crashes when filtering mails Message-Id: <200702251339.45598 () gungl-dd ! de> X-MARC-Message: https://marc.info/?l=kmail-devel&m=117240722213262 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0288930241==" --===============0288930241== Content-Type: multipart/signed; boundary="nextPart5127765.kJTuaXnUvY"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart5127765.kJTuaXnUvY Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, starting with KMail from KDE 3.5.6 I often get crashes when filtering many= =20 messages in a folder manually (applying all filters). The problem goes down to the following lines in kmfolder.cpp: int KMFolder::find( const KMMsgBase* msg ) const { return mStorage ? mStorage->find( msg ) : 0; } I've encountered mStorage being null, so I end up with 0 in the calling met= hod=20 KMHeaders::applyFiltersOnMsg() (in kmheaders.cpp line 1378). int idx =3D msgBase->parent()->find(msgBase); assert(idx !=3D -1); KMMessage * msg =3D msgBase->parent()->getMsg(idx); If I insert a condition to process only for idx !=3D 0, KMail doesn't crash= =20 anymore. This makes me wonder if idx =3D=3D 0 is a valid index and how the assert is= meant=20 to work. Of course, the real problem is mStorage being not defined, but=20 that's a bit beyond my knowledge of the folder stuff in KMail. Well, if someone can comment on this, I'd like to fix it the right way. Regards, Andreas =2D-=20 Kindermode Online - Fashion for Kids http://www.theofeel.de --nextPart5127765.kJTuaXnUvY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQBF4YORVhjiFd4beU8RAgx2AKDPv0aal0e0PrJz/VBc1YWvkpJAvQCfQqSG +90M+l1lfV0U0hDVnqJnk/A= =JbST -----END PGP SIGNATURE----- --nextPart5127765.kJTuaXnUvY-- --===============0288930241== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KMail developers mailing list KMail-devel@kde.org https://mail.kde.org/mailman/listinfo/kmail-devel --===============0288930241==--