Closed Bug 223162 Opened 21 years ago Closed 20 years ago

corrupted prefs.js is saved

Categories

(SeaMonkey :: MailNews: Account Configuration, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 193638

People

(Reporter: jrhett, Assigned: sspitzer)

References

Details

Attachments

(1 file)

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

Every time I log out and log back in I no longer have e-mail accounts.  I have
to start from scratch.

Reproducible: Always

Steps to Reproduce:
1. Log in to XP
2. Start Mozilla Mail
3. Fill out the dialog to set up IMAP mailboxes
4. Read mail, reply, etc.
5. Shut down mail
6. Log out of XP
7. Log into XP
8. Open Mozilla Mail

Actual Results:  
Says that I have no mailboxes defined.

Expected Results:  
Show me the mailboxes I defined last time.

Closing mail and reopening it is fine.  But something about logging out and in
loses all of this information.  This is replicable across both systems that
never had Mozilla, and systems that used to have Mozilla 1.4 and were upgraded.
This isn't a minor issue.  Unless you can offer a fix shortly (like yesterday!)
I'll be forced to go backwards to 1.4 until a fix is found.

This problem is replicable on 3 distinct systems I'm using 1.5 on -- my laptop,
my home WinXP pc and my office desktop.  There is nothing in common of any of
these systems other than they are all WindowsXP and using Mozilla 1.5.
I finally got a chance to debug this problem, after I found that sometimes my
accounts were around and then randomly weren't -- no related to logins.  It
turns out that every time Mozilla is closed, it writes out a corrupted prefs.js
file into the profile directory.  Attached is a corrupted prefs.js.

Every time it is different, but every time there the same problem persists: some
amount of the final 2-3 lines in the file are repeated.  Usually from the middle
of the last second or third line will be repeated, like so:

user_pref("prefs.converted-to-utf8", true);
user_pref("security.warn_entering_secure", false);
user_pref("security.warn_submit_insecure", false);
user_pref("signon.SignonFileName", "67127717.s");
user_pref("timebomb.first_launch_time", "1066949870088190");
warn_submit_insecure", false);
user_pref("signon.SignonFileName", "67127717.s");
user_pref("timebomb.first_launch_time", "1066949870088190");

Also, a different corruption happened higher up in the file:

user_pref("mail.server.server1.namespace.other_users", "\"Other Users.\"");
user_pref("muser_pref("mail.server.server1.namespace.public", "\"Common.\"");
user_pref("mail.server.server1.port", 993);

The corruption is repeatable.  I clean up the file, start Mozilla and all my
mailboxes are there and working.  I make any change to my preferences, save the
change and close the browser -- corruption is found in the file.
Severity: blocker → critical
Summary: Every time I log in, all e-mail accounts are undefined. → corrupted prefs.js is saved
Do you use some anti-virus software and enable "Mail scan function" of it?
If yes, this problem seems to be same situation as Bug 213300 and Bug 192119.
Yes, but PC-cillin only does POP scanning, and doesn't affect IMAP servers. 
POP3scan is disabled as well.  The server isn't changed to localhost in any of
the files.  And it only changes it once, so wouldn't explain repeated corruption
in the file.

er... or shouldn't explain...? :-(
Happened to me, today also, with four pop3 mail accounts so I guess this does
not just happen with IMAP accounts. I checked the prefs.js and for sure it was
filled with garbage from line 258 and downwards. And this has also been reported
in the forums at least once wich means that the bugs is most likely there and it
is a very serious one since you actually loose all your settings.
Joe Rhett, I have three questions.

(Q1) Are there any errors on scandisk?

     (1) Open MS-DOS Prompt window
     (2) scandisk
     (3) check all drives

Because some activities of some tasks interfere with scandisk, scandisk after
reboot with SAFE-Mode is recommended.

(Q2) Where are \"Other Users.\" and \"Common.\" from? (LDAP server?)
     Did you typed-in these double-quotes within some names?

(Q3) Do you use non-asci characters in some value saved in prefs.js, for
example, Windows login name, Printer name?

Mozilla has bugs to write non UTF-8 code value to some prefs.js entries if non
ASCII characters are used in file path, printer name etc.
On Win-9x, if Japanese characters are used in these names, Shft_JIS code is
directly written to some prefs.js lines.

This may cause prefs.js line corruption when reading and saving prefs.js on
restart of Mozilla.
In addition, Sun Java 1.4.x installer modifies Mozilla's prefs.js, and if some
special Shft_JIS code(HANKAKU KATAKANA characters, single byte code in JIS
character set) is included in prefs.js, Java installer corrupts prefs.js lines.

Can you attach prefs.js file both "before restart/not currupted" and "after
restart and shutdown/currupted"?
Please describe details of what you did between restart and shutdown.
1. I run scandisk weekly, no problems.

2. Common is shared IMAP folders I have access to.  Other Users is other user
mailboxes I can read and/or write to.  They are virtual folders created by
Cyrus.  I never typed these in, these were found by the mailer after logging
into the mail server.

3. No non-ascii characters in use.  

For the pref.js issue, just take the prefs.js I uploaded and remove the
duplicated lines (as per my notes) and that is what I was save and then the
mailboxes would work just fine.

Unfortunately, I can't recreate this problem because I switched to Thunderbird,
which does not demonstrate this issue.  E-mail isn't something that I can suffer
through being so severely broken for months.

The fact that thunderbird does not have this problem may hopefully help isolate
which part of the prefs.js updating routines are not involved :-)
(1) Bug 191512 seems to be same situation although corrupted prefs.js entries
are different from your case.
> Crash when sending mail with multiple outgoing servers
> (corrupt SMTP server entries in prefs.js)

