Closed Bug 1767227 Opened 3 years ago Closed 3 years ago

When nsMsgDatabase is forced to close, it complains about remaining listeners but doesn't remove them

Categories

(MailNews Core :: Database, defect)

defect

Tracking

(thunderbird_esr91 wontfix, thunderbird101 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
thunderbird_esr91 --- wontfix
thunderbird101 --- fixed

People

(Reporter: darktrojan, Assigned: darktrojan)

Details

Attachments

(1 file)

In nsMsgDatabase::ForceClosed, there's an assertion that m_ChangeListeners is empty. But if it isn't empty (not entirely sure why this happens), it doesn't get emptied, then the destructor crashes with the message:

Hit MOZ_CRASH(mozilla::LinkedList<nsSHistory>::~LinkedList() [T = nsSHistory] has a buggy user: it should have removed all this list's elements before the list's destruction) at /builds/worker/workspace/obj-build/dist/include/mozilla/LinkedList.h:466

This can currently be seen by running the tests in mail/components/extensions/test/browser with a debug build, and is causing the failures on CI since bug 1176694 landed. I don't think that bug is to blame, it just creates the conditions for failure.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/b1fecdb961a2
Clean up listeners when a message database is forced to close. r=john.bieling

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch

Comment on attachment 9274628 [details]
Bug 1767227 - Clean up listeners when a message database is forced to close. r=john.bieling

[Triage Comment]
Approved for 101.0beta per wsmwk via Matrix

Attachment #9274628 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: