GNOME Bugzilla – Bug 339146
address book missing on first start
Last modified: 2007-04-26 14:55:06 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/evolution/+bug/38016 "When evolution is started for the first time by a new user, it complaines about a missing address book file. After that, evolution starts up normally, and the error isn't shown on next startup. ... >> It'd probably help if you'd make a screenshot of that dialog. ... OK, a screenshot of the error dialog is at http://mills.free.fr/screenshot.png ... > Could you provide informations about what the dialog ask for when you get the message? ... It doesn't ask for anything, the dialog comes up, and once you've clicked on OK you never see or hear of it again, and everything works normally."
I assume eds is runnung. Run both evolution and eds from terminal and attach the terminal messages when this happens to the bug.
seb, is this still an issue? any updates?
That is still happening with GNOME 2.16.0: evolution doesn't print any message about that, from evolution-data-server: when starting evolution: "cal = 0x5368c0 cal = 0x536920 impl_GNOME_Evolution_Addressbook_BookFactory_getBook + file:///home/ubuntu/.evolution/addressbook/local/system => 0x5369e0 impl_GNOME_Evolution_Addressbook_Book_open (0x5369e0) (evolution-data-server:31147): libebook-WARNING **: "e_book_get_book_view" on book before "e_book_open" cal = 0x53af00 cal = 0x536a40" when switching to the contacts component: "impl_GNOME_Evolution_Addressbook_BookFactory_getBook + file:///home/ubuntu/.evolution/addressbook/local/system => 0x536b60 impl_GNOME_Evolution_Addressbook_Book_open (0x536b60) in server_log_handler (evolution-data-server:31147): libebookbackend-WARNING **: libdb error: DB->put: attempt to modify a read-only database in server_log_handler (evolution-data-server:31147): libebookbackend-WARNING **: e_book_backend_file_maybe_upgrade_db failed" It happens everytime after deleting the .evolution directory and restarting evolution
This is caused by BDB changing behaviour between 4.1.25 (the statically linked copy) and 4.3.29 (in Ubuntu). They actually are enforcing previously documented behaviour but 4.1.25 wasn't as strict. e_book_backend_file_load_source() creates a DB handle with db_create() and then tries to db->open(). If that fails, it tries again with a different set of options, creates the parent folders, as relevant. Eventually it will generally succeed to open the database. However, with the behaviour change, if db->open() returns an error, the handle should be disposed of and cannot be used again. Thus, when the first attempt to open the file fails, the handle is invalid. The second attempt is useless and will fail again. That is my theory anyway. I'm about to attach a patch for someone else to replicate this problem with and to verify that it cures it for them too.
Created attachment 81276 [details] [review] Potential fix If this fix works then the same change needs to be made a few times as the re-open() happens more than once.
*** Bug 431006 has been marked as a duplicate of this bug. ***
likely identic to bug #425512 which has been fixed now