Closed Bug 52040 Opened 20 years ago Closed 11 years ago

asserts (used to crash) for email with two files with the same name

Categories

(MailNews Core :: Backend, defect, P1, major)

x86
Linux

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 169588

People

(Reporter: siebert, Unassigned)

Details

(Whiteboard: [notacrash])

Attachments

(2 obsolete files)

Hi,

mozilla hangs and then crashes if you receive an email with two attached
files that have the same name and you want to save them. Ok, that's not
that usual, but your girlfriend could do sth. like this...ok, mine did so ;-)

Ciao,
Jochen
I saw a crash on both linux and nt doing these steps:
1) open mozilla mail
2) send yourself a note with just a subject and the same file attached twice
3) recieve the message, and open it
4) click "save all" attachments on the menu from the attachment icon
5) either actually save the two files (one over the other0 or cancel out of the
save dialog, either way you crash.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: minor → critical
Keywords: crash, rtm
Priority: P3 → P1
crash and rtm keywords added, Priority -> P1, Severity -> critical.  Easily
reproduced crasher.
Another worth looking at.
Whiteboard: [rtm need info]
Does there have to be anything special about these attachments? I've sent myself
two .txt and two .doc with the same names and I don't crash when I save or when
I cancel.

Steve, were you able to get a stack trace for the crash?
mscott, can Seth investigate this?
announcer:  "mscott hands off to sspitzer, sspitzer breaks one tackle and runs
down field.."
Assignee: mscott → sspitzer
I don't get the crash on winnt or linux.

buster or jochen:  can you send me an email (sspitzer@netscape.com) that will
crash me?
I do get a few thread safe assertions.

here there are:

NTDLL! 77f7629c()
nsDebug::Assertion(const char * 0x02ed1058, const char * 0x100c650c, const char
* 0x100c64e0, int 490) line 256 + 13 bytes
NS_CheckThreadSafe(void * 0x00a22da0, const char * 0x02ed1058) line 490 + 34 bytes
nsStreamConverter::Release(nsStreamConverter * const 0x04cb0ac0) line 502 + 61 bytes
nsCOMPtr<nsIStreamObserver>::~nsCOMPtr<nsIStreamObserver>() line 490
nsAsyncStreamObserver::~nsAsyncStreamObserver() line 47 + 27 bytes
nsAsyncStreamListener::~nsAsyncStreamListener() line 98 + 8 bytes
nsAsyncStreamListener::`scalar deleting destructor'(unsigned int 1) + 15 bytes
nsAsyncStreamObserver::Release(nsAsyncStreamObserver * const 0x04cbdee0) line
144 + 132 bytes
nsAsyncStreamListener::Release(nsAsyncStreamListener * const 0x04cbdee0) line
147 + 12 bytes
nsCOMPtr<nsIStreamListener>::assign_assuming_AddRef(nsIStreamListener *
0x00000000) line 472
nsCOMPtr<nsIStreamListener>::assign_with_AddRef(nsISupports * 0x00000000) line 849
nsCOMPtr<nsIStreamListener>::operator=(nsIStreamListener * 0x00000000) line 584
nsImapProtocol::ReleaseUrlState() line 645
nsImapProtocol::ProcessCurrentURL() line 1122
nsImapProtocol::ImapThreadMainLoop() line 922
nsImapProtocol::Run(nsImapProtocol * const 0x02b9f69c) line 694
nsThread::Main(void * 0x035add00) line 84 + 26 bytes
_PR_NativeRunThread(void * 0x035adb90) line 399 + 13 bytes
_threadstartex(void * 0x035ada90) line 212 + 13 bytes
KERNEL32! 77f04ee8()


NTDLL! 77f7629c()
nsDebug::Assertion(const char * 0x02ed1058, const char * 0x100c650c, const char
* 0x100c64e0, int 490) line 256 + 13 bytes
NS_CheckThreadSafe(void * 0x00a22da0, const char * 0x02ed1058) line 490 + 34 bytes
nsStreamConverter::Release(nsStreamConverter * const 0x04cb0ac0) line 502 + 61 bytes
nsCOMPtr<nsIStreamListener>::assign_assuming_AddRef(nsIStreamListener *
0x00000000) line 472
nsCOMPtr<nsIStreamListener>::assign_with_AddRef(nsISupports * 0x00000000) line 849
nsCOMPtr<nsIStreamListener>::operator=(nsIStreamListener * 0x00000000) line 584
nsImapMockChannel::Close(nsImapMockChannel * const 0x04cb29c0) line 6683
nsImapProtocol::ReleaseUrlState() line 649
nsImapProtocol::ProcessCurrentURL() line 1122
nsImapProtocol::ImapThreadMainLoop() line 922
nsImapProtocol::Run(nsImapProtocol * const 0x02b9f69c) line 694
nsThread::Main(void * 0x035add00) line 84 + 26 bytes
_PR_NativeRunThread(void * 0x035adb90) line 399 + 13 bytes
_threadstartex(void * 0x035ada90) line 212 + 13 bytes
KERNEL32! 77f04ee8()

NTDLL! 77f7629c()
nsDebug::Assertion(const char * 0x03ddf7e0, const char * 0x100c650c, const char
* 0x100c64e0, int 490) line 256 + 13 bytes
NS_CheckThreadSafe(void * 0x00a22da0, const char * 0x03ddf7e0) line 490 + 34 bytes
nsMimeBaseEmitter::AddRef(nsMimeBaseEmitter * const 0x04cb09e0) line 59 + 55 bytes
nsCOMPtr<nsIInputStreamObserver>::nsCOMPtr<nsIInputStreamObserver>(const
nsCOMPtr<nsIInputStreamObserver> & {...}) line 526
nsPipe::nsPipeInputStream::Close(nsPipe::nsPipeInputStream * const 0x04cb08e0)
line 337
nsPipe::nsPipeInputStream::Release(nsPipe::nsPipeInputStream * const 0x04cb08e0)
line 322
nsCOMPtr<nsIInputStream>::~nsCOMPtr<nsIInputStream>() line 490
nsStreamConverter::~nsStreamConverter() line 499 + 78 bytes
nsStreamConverter::`scalar deleting destructor'(unsigned int 1) + 15 bytes
nsStreamConverter::Release(nsStreamConverter * const 0x04cb0ac0) line 502 + 154
bytes
nsCOMPtr<nsIStreamListener>::assign_assuming_AddRef(nsIStreamListener *
0x00000000) line 472
nsCOMPtr<nsIStreamListener>::assign_with_AddRef(nsISupports * 0x00000000) line 849
nsCOMPtr<nsIStreamListener>::operator=(nsIStreamListener * 0x00000000) line 584
nsImapMockChannel::Close(nsImapMockChannel * const 0x04cb29c0) line 6683
nsImapProtocol::ReleaseUrlState() line 649
nsImapProtocol::ProcessCurrentURL() line 1122
nsImapProtocol::ImapThreadMainLoop() line 922
nsImapProtocol::Run(nsImapProtocol * const 0x02b9f69c) line 694
nsThread::Main(void * 0x035add00) line 84 + 26 bytes
_PR_NativeRunThread(void * 0x035adb90) line 399 + 13 bytes
_threadstartex(void * 0x035ada90) line 212 + 13 bytes
KERNEL32! 77f04ee8()

NTDLL! 77f7629c()
nsDebug::Assertion(const char * 0x02ed0ce4, const char * 0x100c650c, const char
* 0x100c64e0, int 490) line 256 + 13 bytes
NS_CheckThreadSafe(void * 0x00a22da0, const char * 0x02ed0ce4) line 490 + 34 bytes
nsMimeConverter::Release(nsMimeConverter * const 0x04cb0960) line 32 + 58 bytes
nsCOMPtr<nsIMimeConverter>::~nsCOMPtr<nsIMimeConverter>() line 490
nsMimeBaseEmitter::~nsMimeBaseEmitter() line 156 + 29 bytes
nsMimeRawEmitter::~nsMimeRawEmitter() line 53 + 8 bytes
nsMimeRawEmitter::`scalar deleting destructor'(unsigned int 1) + 15 bytes
nsMimeBaseEmitter::Release(nsMimeBaseEmitter * const 0x04cb09e0) line 59 + 151 bytes
nsCOMPtr<nsIOutputStreamObserver>::~nsCOMPtr<nsIOutputStreamObserver>() line 490
nsPipe::nsPipeOutputStream::~nsPipeOutputStream() + 18 bytes
nsPipe::~nsPipe() line 207 + 22 bytes
nsPipe::`scalar deleting destructor'(unsigned int 1) + 15 bytes
nsPipe::Release(nsPipe * const 0x04cb08d0) line 210 + 130 bytes
nsPipe::nsPipeOutputStream::Release(nsPipe::nsPipeOutputStream * const
0x04cb08f0) line 618
nsCOMPtr<nsIOutputStream>::~nsCOMPtr<nsIOutputStream>() line 490
nsStreamConverter::~nsStreamConverter() line 499 + 89 bytes
nsStreamConverter::`scalar deleting destructor'(unsigned int 1) + 15 bytes
nsStreamConverter::Release(nsStreamConverter * const 0x04cb0ac0) line 502 + 154
bytes
nsCOMPtr<nsIStreamListener>::assign_assuming_AddRef(nsIStreamListener *
0x00000000) line 472
nsCOMPtr<nsIStreamListener>::assign_with_AddRef(nsISupports * 0x00000000) line 849
nsCOMPtr<nsIStreamListener>::operator=(nsIStreamListener * 0x00000000) line 584
nsImapMockChannel::Close(nsImapMockChannel * const 0x04cb29c0) line 6683
nsImapProtocol::ReleaseUrlState() line 649
nsImapProtocol::ProcessCurrentURL() line 1122
nsImapProtocol::ImapThreadMainLoop() line 922
nsImapProtocol::Run(nsImapProtocol * const 0x02b9f69c) line 694
nsThread::Main(void * 0x035add00) line 84 + 26 bytes
_PR_NativeRunThread(void * 0x035adb90) line 399 + 13 bytes
_threadstartex(void * 0x035ada90) line 212 + 13 bytes
KERNEL32! 77f04ee8()
good news:  PR3 crashes.
even better news:  the branch doesn't crash.

mscott must have fixed this between PR3 and now.  I know he did quite a bit of
work in this area.

changing this bug to just cover the assertions.  clearing rtm keyword.

mscott, after we ship can you review the patch I attached?
Status: NEW → ASSIGNED
Keywords: crash, rtm
Summary: mozilla hangs / crashes for email with two files with the same name → asserts (used to crash) for email with two files with the same name
Whiteboard: [rtm need info]
adding putterman to the cc.

putterman, see my last comment about why this is no longer a rtm bug.
marking nsbeta1-
Keywords: nsbeta1-
assign to fenella -contact
QA Contact: sheelar → fenella
Product: MailNews → Core
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Status: ASSIGNED → NEW
Filter on "Nobody_NScomTLD_20080620"
QA Contact: fenella → backend
Product: Core → MailNews Core
Gary, does patch still apply?

related in any way? bug 318241  Firefox crashes downloading two files with the same name + Show Download Manager option [@ 0x00000043 - nsDownload::GetTempFile]
Severity: critical → major
Whiteboard: [has draft patch]
(In reply to comment #17)
> Gary, does patch still apply?

Nope, the patch has bitrotted.

$ patch -p0 --dry-run < ~/Desktop/1patch.txt 
(Stripping trailing CRs from patch.)
patching file nsMimeBaseEmitter.cpp
Hunk #1 FAILED at 53.
1 out of 1 hunk FAILED -- saving rejects to file nsMimeBaseEmitter.cpp.rej
(Stripping trailing CRs from patch.)
can't find file to patch at input line 33
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: src/nsMimeConverter.cpp
|===================================================================
|RCS file: /cvsroot/mozilla/mailnews/mime/src/nsMimeConverter.cpp,v
|retrieving revision 1.21
|diff -p -r1.21 nsMimeConverter.cpp
|*** nsMimeConverter.cpp        2000/08/08 02:27:52     1.21
|--- nsMimeConverter.cpp        2000/10/20 21:46:07
--------------------------
File to patch: ^C
$
Whiteboard: [has draft patch] → [patchlove]
Attachment #17659 - Attachment is obsolete: true
nth10sd: welcome to cvs patch land, see http://viper.haque.net/~timeless/patchtools/ for information about pdir.

in short, these two lines matter:
|Index: src/nsMimeConverter.cpp
|RCS file: /cvsroot/mozilla/mailnews/mime/src/nsMimeConverter.cpp,v

what it means is that the patch was generated from mozilla/mailnews/mime

and since you probably want to apply it to hg, you need to cd {hg:comm-central}/mailnews/mime and then use patch -p0
(In reply to comment #19)
> and since you probably want to apply it to hg, you need to cd
> {hg:comm-central}/mailnews/mime and then use patch -p0

Nope, timeless, this fails too:

===
$ pwd
/Users/skywalker/comm-central/mailnews/mime
$ patch -p0 --dry-run < ~/Desktop/diff.txt 
(Stripping trailing CRs from patch.)
can't find file to patch at input line 9
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|? diff.txt
|Index: emitters/src/nsMimeBaseEmitter.cpp
|===================================================================
|RCS file: /cvsroot/mozilla/mailnews/mime/emitters/src/nsMimeBaseEmitter.cpp,v
|retrieving revision 1.41
|diff -p -r1.41 nsMimeBaseEmitter.cpp
|*** nsMimeBaseEmitter.cpp      2000/08/22 07:02:55     1.41
|--- nsMimeBaseEmitter.cpp      2000/10/20 21:46:06
--------------------------
File to patch: ^C
$ ls emitters/src/nsMimeBaseEmitter.cpp 
emitters/src/nsMimeBaseEmitter.cpp
===

Strange is that I can actually find that nsMimeBaseEmitter.cpp file.
(In reply to comment #20)
> Strange is that I can actually find that nsMimeBaseEmitter.cpp file.

Strange is that I can actually find that nsMimeBaseEmitter.cpp file, but patch -p0 can't find it, or am I not following some instructions properly?
Attached patch proper cvs patch (obsolete) — Splinter Review
ok, the patch was malformed, patch relies on a lower section in order to be able to give useful applications. i've rediffed it for convenience
ok. i can't figure out which patch was "supposed" to have added this, but it's already in, and afaict this is the comment which acknowledged the commit:

bug 169588 comment 14
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 169588
Attachment #379472 - Attachment is obsolete: true
Whiteboard: [notacrash]
You need to log in before you can comment on or make changes to this bug.