Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 713429 - All message filters disappear
: All message filters disappear
: dataloss, regression
Product: MailNews Core
Classification: Components
Component: Filters (show other bugs)
: Trunk
: x86_64 All
: -- critical (vote)
: Thunderbird 12.0
Assigned To: David :Bienvenu
: 714104 714296 (view as bug list)
Depends on: 707306
  Show dependency treegraph
Reported: 2011-12-25 03:54 PST by Sune Mølgaard
Modified: 2011-12-30 10:50 PST (History)
12 users (show)
mats: in‑testsuite?
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

proposed fix (792 bytes, patch)
2011-12-27 08:37 PST, David :Bienvenu
neil: review+
mozilla: approval‑comm‑aurora+
Details | Diff | Splinter Review

Description Sune Mølgaard 2011-12-25 03:54:29 PST
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0a1) Gecko/20111225 Firefox/12.0a1 SeaMonkey/2.9a1
Build ID: 20111225003005

Steps to reproduce:

Upgrade SM to latest nightly on Dec. 24th and start it

Actual results:

No mail was filtered - turned out that all filters had disappeared from the message filter dialog. msgFilterRules.dat was empty except for version and logging ("9" and "no" respectively).
Happened again with trunk from 25th - my newly created filters were gone again...

Expected results:

Filters should have stayed in place...
Comment 1 Matthias Versen [:Matti] 2011-12-25 12:16:32 PST
wfm with Mozilla/5.0 (Windows NT 6.1; rv:12.0a1) Gecko/20111225 Firefox/12.0a1 SeaMonkey/2.9a1

My single message filter is still there.
Comment 2 Sune Mølgaard 2011-12-25 15:21:26 PST
Ah, yes, sorry. This is Linux.

Furthermore, I have discovered that if I add a new rule, then try to add another, the second one replaces the first...
Comment 3 Wayne Mery (:wsmwk, NI for questions) 2011-12-27 06:55:43 PST
In the same time frame 
- I've lost filters as noted in bug 713253. 
- the reporter of bp-7a462531-f732-415e-942d-665e12111225 also lost filters. his last message to me ...

"I had the profile window open when I loaded this
12.0a1. It appears that it over wrote the existing msgFilterRules.dat
or erased its contents when Thunderbird loaded. The actual file is empty
but the 'message filters' (loaded into memory?) still show in the GUI
and they continue to function as written until I close Thunderbird. Or
it crashes and closes itself. Evidently it then reads the empty file. The GUI appears to allow me to add filters but when I close the window and reopen it it is empty."
Comment 4 Wayne Mery (:wsmwk, NI for questions) 2011-12-27 07:02:41 PST
dgboles ... has a -thunderbird option according to :protz
Comment 5 David 2011-12-27 07:22:21 PST
(In reply to Wayne Mery (:wsmwk) from comment #4)
> dgboles ... has a -thunderbird
> option according to :protz

Hmm... On the webpage <> it says  mozregression --app=thunderbird. Note the two dashes. That did not work.

However that fails with an error. If I knew how to add an attachment here I would so I will put it here. Please feel free to copy it here.

Comment 6 David :Bienvenu 2011-12-27 08:37:28 PST
Created attachment 584442 [details] [diff] [review]
proposed fix

this fixes filter loss, so I'd like to land it asap.
Comment 7 2011-12-27 09:41:32 PST
Comment on attachment 584442 [details] [diff] [review]
proposed fix

>-  NS_ENSURE_ARG(! (filterCount >= filterIndex));
>+  NS_ENSURE_TRUE(filterCount > filterIndex, NS_ERROR_INVALID_ARG);
[Would have preferred NS_ENSURE_ARG(filterCount > filterIndex);]
Comment 8 David :Bienvenu 2011-12-27 11:15:56 PST
ok, switched back to NS_ENSURE_ARG -
Comment 9 Sune Mølgaard 2011-12-27 11:27:58 PST
May I, since this is file-based as opposed to something with sqlite, and since it's apparently easy to hit a code path that zeroes the file, that someone institutes a "copy to .bak, then write the new file" thing, as it's apparently done for sessionstore.json, that we've had problems with before, which I guess is the reason for making backups in-app as opposed to relying on the user to have a backup mechanism in place?
Comment 10 :aceman 2011-12-27 11:51:37 PST
Thanks for finding the cause David :(
Comment 11 David :Bienvenu 2011-12-27 11:57:19 PST
(In reply to :aceman from comment #10)
> Thanks for finding the cause David :(

aceman, no problem.
Comment 12 :aceman 2011-12-27 12:05:10 PST
I must be more careful next time.
Comment 13 Joe Sabash [:JoeS1] 2011-12-27 14:50:28 PST
The same fix is needed on Aurora
Comment 14 Joe Sabash [:JoeS1] 2011-12-27 19:12:21 PST
I guess that is the more proper flag to set.
Comment 15 Philip Chee 2011-12-27 19:38:27 PST
Comment on attachment 584442 [details] [diff] [review]
proposed fix

> I guess that is the more proper flag to set.
> status-thunderbird11: --- → affected
You forgot approval-comm-aurora?
Comment 16 David :Bienvenu 2011-12-27 19:49:29 PST
Comment on attachment 584442 [details] [diff] [review]
proposed fix

we should land this for aurora asap.
Comment 17 David :Bienvenu 2011-12-27 20:08:14 PST
fixed on aurora -
Comment 18 Wayne Mery (:wsmwk, NI for questions) 2011-12-29 11:28:44 PST
*** Bug 714104 has been marked as a duplicate of this bug. ***
Comment 19 Magnus Melin 2011-12-30 10:50:21 PST
*** Bug 714296 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.