Ticket #1036 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Contacts crash if addressbook.db is broken

Reported by: hrw@… Owned by: thomas@…
Priority: high Milestone:
Component: openmoko-contacts Version: unspecified
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

root@fic-gta01:~/.evolution/addressbook/local/system$ echo "12345" >addressbook.db

If Contacts is started with broken storage file then it crash on adding new
contact. Would be nice if it will check own files.

root@fic-gta01:/usr/bin$ DISPLAY=:0 dbus-launch gdb openmoko-contacts
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "arm-angstrom-linux-gnueabi"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/openmoko-contacts
[Thread debugging using libthread_db enabled]
[New Thread 1088205968 (LWP 10512)]
Got path /org/gnome/evolution/dataserver/calendar/filehome_rootmoko_journal_
for new calendar

(openmoko-contacts:10512): libebook-WARNING : e-book.c:99: e-d-s proxy died

(openmoko-contacts:10512): libebook-CRITICAL : file e-book.c: line 1349
(e_book_async_add_contact): assertion `book->priv->proxy' failed

(openmoko-contacts:10512): libebook-CRITICAL : file e-book.c: line 997
(e_book_get_contact): assertion `book->priv->proxy' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1088205968 (LWP 10512)]
0x40c2377c in g_atomic_int_exchange_and_add () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x40c2377c in g_atomic_int_exchange_and_add () from /usr/lib/libglib-2.0.so.0
#1 0x40bf0868 in g_object_ref () from /usr/lib/libgobject-2.0.so.0
#2 0x00010c7c in contacts_set_current_contact ()
#3 0x0001301c in ebook_id_callback ()
#4 0x40030224 in e_book_async_add_contact () from /usr/lib/libebook-1.2.so.5
#5 0x00012fe4 in new_contact_clicked_cb ()
#6 0x40bf73a8 in g_cclosure_marshal_VOIDVOID () from /usr/lib/libgobject-2.0.so.0
#7 0x40beef6c in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#8 0x40bf9004 in ?? () from /usr/lib/libgobject-2.0.so.0
Cannot access memory at address 0x84

Change History

comment:1 Changed 11 years ago by thomas@…

  • Status changed from new to closed
  • Resolution set to fixed

Because --disable-debug was set in glib, the assertations were skipped and the
application did not exit earlier as it should have done.

I have now added some further error checking and message dialogs to inform the
user if the address book could not be opened.

Note: See TracTickets for help on using tickets.