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.
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.
See also bug 760243.
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...
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?
Comment on attachment 647275 [details] [diff] [review] Patch v2 Yes, this is exactly the right course of action. Thanks!
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