Closed
Bug 141354
Opened 22 years ago
Closed 22 years ago
adding new filter corrupts filter file
Categories
(MailNews Core :: Filters, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: dwallach, Assigned: naving)
Details
(Keywords: dataloss, Whiteboard: [adt2 RTM] [Needs a=])
Attachments
(3 files, 1 obsolete file)
60.69 KB,
text/plain
|
Details | |
136.12 KB,
text/plain
|
Details | |
2.81 KB,
patch
|
Bienvenu
:
review+
mscott
:
superreview+
jud
:
approval+
|
Details | Diff | Splinter Review |
I've got 285 filters. If I try adding more through the GUI, the resulting rules.dat file will be corrupt. It's 100% reproducible. I'm attaching two files. "rules8.dat" is the correct pre-corruption file. I then added one rule and the file size doubled. This is attached as "rules.dat". If you search for "Nettle" in the text, you'll find the first corruption, and then it gets worse from there. "rules8.dat", FYI, was a file I created by hand from my Netscape 4.x rules file (mechanically rewriting the "//imap:" strings to the new URL style, but otherwise making no changes). I had to do that because, by the time I realized the corruption had happened, the auto-imported file was long gone and this was all that I had left. If I use my rules file like this without trying to edit it, everything works great. Versions: I don't recall having any problems with this in earlier Mozilla builds (0.9.7 seemed pretty good for me), but the problem has been worse, lately. I'm currently running 1.0RC1. Start a fresh copy with "rules8.dat" as the rules, add one filter rule, and quit. Same corruption, every time.
Reporter | ||
Comment 1•22 years ago
|
||
Reporter | ||
Comment 2•22 years ago
|
||
Eek. Your life must be pretty complicated if you need 285 filters. My condolences.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 4•22 years ago
|
||
I try to have one folder per person with who I regularly correspond. Stretch that out over near ten years of saved e-mail, then add in a ton of anti-spam rules, and it adds up quick.
Assignee | ||
Comment 5•22 years ago
|
||
The problem was customHeaders were not present in mailnews.customHeaders pref but they were present in rules.dat. This was causing the corruption (atleast for me). The fix is to look for the header in the pref and if it is not there add it. The pref is later read when we try to edit an existing filter. david, can you review ? thx.
Assignee | ||
Comment 6•22 years ago
|
||
I think we should take this for beta because 4x rules.dat directly copied to 6x will cause this problem if there are customHeaders in the filters.
Assignee | ||
Comment 7•22 years ago
|
||
David, can you review the proposed fix, thx. I don't know if you saw my earlier request.
Comment 8•22 years ago
|
||
doesn't this leak headersString? + *attrib += i; //we found custom header in the pref + return NS_OK; If I understand the patch correctly (which is a long shot :-) ), you're adding the header to the pref if you don't find it in the existing pref?
Assignee | ||
Comment 9•22 years ago
|
||
I have added an assertion so that we know we have more than 50 hdrs in the pref. At present we allow a max of 50 hdrs and I have a bug about that.
Attachment #81942 -
Attachment is obsolete: true
Comment 10•22 years ago
|
||
Comment on attachment 82072 [details] [diff] [review] proposed fix w/ freeing of headerString r=bienvenu - normally, if you add an assertion, you should also add the code that deals with the situation, but as long as there's a separate bug about it, it's OK.
Attachment #82072 -
Flags: review+
Comment 11•22 years ago
|
||
Comment on attachment 82072 [details] [diff] [review] proposed fix w/ freeing of headerString sr=mscott
Attachment #82072 -
Flags: superreview+
Assignee | ||
Comment 12•22 years ago
|
||
fixed
Comment 13•22 years ago
|
||
Does size matter, or can one gte in this state with less than a few hundred filters?
Reporter | ||
Comment 14•22 years ago
|
||
Has this found its way into the nightly build yet? If not, what do I have to download to verify the fix?
Assignee | ||
Comment 15•22 years ago
|
||
Dan, you can download today's build and the fix should be in it. size of filter doesn't matter, you can get into this state with few filters if all of them happen to use custom headers.
Comment 16•22 years ago
|
||
Let's get this one in after RC2. adt1.0.0- [adt2 RTM]
Comment 17•22 years ago
|
||
Using may03 trunk: Did not see any corruption unless I launched with customheader pref having over 50 headers -- that caused a crash and messed up my custom header rules in rules.dat. Saw the crash and a UI problem... will log new report(s) or comment in the bug dealing with the 50 maximum -- bug 104085. For the fix case and under 50 custom headers I saw no corruption: 1. Tried with several different custom headers called in different rules conditions in the rules.dat file when NO custom headers were defined in prefs/ui. Added new filters, no problem. Got mail, no problems. Exited and returned and added filters, no problem. 2. Tried same scenarios with several different custom headers called in different rules condition in the rules.dat file when only a couple of the headers were already defined in prefs/ui.
Comment 18•22 years ago
|
||
Also tried where some rules were AND, some OR with custom header and other subj/sender as criteria -- all rules contained custom header. Whether incoming messages matched filters or not, all worked fine. Did not see corruption. Any custom headers called out in rules that were not originally specified in prefs.js were added, so that the ui, rules.dat and prefs.js custom header list was in sync (or is that "NSync"?). Marking verified for trunk. Reporter: if you see differently, please reopen.
Status: RESOLVED → VERIFIED
Reporter | ||
Comment 19•22 years ago
|
||
FYI, I finally got around to trying the latest nightly build, and the problem is fixed. It's not in 1.0RC2, but I guess this fix didn't find its way here.
Assignee | ||
Comment 20•22 years ago
|
||
We should take this now, mozilla1.0 has shipped. >------- Additional Comment #16 From Jaime Rodriguez, Jr. 2002-05-03 14:00 ------- >Let's get this one in after RC2. adt1.0.0- [adt2 RTM]
Comment 21•22 years ago
|
||
adt1.0.1+ (on ADT's behalf) approval for checkin to the 1.0 branch. pls check this in asap, then add the "fixed1.0.1" keyword.
Updated•22 years ago
|
Attachment #82072 -
Flags: approval+
Comment 22•22 years ago
|
||
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+" keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1 → mozilla1.0.1+
Comment 24•22 years ago
|
||
OK using june21 commercial branch: win98, linux rh6.2, mac OS 9.2
Keywords: fixed1.0.1 → verified1.0.1
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
•