GlodaDatastore not shut down properly when opening address book or composer from cmdline

RESOLVED FIXED in Thunderbird 17.0

Status

Thunderbird
General
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

Trunk
Thunderbird 17.0
x86
All

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
STR (using a recent debug build)

1) Open the address book or composer from the cmdline (thunderbird -addressbook or thunderbird -compose)
2) Close the window that spawns

What happens?

Assertion failure: !connections[i]->ConnectionReady(), at /media/Projects/mozilla/thunderbird/mozilla/storage/src/mozStorageService.cpp:853

I've traced this back to GlodaDatastore not being shutdown.

What's expected?

We should should shut down the GlodaDatastore if Gloda is initted from the composer / addressbook standalone windows.
(Assignee)

Comment 1

5 years ago
Created attachment 647218 [details] [diff] [review]
Patch v1

This fixes the assertion failure for me in the two cases I mentioned.

I'm just guessing that this is where we'd want to do the shutdown - but if there's a more preferable way of shutting down GlodaDatastore, let me know.
Assignee: nobody → mconley
Attachment #647218 - Flags: review?(bugmail)

Comment 2

5 years ago
See also bug 760243.
(Assignee)

Updated

5 years ago
Blocks: 711076
Comment on attachment 647218 [details] [diff] [review]
Patch v1

indexer.js already listens for quit-application and shuts down the datastore.  I guess you would want to have it listen for profile-before-change as well.  According to https://developer.mozilla.org/en/Observer_Notifications, quit-application is before profile-before-change, so I think it makes sense to still listen for that too.

r=asuth conditional on doing that instead.

Is the command-line handler causing quit-application to never be delivered or has the ordering changed more?  I do know that profile-before-change has been the recent standard for observer notifications for db shutdown, but I forget any nuances...
Attachment #647218 - Flags: review?(bugmail) → review+
(Assignee)

Comment 4

5 years ago
Created attachment 647275 [details] [diff] [review]
Patch v2

So I dug a little deeper - the reason that the indexer wasn't shutting down GlodaDatastore was because, for the stand-alone address book, the indexer wasn't being loaded / initted.

I traced this to glodaIndexer.js, which imports gloda.js on its own. Changing that to import public.js seemed like the thing to do, and fixes the assertion failure.

Sound ok?
Attachment #647218 - Attachment is obsolete: true
Attachment #647275 - Flags: review?(bugmail)
Comment on attachment 647275 [details] [diff] [review]
Patch v2

Yes, this is exactly the right course of action.  Thanks!
Attachment #647275 - Flags: review?(bugmail) → review+
(Assignee)

Updated

5 years ago
Component: Database → General
Product: MailNews Core → Thunderbird
(Assignee)

Comment 6

5 years ago
This is actually an Activity Manager bug, but since that doesn't have a component on Bugzilla, I'm putting under General.

Anyhow, checked in:

https://hg.mozilla.org/comm-central/rev/3a77dab67b90
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 17.0
You need to log in before you can comment on or make changes to this bug.