Closed Bug 498331 Opened 15 years ago Closed 15 years ago

Empty of Local Trash doesn't appear to stay empty in the same session

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: standard8, Assigned: Bienvenu)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(2 files)

STR: 1) Have some messages in your local folders trash folder. 2) Select the trash folder. 3) Right click, select Empty Trash. 4) Select a different folder. 5) Select the trash folder again. Expected results: Empty Trash folder Actual results: messages are still listed Selecting a message does nothing. There are messages listed in the folder until I restart (unless I select one just after step 5, then that is still listed after the restart). Pretty sure this is a regression from bug 497199.
taking; I'll look at this. File | Empty trash works, so it's just the context menu one. We are getting to the confirmation prompt...
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
It feels like someone is holding onto a db, and not letting go when told to...which is a bit surprising to be caused by bug 497199, but we'll see.
I think this is caused by the trash folder having a null msgDatabase by the time we try to empty it, which means we don't call ForceClosed(), which means anyone holding onto the db will break the removal. So I could change nsMsgLocalMailFolder::Delete() to re-open the db, if it's null, or I could take this opportunity to add a method to the db service that will tell you if a db is open or not, which I've been meaning to do anyway.
Attached patch proposed fix (deleted) — Splinter Review
I'll go write a test case for this, but while I'm doing that, if you get a chance, I'd love to know if my diagnosis is right, and that this fixes the problem you're seeing.
Attachment #383330 - Flags: superreview?(bugzilla)
Attachment #383330 - Flags: review?(bugzilla)
Attached patch test case (deleted) — Splinter Review
this fails w/o the patch, and succeeds with it, for me...
Attachment #383376 - Flags: review?(bugzilla)
Comment on attachment 383376 [details] [diff] [review] test case >+function doTest(test) >+{ ... >+ else >+ { >+ do_test_finished(); // for the one in run_test() >+ } >+} You need to add: gMsgHdrs = null; just before the do_test_finished() to avoid reporting morkObject and morkRowObject leaks.
Attachment #383376 - Flags: review?(bugzilla) → review+
Attachment #383330 - Flags: superreview?(bugzilla)
Attachment #383330 - Flags: superreview+
Attachment #383330 - Flags: review?(bugzilla)
Attachment #383330 - Flags: review+
Comment on attachment 383330 [details] [diff] [review] proposed fix >+NS_IMETHODIMP nsMsgDBService::CachedDBForFolder(nsIMsgFolder *aFolder, nsIMsgDatabase **aRetDB) >+{ >+ NS_ENSURE_ARG_POINTER(aFolder); >+ NS_ENSURE_ARG_POINTER(aRetDB); >+ *aRetDB = (nsMsgDatabase *) nsMsgDatabase::FindInCache(aFolder); >+ return NS_OK; > } I don't think you need the case here - FindInCache is already returning an nsIMsgDatabase (and you're casting it to the wrong thing anyway). r/sr=Standard8 with that fixed.
fix checked in, w/ comments addressed.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Flags: in-testsuite+
Flags: blocking-thunderbird3+
Target Milestone: --- → Thunderbird 3.0b3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: