Closed Bug 479163 Opened 15 years ago Closed 15 years ago

After undo move/delete/archive of pop3 mail, date displays as start of the epoch

Categories

(MailNews Core :: Database, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b2

People

(Reporter: philor, Assigned: Bienvenu)

References

(Blocks 1 open bug)

Details

(Keywords: regression, Whiteboard: [has patch, needs super review Standard8])

Attachments

(1 file, 1 obsolete file)

STR:

1. With a mail sent in the last few days selected, press "A" to archive it
2. Note that it's in the 2009-02 archive folder
3. Ctrl+Z to undo archiving, go back to the folder where it was
4. Note that while it still sorts correctly by the actual date, the date in the threadpane displays whatever the offset to your timezone causes for a date of 01/01/1970.
5. Press A to archive again, note that it's now in the (for Pacific Time) 1969-12 folder.
Flags: blocking-thunderbird3?
ouch, imap or pop3?
POP3, Local Folders (both for where I tested, and where Michael originally reported it as half of bug 479101).
taking - this applies to undo of pop3 moves/deletes in general, so it's pretty ugly. If I found a quick fix, I think it would be worth putting in b2. I suspect the general problem is a regression, but I don't know for sure.
Assignee: nobody → bienvenu
Flags: blocking-thunderbird3? → blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b3
Attached patch proposed fix (obsolete) — Splinter Review
(I'd actually take r/sr from whoever gets to this first...)

The issue was that we were getting a cleared header object from a cache, but m_initedValues was set. I'll track down where that's happening  and see if I can prevent that, but this fix is the right thing to do, as described in the comment.

This should be a safe enough fix for b2. It passes the test suite...
Attachment #363182 - Flags: superreview?(bugzilla)
Attachment #363182 - Flags: review?(neil)
Summary: After undo Archive, date displays as start of the epoch → After undo move/delete/archive of pop3 mail, date displays as start of the epoch
Assignee: bienvenu → nobody
Component: Mail Window Front End → Database
Product: Thunderbird → MailNews Core
QA Contact: front-end → database
I think the hdr is actually ok in the cache - when we remove a header from a db, we cut all the columns, and set m_initedValue to 0 - but if someone is holding onto that header and tries to get any values out of it, they'll get empty values because we've cut all the mork columns, but it will set m_initedValues - that's arguably the correct behavior on the part of the hdr because we treat the absence of a column/cell as an empty value. But the caller shouldn't be doing stuff with a header we've removed from the db. I'll figure out who that is.
this regression was caused by turning on correct threading - that code was trying to remove the references of a message from its hash tables after all the columns were cut from the hdr, which could not have worked very well (my bad on that code review :-( ) Sometimes we would have cached the references, and everything would be OK, but in general, not.
Assignee: nobody → bienvenu
Attachment #363182 - Attachment is obsolete: true
Attachment #363185 - Flags: superreview?(bugzilla)
Attachment #363185 - Flags: review?(neil)
Attachment #363182 - Flags: superreview?(bugzilla)
Attachment #363182 - Flags: review?(neil)
I'm going to put this in b2 in light of the new info, but clarkbw can overrule, of course ;-)
Keywords: regression
Target Milestone: Thunderbird 3.0b3 → Thunderbird 3.0b2
Whiteboard: [has patch, needs review Standard8 or neil]
marking dependency on the bug that caused the regression...
Blocks: 449821
Attachment #363185 - Flags: review?(neil) → review+
Whiteboard: [has patch, needs review Standard8 or neil] → [has patch, needs super review Standard8]
Comment on attachment 363185 [details] [diff] [review]
now with correct threading

Stealing sr since Standard8's busy and this is on the critical path for b2.
Attachment #363185 - Flags: superreview?(bugzilla) → superreview?(dmose)
Comment on attachment 363185 [details] [diff] [review]
now with correct threading

Looks good; sr=dmose
Attachment #363185 - Flags: superreview?(dmose) → superreview+
fix checked in - http://hg.mozilla.org/comm-central/rev/3e7aab1093d3
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Landed on release branch:

changeset:   2042:6196fbd1150a
branch:      COMM_20090224_RELBRANCH
user:        David Bienvenu <bienvenu@nventure.com>
date:        Fri Feb 20 12:41:02 2009 -0800
summary:     fix undo of move/delete/archive of pop3 msgs, date was set to 0, r=neil, sr=dmose, a=clarkbw (as was prev push) 479163
You need to log in before you can comment on or make changes to this bug.