(2) See Bug 132517 
> prefs.js frequently truncated on exit or crash
If truncated prefs.js problem and cross chain(or unclosed file situation) in
file allocation table occured same time, this type of data corruption may occur.

See dependency tree of Bug 123929 for other file corruption problems.

(3) There is another possible scenario because you use IMAP.

There is a bug for NNTP.
Bug 66150 Comment #14 reported many stacked connections.

In addition, on my Win-Me, POP3 and NNTP but IMAP, and ADSL environment,
although Bug 65927 was already fixed, I am experiencing unterminated
RUNDLL32.EXE tasks with NNTP connection after normal Mozilla temrmination.
They have NNTP connection to News server I accessed while Mozilla is active.
These tasks usually disappears within a few minutes in my environment.
But in dial up environment, and if dial up connection was closed before
termination of these unterminated tasks, they possibly live long time or forever
due to retry of connection until someone cancel them.

And there is Bug 115349 for IMAP.
> Mozilla doesn't properly handle IMAP logout / connection closes (RFC2060)

If these processes for unclosed IMAP connections are not terminated on Mozilla
termination like RUNDLL32.EXE tasks for NNTP in my environment,
and If these unterminated tasks are canceled on Mozilla restart, they maybe
update prefs.js on termination.
And if both of these unterminated IMAP access tasks and Mozilla(on termination
or on restart) updated prefs.js simulteneously, your case can occur if prefs.js
update module does not lock prefs.js on write.
(In reply to comment #5)
> Yes, but PC-cillin only does POP scanning, and doesn't affect IMAP servers. 
> POP3scan is disabled as well.  The server isn't changed to localhost in any of
> the files.  And it only changes it once, so wouldn't explain repeated corruption
> in the file.

Hmm ... Could this be a dupe of Bug 201812? IMO POP scanning is irrelevant,
relevant is the scanning of the prefs.js files and/or the Mozilla profile
directory. See bug 201812 comment 6 and bug 213789 comment 3. Reporter, could
you please try to exclude these files or to disable PC-cillin? Otherwise it
could be a dupe of Bug 193638.

*** This bug has been marked as a duplicate of 193638 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: