Undoing the deletion or move of a message sometimes corrupts the thread pane (index). And shades of 1st Jan 1970

RESOLVED DUPLICATE of bug 209189

Status

Thunderbird
Mail Window Front End
RESOLVED DUPLICATE of bug 209189
6 years ago
4 years ago

People

(Reporter: gerv, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Steps to reproduce (this bug is intermittent, and used to happen a lot more than it does now):

- Go to an IMAP folder
- Using e.g. the archive function, move 4 messages to another IMAP folder on the same 
  server
- Press Ctrl-Z four times

Expected: messages return to the current folder, correctly threaded, and the entire thing works out as a no-op

Actual: messages return, incorrectly threaded (normally appended to the end of a thread) AND (more the subject of this bug), archiving those messages again leads to the appearance of phantom "1st Jan 1970, no subject, no sender" lines in the thread pane. The only fix is to rebuild the indexes.

Gerv

Comment 1

6 years ago
perhaps related to bug 93923 and bug 209501
Summary: Undoing the deletion or move of a message sometimes corrupts the thread pane (index) → Undoing the deletion or move of a message sometimes corrupts the thread pane (index). And sahdes of 1st Jan 1970

Comment 2

6 years ago
gerv, is this still reproducible?

ref bug 439333 comment 23
Summary: Undoing the deletion or move of a message sometimes corrupts the thread pane (index). And sahdes of 1st Jan 1970 → Undoing the deletion or move of a message sometimes corrupts the thread pane (index). And shades of 1st Jan 1970
wsmwk: having done a bit of testing, I currently see the following:

Pressing "Archive" on a message which is not a leaf in a thread, and then undoing it, restores the message to the wrong place in the thread, and sometimes turns it into a different message from the thread until I rebuild the index. In other words, "Undo" does not correctly update the message index with respect to thread information. This can happen with only a single message being archived; you don't need multiple.

However, I am unable to reproduce the problem of having repeated archivings and unarchivings lead to phantom 1970 messages.

Gerv

Comment 4

5 years ago
I've certainly seen the phantom 1st Jan 1970 messages.

It mostly seems to happen on slow IMAP connections (e.g. a Cafe, or tethered or in a developing country) where IMAP is probably not keeping up.

Comment 5

5 years ago
I frequently see thread index corruption in my IMAP folders, i.e., messages showing up in completely wrong threads, which I am only able to fix by repairing the folder (i.e., rebuilding the thread index), which is rather annoying for a folder which has >100MB of email in it!

Since I do occasionally move messages into other folders and then realize I made a mistake and undo the move with ^Z, I wonder if this is the cause of the problem.

It's rather annoying.

Comment 6

5 years ago
Looking at the code in nsMsgDatabase.cpp, at first glance it appears to me that deleting a message removes it from the header database but undeleting it doesn't add it back to the header database. Perhaps I'm missing where the add back happens, but if not, then that could be part of the problem here.
jik: good spot! Don't stop investigating! :-)

Gerv

Comment 8

5 years ago
(In reply to Jonathan Kamens from comment #6)
> Looking at the code in nsMsgDatabase.cpp, at first glance it appears to me
> that deleting a message removes it from the header database but undeleting
> it doesn't add it back to the header database. Perhaps I'm missing where the
> add back happens, but if not, then that could be part of the problem here.

could this also explain/partly explain bug 813680, bug 786155, bug 93923 (bug 638024)?

(In reply to Gervase Markham [:gerv] from comment #7)
> jik: good spot! Don't stop investigating! :-)
> 
> Gerv

Indeed!

finally, is this duplicate of bug 209189?
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: needinfo?(jik)
Resolution: --- → DUPLICATE
Duplicate of bug: 209189

Comment 9

5 years ago
I didn't mean to dup this immediately.  But since it's done, I'll leave it so and others can undo if it makes sense.


(In reply to Mitra Ardron from comment #4)
> I've certainly seen the phantom 1st Jan 1970 messages.
> 
> It mostly seems to happen on slow IMAP connections (e.g. a Cafe, or tethered
> or in a developing country) where IMAP is probably not keeping up.

I wonder if this isn't something different. Mitra, do you also see threading corruption?  Or is it only the date?
Flags: needinfo?(mitra_lists)

Comment 10

5 years ago
there is also the ever verbose bug 209501. But it's unclear how or whether it might be related.

Comment 11

5 years ago
Its hard to pin down at the moment, since I'm back on a fast connection. I *am* still seeing a fair amount of threading corruption, anecdotally it seems to have increased recently, but haven't pinned down what is causing it. 

Someone I think has been altering code in that area recently,  for example I've seen it posting dialog boxes when it can't filter POP messages to a corrupt folder (it used to just silently refuse to filter). But it doesn't rebuild the summary file (which clicking on the folder does), but maybe that is a different sort of corruption (compared to just putting the message in the wrong thread).

Sorry I can't be more helpful - I'm struggling with Bug #893786 which makes TB almost unusable to me, so I'm not spotting the trivial bugs.
Flags: needinfo?(mitra_lists)

Updated

4 years ago
Flags: needinfo?(jik)
You need to log in before you can comment on or make changes to this bug.