Closed Bug 778791 Opened 12 years ago Closed 12 years ago

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

Categories

(Thunderbird :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 17.0

People

(Reporter: mconley, Assigned: mconley)

References

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch Patch v1 (obsolete) — Splinter Review
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)
See also bug 760243.
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+
Attached patch Patch v2Splinter Review
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+
Component: Database → General
Product: MailNews Core → Thunderbird
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
Closed: 12 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.

Attachment

General

Created:
Updated:
Size: