Closed Bug 207798 Opened 21 years ago Closed 21 years ago

Mail crashes when moving mail between folders

Categories

(MailNews Core :: Database, defect)

x86
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ajschult784, Assigned: Bienvenu)

References

Details

(Keywords: crash, regression)

Attachments

(3 files, 1 obsolete file)

I received 3 messages. 2 were marked junk and Mozilla attempted to move them to the junk folder. That crashed Mozilla. Further investigation shows that almost any moving of messages bewteen folders results in a crash (it might have worked once). All of this was happening with a POP account (local folders) This regressed between linux trunk 2003053005 and 2003053104. backing out bug 206473 fixed it.
Attached file stacktrace
probably linux-specific - I haven't seen this on Windows at all. I'll try it on Linux. Unfortunately, that stack trace doesn't tell me which call to memchr is causing the problem.
Status: NEW → ASSIGNED
Attached patch proposed fix (obsolete) — Splinter Review
this is just a guess as to what's going wrong. I'll try this patch on linux. If you want to try it yourself (after unbacking out the fix you backed out, that would be helpful). thx, - David
It seems that most normal mail doesn't trigger this bug. Junk mail seems particularly troublesome. This is a folder with a message that triggers this bug pretty consistently. I noticed there are plenty of ^M here. the patch didn't help. :( I'll try to isolate the memchr that's having problems.
thx, I tried that msg on windows w/o a problem.
it seems to be the third memchr (in the current trunk code) that causes problems: http://lxr.mozilla.org/mozilla/source/mailnews/local/src/nsLocalMailFolder.cpp#2517 2517 end = (char *) memchr(start, '\r', end - start + 1); for the attached message (end-start+1) is consistently -1. the third argument to memchr is a size_t, which is an unsigned int. Amazingly, it makes it through the while loop quite a few times before crashing.
OK, I think I see the problem - when we advance start here: start = end+linebreak_len; we need to advance end as well. I'll try to come up with another patch
Attached patch proposed fixSplinter Review
can you try this patch? First, you need to unapply the old one (or just remove nsLocalMailFolder.cpp, cvs up, then apply this patch) thx, - David
Attachment #124651 - Attachment is obsolete: true
the new patch fixes the crash for me.
great, thx. I'll check it in as soon as I can.
fix checked in, r/sr=sspitzer.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
This may have caused bug 207908. Only three checkins when it regressed and this one is about the same portion of mailnews.
FYI, I saw a very similar problem in WINDOWS ME in build 2003060104. Happened consistently with messages with JPEGs inserted in body of message. It's fixed as of 2003060608. See bug 208565
*** Bug 208055 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: