Re: crash when IMAP server crashes

Vadim Zeitlin <[email protected]> Fri, 25 Mar 2016 14:26:44 +0100
Newsgroups gmane.mail.mahogany.devel
Message-ID <[email protected]>
--===============1308165886877496301==
Content-Type: MULTIPART/SIGNED; protocol="application/pgp-signature";
	micalg=pgp-sha1; BOUNDARY="4294967295-41-1458912404=:12660"

--4294967295-41-1458912404=:12660
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Disposition: INLINE

On Fri, 25 Mar 2016 13:32:50 +0200 Nerijus Baliunas <[email protected]> wrote:

NB> I have some old messages, and when I try to open them, dovecot dies:

 You probably should report this to Dovecot people in any case...

NB> I get an assert in M:
NB> 
NB> Program received signal SIGTRAP, Trace/breakpoint trap.
NB> 0x00000000005f4b01 in MessageCC::GetBody (this=0xfc0a10) at .src/mail/MessageCC.cpp:738
NB> 738	   ASSERT_MSG( m_Body && m_Envelope, _T("failed to get body and envelope!") );
NB> (gdb) bt
NB> #0  0x00000000005f4b01 in MessageCC::GetBody() (this=0xfc0a10) at .src/mail/MessageCC.cpp:738
NB> #1  0x00000000005f5467 in MessageCC::CheckBody() const (this=0xfc0a10) at /a/M/M/include/MessageCC.h:176
NB> #2  0x00000000005f3669 in MessageCC::CheckMIME() const (this=0xfc0a10) at .src/mail/MessageCC.cpp:507
NB> #3  0x00000000005f374c in MessageCC::GetTopMimePart() const (this=0xfc0a10) at .src/mail/MessageCC.cpp:532
NB> #4  0x000000000048c2ac in MessageView::Update() (this=0xee6400) at .src/classes/MessageView.cpp:3060

 The assert in GetBody() definitely seems wrong, there doesn't seem any
reason to assume that mail_fetchstructure() can't fail -- and we even see
that it can. So it should be removed and replaced with an ERRORMESSAGE().

NB> Usually after a few continues M crashes.

 This must be due to dereferencing either the envelope or body pointer
somewhere without checking if it's null, but I don't immediately see where
does happen. Can you catch the crash under the debugger as well please?

 Thanks,
VZ

--4294967295-41-1458912404=:12660
Content-Type: APPLICATION/PGP-SIGNATURE

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iEYEABECAAYFAlb1PJQACgkQBupB3k9sHobTwACeMgk5q3k/DeA/YVwmULkC+ZIr
pfEAn0T1D0ga3i0xt/DzavtqyAmKGhpJ
=+MNF
-----END PGP SIGNATURE-----

--4294967295-41-1458912404=:12660--


--===============1308165886877496301==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
--===============1308165886877496301==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Mahogany-Developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-developers

--===============1308165886877496301==--