Closed Bug 427865 Opened 16 years ago Closed 15 years ago

Message filters all disappear when

Categories

(MailNews Core :: Filters, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 450424

People

(Reporter: rbs, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13
Build Identifier: version 2.0.0.12 (20080213)

At first, I blamed this on one of the remove duplicate messages add-ons since I first noticed the problem after using it. Now, however, all I have to do to get all my carefully crafted message filters to disappear is to simply close Thunderbird and reopen it.

Trying to submit a more complete bug report is impractical since my installation comprises ~2.4GB of mail folders and moving all that to a separate new installation is a hassle I really don't want to deal with. OTOH, I'd welcome any practical suggestions to help zoom in on the source of the problem.

If it even knew which file(s) is/are used to store the filters, it would help, but I don't. Since I don't, I can't even pinpoint when the filters are being deleted - presumably upon shutdown but possibly upon startup.

I haven't tried this on my Linux systems yet since I mostly process email on my Windows machine which is where all my local folders (the targets of most of my message filters) reside.

Reproducible: Always

Steps to Reproduce:
1. Start Thunderbird.
2. Open message filters dialog and enter some filters.
3. Close Thunderbird.
4. Reopen Thunderbird.
Actual Results:  
Upon reopening Thunderbird and the message filters dialog, all of the filters previously entered have vanished. The filter log remains, but the "Enable the filter log" check box has been cleared.

Expected Results:  
I expect that the message filters will persist past the current session!

Computer: HP Pavilion a1650n, AMD Athlon 64x2 4200+ (2.2 GHz), WinXP MCE, 2GB RAM. All of  my local folders are compressed.

The message filters used to work just fine until recently, although I can't pinpoint the time or event that changed it. I first noticed it after doing some maintenance using "Remove Duplicate Messages (Alternate) 0.2.2", so I uninstalled it and replaced it with "Remove Duplicate Messages 0.1.02". but I haven't used either since. I even uninstalled both, yet the problem persists. Other recent changes include:
 1. Routine updating of Thunderbird.
 2. Changing XP's folder and file compression options.
 3. Swapping out an old 160GB D: drive for a new 500GB D: drive.
 4. Installing PCLinuxOS on the new HDD.
Note that I maintain no Thunderbird files on my D: drive, however I do use compressed folders for my mail storage.

Current add-ons include:
 [Un]read 0.5
 Duplicate contact manager 0.6
 Lightning 0.8
 Mark all read button 0.2
 Nostalgy 0.2.15
 Purge! 0.4
 QuickZoom 1.0.5
 Remember mismatched domains 1.4.6
 Xpunge 0.2.3
Keywords: dataloss
Version: unspecified → 2.0
Dup of Bug 362539? See also many bugs closed as Dup of Bug 362539. 
Bob, would "recently" perhaps be when you got upgraded to TB 2.0.0.12? 


(In reply to comment #1)
> Dup of Bug 362539? See also many bugs closed as Dup of Bug 362539. 

that's fixed by bug 375292, at TB 2.0.0.12.  Which is what the reporter is running. If Bob's problem started at .12, then perhaps bug 375292 is at fault.


I have this problem again with version 3.0a2pre (2008061403)
Maximilian: filters are stored in <profile>/{ImapMail,Mail,News}/<server>/<folder>.dat or /<server>.dat; do you see filters in those files?
(In reply to comment #2)
> Bob, would "recently" perhaps be when you got upgraded to TB 2.0.0.12?

I couldn't say since I only update my filters occasionally. I do knonw I'm currently at 2.0.0.14 and the problem persists.
 
 (In reply to comment #1)
> > Dup of Bug 362539? See also many bugs closed as Dup of Bug 362539. 
> 
> that's fixed by bug 375292, at TB 2.0.0.12.  Which is what the reporter is
> running. If Bob's problem started at .12, then perhaps bug 375292 is at fault.

See above.

I've msgFilterRules.dat but it's empty. Newly created filter rules don't survive a restart of Thunderbird. No other .dat files :-(
(In reply to comment #4)
> Maximilian: filters are stored in
> <profile>/{ImapMail,Mail,News}/<server>/<folder>.dat or /<server>.dat; do you
> see filters in those files?

Yes, of course. My work-around for this has been to shut down TB, manually edit the filter files, then restart TB. by doing so, the changes persist.

(In reply to comment #6)
> I've msgFilterRules.dat but it's empty. Newly created filter rules don't
> survive a restart of Thunderbird. No other .dat files :-(

Sounds like I'm not the only one. The good news is that preexisting filter files aren't affected. I used that bit of information to open one of them (msgFilterRules.dat and tmprules.dat) and figure out the simple format. That knowledge allowed me to manually add or edit filters to my heart's content. As long as TB is shut down when I edit them, it will pick up the changes when I restart it.

It works, but it's a PITA and I'd much prefer if it worked as advertised (and as it used to work!)

It happens to me with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1a2pre) Gecko/20080812033057 Shredder/3.0b1pre on Windows XPsp2 HE. 
(In reply to comment #8)
> The good news is that preexisting filter files aren't affected.

When try to save filter, is error message issued in Error Console?

> (msgFilterRules.dat and tmprules.dat)

Does it mean tmprules.dat exists in same directory for msgFilterRules.dat?
I have the same problem, but my message rules are all gone, and when I look msgFilterRules.dat is essentially empty.

weirdly, some filters appear to be working even if I can't see them in the filter window or in the file itself.

No new files filters can be added.

A search for /tmprules-xx.dat files turned up ntohing much - a few stray files. But I don't see /user/temp anyway under documents and settings (using winXP)
(needed to move out of :general, or confirm)
Severity: major → critical
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
Version: 2.0 → unspecified
As a newbie, I unfortunately have no idea what Wayne is talking about - except to say that I can confirm this is still problem, even after completely uninstalling and reinstalling Thunderbird,.
All, Please comment whether you see this problem if you close thunderbird using File > Exit?   

Maximilian please state your operating system.  (everyone else so far is windows)
it pains me to suggest closeme on this, but we're stuck without further feedback, unless someone has a debug or related bug suggestion.  maybe we need a profile from someone who's seeing this?
Keywords: qawanted
Whiteboard: closeme 2009-12-01
I also have had them disappear again.  But, the filter rules are working.  Very strange.

Kathy
I too am having this issue - I have since used a backup msgFilterRules.dat file
for my Local Folders settings. The filters now seem to function, but I can not
edit them via the Thunderbird UI - I must edit them outside of Thunderbird.
BTW, there is no current tmprules.dat in my Local Folders directory.

When starting Thunderbird, I do get some errors in the console (see below). I
am running v 2.0.0.23 (20090812).  Please let me know if there is anything more
I can do to help debug this issue.

Error: uncaught exception: [Exception... "Component returned failure code:
0x8052ffff [nsIMsgFilterList.saveToDefaultFile]"  nsresult: "0x8052ffff
(<unknown>)"  location: "JS frame ::
chrome://messenger/content/FilterListDialog.js :: onFilterServerClick :: line
189"  data: no]

Error: uncaught exception: [Exception... "Component returned failure code:
0x8052ffff [nsIMsgFilterList.saveToDefaultFile]"  nsresult: "0x8052ffff
(<unknown>)"  location: "JS frame ::
chrome://messenger/content/FilterListDialog.js :: onFilterClose :: line 396" 
data: no]

Error: uncaught exception: [Exception... "Component returned failure code:
0x8052ffff [nsIMsgFilterList.saveToDefaultFile]"  nsresult: "0x8052ffff
(<unknown>)"  location: "JS frame ::
chrome://messenger/content/FilterListDialog.js :: onFilterClose :: line 396" 
data: no]
(In reply to comment #17)

Same phenomeon as Bug 450424?
Those error messages in comment 17 are some sort of file system error from the Mozilla core code, interpreting either a PR system error or a native error return. Hard to decipher which one though.

As to bug 450424, that requires that tmprules.dat be around. At least some reporters of this bug claim to have searched and found none. But it would still be good to try to artificially cause bug 450424 by adding some stray tmpules.dat files, and see if the error messages are the same as comment 17.

One way to interpret this bug would be to describe it as "Saving of filter lists not robust to file system errors" and see if we can rework the filter list editor code to either recover better from errors, at least give back meaningful codes that would allows some interpretation of what is happening, and warn the user prominently when an edited filter list fails to save.
Please let me know if there is any other information you need from my situation.

In addition to fixing the core issue, is there some sort of short-term workaround I can do to re-enable functionality of the Thunderbird filter dialog?
(In reply to comment #20)
> In addition to fixing the core issue, is there some sort of short-term
> workaround I can do to re-enable functionality of the Thunderbird filter
> dialog?

I work around this by:

1. Shutting down Thunderbird.

2. Go into each affected email directory/folder and manually editing the msgFilterRules.dat files. You can use the existing filters as temlpates - the files are human readable and the filter rules syntax is pretty simple and straightforward.

3. Restarting Thunderbird.

Still. this is more work than a user should have to do and after a few years, you'd think someone would fix this glaring flaw.
(In reply to comment #20)
> Please let me know if there is any other information you need from my
> situation.
> 

I would like to know:

1) What OS you are running,
2) What version of TB are you running,
3) Do you have any files named tmprules*.dat in your profile?

If this is reproducible for you, some sort of log from the OS of file transactions would be helpful, such as is doable with filemon or procmon under Windows.
(In reply to comment #22)
> I would like to know:
> 
> 1) What OS you are running,

Windows XP SP3

> 2) What version of TB are you running,

v 2.0.0.23 (20090812)

> 3) Do you have any files named tmprules*.dat in your profile?

No tmprules*.dat in the Local Folders directory where the message filters is that I'm concerned about. There are tmprules*.dat files in other account directories, but my message filters are only defined within Local Folders.

> If this is reproducible for you, some sort of log from the OS of file
> transactions would be helpful, such as is doable with filemon or procmon under
> Windows.

Reproducible in what manner? It is reproducible in that I can now rerun Thunderbird and not have it display any of the message filters in the dialog but they continue to work after I have restored the file.

The log I have of file events is still very big and I wouldn't think you would need the whole thing. Anything in specific I should be filtering on before submitting it?  I see plenty of working reads on the msgFilterRules.dat file along with lots of other things.
(In reply to comment #23)
> No tmprules*.dat in the Local Folders directory where the message filters is that I'm concerned about.
> There are tmprules*.dat files in other account directories,
> but my message filters are only defined within Local Folders.

Even if you don't define message filter rules for other account than "Local Folders", msgFilterRules.dat of no rule(next header only) in other mail directory is read and updated upon restart and termination of Tb.
> version="9"
> logging="no"
Delete all tmprules.dat in mail directories. Can you reproduce your problem?
(In reply to comment #24)
> Even if you don't define message filter rules for other account than "Local
> Folders", msgFilterRules.dat of no rule(next header only) in other mail
> directory is read and updated upon restart and termination of Tb.
> Delete all tmprules.dat in mail directories. Can you reproduce your problem?

Ok, I deleted all tmprules.dat from under that profile and restarted Thunderbird. It still has the same issue as before - no filters are showing up in the filters dialog.
/(In reply to comment #25)
> Ok, I deleted all tmprules.dat from under that profile and restarted Thunderbird. 
> It still has the same issue as before - no filters are showing up in the filters dialog.

Does msgFilterRules.dat contain filter rules?
(In reply to comment #26)
> Does msgFilterRules.dat contain filter rules?

All msgFilterRules.dat files outside of the Local Folders directories have no active rules - only the usual header:

version="8"
logging="no"

My Local Folders msgFilterRules.dat file has the header with the exception of logging="yes" along with all of my rules.
(In reply to comment #27)
> My Local Folders msgFilterRules.dat file has the header with the exception of
> logging="yes" along with all of my rules.

Have you checked tmprules*.dat files in temporary directory?
Bug 362539 is closed as FIXED. But it means that bug of "garbages of tmprules*.dat files in temporary directory is created in normal/ordinal condition" is resolved. The FIXED of Bug 362539 doesn't mean that phenomenon of Bug 362539 won't occur even if garbages of tmprules*.dat files exist in temporary directory.
(In reply to comment #28)
> Have you checked tmprules*.dat files in temporary directory?

There was a tmprules.dat file in my
C:\Documents and Settings\egsavage\Local Settings\Temp
directory which I just removed. After that, the filter dialog came up as expected and I was able to make modifications and save them. Thanks.
I also removed the tmprules.dat and my filters showed up again and problem fixed.

Kathy
Thanks WADA for your analysis, and Kathy and Ed for patience with this. So it appears to be a variation of the phenomena of bug 450424. So I think that at this point the best strategy is to dup the bugs - and I'll set bug 450424 as the parent.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Keywords: dataloss, qawanted
Resolution: --- → DUPLICATE
Summary: Message filters all disappear when Thunderbird is turned off → Message filters all disappear when
Whiteboard: closeme 2009-12-01
(In reply to comment #30)
> I also removed the tmprules.dat and my filters showed up again and problem
> fixed.
> 
> Kathy

Kathy, what version of TB are you running?
You need to log in before you can comment on or make changes to this bug.