Closed Bug 75650 Opened 24 years ago Closed 24 years ago

Posting news msgs doesn't clean up temp files at all

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: cavin, Assigned: bugzilla)

Details

Attachments

(3 files)

Either you post a new msg or reply to a news msg, temp files don't seems to get cleaned up at all.
In nsMsgComposeAndSend::DeliverFileAsNews() the code, for some reason, increments the refcnt by two for NNTP service. The comment seems to indicate that the code may have problems too!! Her is the code segment: if (NS_SUCCEEDED(rv) && nntpService) { . . . NS_ADDREF_THIS(); // two addrefs on ourselves? This looks bogus too.... AddRef(); . . . } Any idea why it's done this way? It may be the reason why the temp files are not being cleaned up (in the destructor).
nice catch cavin. use http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/mailnews/compose/src/nsMsgSend .cpp to see when (and why) that was done. mscott added that comment about the two addref's being bogus.
It was on Nov 22 1999 (v1.140) but did not mention why.
isn't 1.40 version where mscott added his comment about the addref being bogus? who made the change before that? (probably rich, but why?)
I'm testing a patch from ducarroz that might fix this. we hope to land tonight, and then you can return to this.
ducarroz has landed his massive patch. once you update and rebuild you can continue to investigate.
QA Contact: esther → stephend
Looks like my patch fix the problem with remote attachment but not with local attachment :-(
...but both cases works fine on Mac for me!
We are leaking nsMsgAttachmentHandler which hold a reference on nsMsgComposeAndSend. Therefore the destructor of nsMsgComposeAndSend is never called which result to those temp files not removed.
In fact, any local attachment are leaking on Windows and Linux. It's not the case on Mac because we are doing extra processing for AppleDouble which which correctly cleanup the attachment. New patch coming...
Assignee: cavin → ducarroz
accepting :-)
Status: NEW → ASSIGNED
R=varada
Whiteboard: Fix in hand
looks ok to me. sr=sspitzer make sure to test this on multiple platforms, and under all the usual scenarios (news, mail, news & mail at the same time, bcc, fcc, etc).
Fixed and checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Whiteboard: Fix in hand
In verifying this, where would the temp files have been before? Would they have been in C:\Documents and Settings\Administrator\Application Data\Mozilla\Users50\Default User\fhihyzp8.slt\News -or- C:\Documents and Settings\Administrator\Application Data\Mozilla\Users50\Default User\fhihyzp8.slt\NewCache ?
on windows, they are in c:\temp
on linux, TMPDIR which is probably /tmp.
Posting to netscape.test on news.mozilla.org showed no signs of temp files (after completing a post) with builds: 2001-04-18-04 on Win2K (searched C:\TEMP and the Application Data folder and C:\WINNT\Temp. 2001-04-18-08 RedHat 7.0 using Applications/Text Editor (KDE pre-defined shortcuts). Not sure where Mac OS 9.1 stores temp files. And mac doesn't do file extensions like win/linux do, so I'll wait before I verify on that platform.
On Mac, temp files are in an invisible folder on your primary HD named "Temporary Items". This folder is automatically cleanup by the OS every time you boot. I have attached a Sherlock Search Criteria that will help you find new temp file created by Mozilla Mail during a Send process. Just install this file on your Mac and doubleclick on it...
I searched for invisible folder "Temporary Items" using Sherlock 2 on Mac OS 9.1 after posting to netscape.test using build 2001-04-19-08 and found only a few HTML files, nothing related to news at all.
Status: RESOLVED → VERIFIED
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

Created:
Updated:
Size: