Bug 1699968 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

+++ This bug was initially created as a clone of Bug #617945 +++

I am creating a clone to take care of the issues where mDatabase was  reset to null unexpectedly.

https://bugzilla.mozilla.org/show_bug.cgi?id=617945#c9

"We've had many cases now of where mDatabase mysteriously disappears. A local reference prevents the crash until we discover the root cause."

I think I hit upon a possible root cause. (There may be others.)

https://bugzilla.mozilla.org/show_bug.cgi?id=617945#c18

Namely, the call to UpdateNewMessages/UpdateSummaryTotal may set to |mDatabase| to null unexpectedly and we should save/restore |mDatabase| appropriately.

The proper fix would be save/restore mDatabase where appropriate. (There are legitimate cases where mDatabase may be initialied to null for good reason.)

Here is the first patch to take care of the one place where
save/restore did not happen. (There are about a dozen places where the save/restore probably is needed.)

I was afraid of side effect of fixing the bug. but I don't see much ill-effect with the patch proposed here. It seems that there enough safety/sanity checks to deal with mDatabase being null (and that the processing where mDatabase was not null got tested very well before that, it seems).
https://hg.mozilla.org/try-comm-central/rev/3dc4a503d821cef7fef528b7a2b7516417dc8171
+++ This bug was initially created as a clone of Bug #617945 +++

I am creating a clone to take care of the issues where mDatabase was  reset to null unexpectedly.

https://bugzilla.mozilla.org/show_bug.cgi?id=617945#c9

"We've had many cases now of where mDatabase mysteriously disappears. A local reference prevents the crash until we discover the root cause."

I think I hit upon a possible root cause. (There may be others.)

https://bugzilla.mozilla.org/show_bug.cgi?id=617945#c18

Namely, the call to UpdateNewMessages/UpdateSummaryTotal may set to |mDatabase| to null unexpectedly and we should save/restore |mDatabase| appropriately.

The proper fix would be save/restore mDatabase where appropriate. (There are legitimate cases where mDatabase may be initialied to null for good reason.)

Here is the first patch to take care of the one place where
save/restore did not happen. (There are about a dozen places where the save/restore probably is needed.)

I was afraid of side effect of fixing the bug. but I don't see much ill-effect with the patch proposed here. It seems that there are enough safety/sanity checks to deal with mDatabase being null (and that the processing where mDatabase was not null got tested very well before that, it seems).
https://hg.mozilla.org/try-comm-central/rev/3dc4a503d821cef7fef528b7a2b7516417dc8171

Back to Bug 1699968 Comment 0