Closed Bug 123457 Opened 24 years ago Closed 24 years ago

Thread safety assertions when quitting the app after using imap

Categories

(MailNews Core :: Networking: IMAP, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.9

People

(Reporter: mscott, Assigned: mscott)

References

Details

Attachments

(1 file)

For a while now, every time you quit the app after using imap, you get a bunch of thread safety assertions. This is because we are releasing webshell on the wrong thread (on the imap socket thread to be precise). The webshell holds on to many objects which are not thread safe. Hence all the alerts. The problem is when we clear out the notification callbacks on our socket transport, the transport releases the last reference to the callback (which is the webshell), causing all of these assertions.
accepting
Status: NEW → ASSIGNED
Keywords: nsbeta1
Target Milestone: --- → mozilla0.9.9
Attached patch the fixSplinter Review
My fix involves setting the notification callback on the transport EVERY time we run a url instead of when we first create the socket. In addition, when we finish running a url, we clear the notification callbacks object on the socket. So the time between running urls, the socket no longer has a notification callback. As a result of this change, the notification callback is always getting released when the mock channel goes away and it always released on the UI thread. i.e the socket thread is now no longer the last owner.
Comment on attachment 67836 [details] [diff] [review] the fix r=bienvenu - do we still hold onto the url for displaying a message until the next time we load a message?
Attachment #67836 - Flags: review+
fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
*** Bug 109815 has been marked as a duplicate of this bug. ***
I don't see these with a trunk Win2k debug build. Verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: