Closed Bug 299346 Opened 15 years ago Closed 9 years ago

address book deleted when opening TBird - 2nd x in a month~

Categories

(Thunderbird :: Address Book, defect, critical)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: homepeace, Assigned: Bienvenu)

References

(Blocks 1 open bug)

Details

(Keywords: dataloss, Whiteboard: comment 16)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050630
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050630

When I open TBird, a window opens and says, (in my own words) "Address book has
been deleted/corrupted, address book now available under Personal Address Book".

I'm sorry I don't have the exact language.  But, sure as schlitz, all the
contents of my address book are gone.  This is a supreme hassle.  It seems to
occur randomly.  It happens right after I have started the computer.

Reproducible: Couldn't Reproduce

Steps to Reproduce:
1.Turn on computer.
2.Open TBird.
3.Hope that by an act of Congress, the darn thing will reproduce so I can convey
the actual @$*)_(&&!&(# error message to the nice people in the Bug room



Expected Results:  
Not messed with my addresses.  At least it could have told me where they went. 
It gave no clues or leads.
did the error message mention that a backup of your address book was created? If
you look in your user profile dir, you'll probably see a file with a name like
abook.mab.bak. your user profile dir is usually c:\documents & settings\<user
name>\application data\thunderbird\profiles<xxx.slt>.

You may be able to copy that .bak file over the .mab file to restore the
contents of your old ab (after making a copy of the .mab file, just to be safe)
if the file exists, but there was an error opening the file, we're going to say
it's a permission problem, and not try to rename the db...
Attachment #188170 - Flags: review?(bugzilla)
Comment on attachment 188170 [details] [diff] [review]
fix for dealing with locked db files

As discussed on IRC, I'd like to see an alert to the user warning that the
files are locked by something else. It should only be once per session though.

One other thing:

-	       ret = NS_ERROR_FAILURE;	//check: use the right error code
+	       ret = NS_ERROR_FILE_ACCESS_DENIED;  //check: use the right error
code

Do we know if this is the right error code now?
Attachment #188170 - Flags: review?(bugzilla) → review-
Errm, the patch also stops import working (at least on linux). I get the error
raised at this line:
http://lxr.mozilla.org/seamonkey/source/mailnews/import/src/nsImportAddressBooks.cpp#805

The code is equivalent to NS_ERROR_FILE_ACCESS_DENIED, remove your patch and it
works fine.
I'll change the error code comment...not sure why import would stop working. I
tried to make it an error only if the db file actually already existed. Ah,
which is what the import code does. Bad import code; it should let the address
book code create the db. sigh...not sure what to do about that.
this adds the error message, once per session (I'm not thrilled with that, but
I'm not sure what else to do), and fixes the empty db case, which should fix
the import problem.
Assignee: mscott → bienvenu
Attachment #188170 - Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Attachment #188945 - Flags: review?(bugzilla)
pinging for review...
*** Bug 300918 has been marked as a duplicate of this bug. ***
Comment on attachment 188945 [details] [diff] [review]
address comments.

+    static PRBool gAlreadyAlerted;

This needs to be initalised to PR_FALSE.

r=me with that fixed.
Attachment #188945 - Flags: review?(bugzilla) → review+
Comment on attachment 188945 [details] [diff] [review]
address comments.

the linker will make sure statics get initialized to 0, but I can add it...
Attachment #188945 - Flags: superreview?(mscott)
Attachment #188945 - Flags: superreview?(mscott) → superreview+
Attachment #188945 - Flags: approval1.8b4?
Attachment #188945 - Flags: approval1.8b4? → approval1.8b4+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
*** Bug 292207 has been marked as a duplicate of this bug. ***
*** Bug 286649 has been marked as a duplicate of this bug. ***
*** Bug 298551 has been marked as a duplicate of this bug. ***
what was fixed here?  It looks like the error handling was fixed, but nothing has been done to prevent corruption.  Which is fine if that's how you want to use this bug, but then other bugs about people losing their address books shouldn't be duped to this one.
(In reply to comment #14)
> what was fixed here?  It looks like the error handling was fixed, but nothing
> has been done to prevent corruption.  Which is fine if that's how you want to
> use this bug, but then other bugs about people losing their address books
> shouldn't be duped to this one.
> 

From the comments, it doesn't seem as though this bug has ever been fixed.  I'd love to use TBird again, as long as I don't have to go through this type of nonsense.  Thanks to whoever picked up on this.(In reply to comment #14)
> what was fixed here?  It looks like the error handling was fixed, but nothing
> has been done to prevent corruption.  Which is fine if that's how you want to
> use this bug, but then other bugs about people losing their address books
> shouldn't be duped to this one.
> 

Diana Riehm
Consumer
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
if the bug is what I'm thinking it is, it's similar to the rdf corruption.  What's been happening is on shutdown, mozilla apps aren't done writing to some files but the process isn't persisting until they're done.  If this is the problem, you can avoid it by shutting down thunderbird by hand before restarting the computer (although in the event of a crash, one would need backups).

Perhaps TB should use something like Firefox's bookmarks backups for the address book?
Blocks: 292207
Duplicate of this bug: 292207
I have opened bug 366457 which seems similar, yet still different to this bug. Can anyone reading this bug please comment or link these two issues if they are from similar causes or problems?

Thanks,
Robert
QA Contact: address-book
Mark/D, what's left to do here?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: dataloss
Blocks: 366457
reporter no longer using TB
Diana, was the message you received something like "One of your address book files (<name> file) could not be read. A new <name> file will be created and a backup of the old file, called <name>, will be created in the same directory."

Robert, unclear if your issues are the same.  Of course, the systems

There is also Bug 364795 - Hourglass on folders window after msg


(In reply to comment #16)
> Perhaps TB should use something like Firefox's bookmarks backups for the
> address book?

There are one or more profile bugs that talk about this
bienvenu, what's left here?  does bug 366457 cover it?
ref: comment 14
yeah, I'd say bug 366457 covers it, though I have no idea what's going on, other than the linux problem of a re-used file handle getting written to, which is fixed.
marking fixed - remaining issue(s) covered in bug 366457
Status: NEW → RESOLVED
Closed: 15 years ago9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.