Closed
Bug 86364
Opened 23 years ago
Closed 23 years ago
Inbox is now empty in the mail reader
Categories
(MailNews Core :: Database, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: jean-max.reymond, Assigned: Bienvenu)
Details
Attachments
(4 files)
120 bytes,
text/plain
|
Details | |
146.28 KB,
text/plain
|
Details | |
2.23 KB,
patch
|
Details | Diff | Splinter Review | |
3.32 KB,
patch
|
Details | Diff | Splinter Review |
From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.11-2mdk i686; en-US; rv:0.9.1) Gecko/20010607 BuildID: 2001060713 I have lost all the message in Inbox Now, there is 0 messages In the mail directory, all seems OK with a Inbox file of 13M Reproducible: Always Steps to Reproduce: 1.read my Inbox 2. 3.
Comment 1•23 years ago
|
||
This stuff happened to me usually when using old version Netscape 6.01. In fact, I had a solution for this when it happened: 1. Close all mozilla windows. 2. Rename your Inbox mail file as, for example, "Inbox-". 3. Create a blank file (size 0 bytes) an name it as "Inbox". 4. Open Mozilla Mail and see againt that your Inbox is empty. 5. Close again mozilla windows. 6. Delete file "Inbox" and rename again the file "Inbox-" to "Inbox". 7. Open Mozilla Mail and open Inbox. 8. Mozilla will say "Building summary file for Inbox" and all your messages will be there again. That's the method I used. Hope it's useful for you. I don't know why it happens again with this new Moz version 0.9.1.
Reporter | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
you can send me the Inbox.msf and I can look at it, but the problem is figuring out how it got corrupted in the first place.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 4•23 years ago
|
||
Assignee | ||
Comment 5•23 years ago
|
||
Assignee | ||
Comment 6•23 years ago
|
||
Can I get some code reviews? The fix is to detect the mork error, and in that case, close the db, delete it, and return an error to the caller who will regenerate the db. Thanks. This also has a potential fix for a top crasher, checking for a null store in GetThreadForSubject.
Status: NEW → ASSIGNED
Comment 7•23 years ago
|
||
1) + else + { + // this will make the db folder info release its ref to the mail db... + NS_IF_RELEASE(mailDB->m_dbFolderInfo); + mailDB->ForceClosed(); + NS_RELEASE(mailDB); + summarySpec.Delete(PR_FALSE); + err = NS_MSG_ERROR_FOLDER_SUMMARY_MISSING; + } + what about setting mailDB to nsnull after you release it? 2) after your patch, it looks like the code will look like this: if (NS_SUCCEEDED(err)) { ... if (err != NS_OK) { XXX // existing code } } else { XXX // your new code } where XXX is the same bit of code to do the cleanup. can you move it out into a method? (note the original XXX, they set mailDB = NULL. we should set it to nsnull.
Comment 8•23 years ago
|
||
whoops, I forgot to add: after you address the duplicated code, sr=sspitzer. it looks good.
Comment 9•23 years ago
|
||
whoops, bienvenu pointed out why we can't move it out to a method. but he's trying a different approach to avoid duplicating the common code.
Assignee | ||
Comment 10•23 years ago
|
||
Comment 11•23 years ago
|
||
This function sure needs some whitespace fix. Also I see that err from err = mailDB->OpenMDB((const char *) summarySpec, create); is being reset here + err = NS_MSG_ERROR_FOLDER_SUMMARY_OUT_OF_DATE; + deleteInvalidDB = PR_TRUE;
Assignee | ||
Comment 12•23 years ago
|
||
the diff is -uw, and I think I've fixed all the whitespace issues. The resetting of the err is intentional.
Comment 13•23 years ago
|
||
r=naving
Comment 14•23 years ago
|
||
-*pMessageDB = NULL; delete mailDB; - mailDB = NULL; + mailDB = nsnull; why'd you remove the first line? talking to david over aim, he's going to replace "delete mailDB; mailDB = NULL;" with NS_IF_RELEASE(mailDB); looks good, sr=sspitzer
Assignee | ||
Comment 15•23 years ago
|
||
I removed the first line because we're initializing *pMessageDB = nsnull at the top of the routine, so we don't need to set it in this error case because no one else has changed it before this point in the code.
Comment 16•23 years ago
|
||
thanks for clarifying. sr=sspitzer
Assignee | ||
Comment 17•23 years ago
|
||
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 18•23 years ago
|
||
Is this corruption of the inbox.msf file easy to reproduce on any mail server? If so, can someone give me steps. If not, Jean-Max can you confirm your mail box is OK now so I can verify this. Thanks,
Reporter | ||
Comment 19•23 years ago
|
||
I confirm, now it is correct. no more corruptions of any folder
verifying fixed per reporter's comments.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•