After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 476539 - Crash in string_to_dbt at e-book-backend-file.c line 93
Crash in string_to_dbt at e-book-backend-file.c line 93
Status: RESOLVED OBSOLETE
Product: evolution-data-server
Classification: Platform
Component: Contacts
unspecified
Other All
: High critical
: ---
Assigned To: evolution-addressbook-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-09-13 12:55 UTC by jdhoward
Modified: 2013-08-23 18:24 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Make string_to_dbt do the "right" thing on NULL string (596 bytes, patch)
2009-02-13 12:23 UTC, palfrey
rejected Details | Review

Description jdhoward 2007-09-13 12:55:36 UTC
What were you doing when the application crashed?
Clicked on the Reply button to reply to a message in the Inbox


Distribution: Debian lenny/sid
Gnome Release: 2.18.3 2007-07-03 (Debian)
BugBuddy Version: 2.18.1

System: Linux 2.6.22-1-amd64 #1 SMP Sun Jul 29 13:54:41 UTC 2007 x86_64
X Vendor: The X.Org Foundation
X Vendor Release: 10300000
Selinux: No
Accessibility: Disabled
GTK+ Theme: Nuvola
Icon Theme: Nuvola

Memory status: size: 517074944 vsize: 517074944 resident: 20770816 share: 7200768 rss: 20770816 rss_rlim: 18446744073709551615
CPU usage: start_time: 1189687753 rtime: 80 utime: 74 stime: 6 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/lib/bug-buddy/evolution-data-server-1.10'

Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 47707975054208 (LWP 6414)]
[New Thread 1124362576 (LWP 8375)]
[New Thread 1099184464 (LWP 6480)]
[New Thread 1074006352 (LWP 6415)]
0x00002b63de685a9f in waitpid () from /lib/libc.so.6

Thread 2 (Thread 1124362576 (LWP 8375))

  • #0 __lll_mutex_lock_wait
    from /lib/libpthread.so.0
  • #1 _L_mutex_lock_100
    from /lib/libpthread.so.0
  • #2 pthread_mutex_lock
    from /lib/libpthread.so.0
  • #3 gnome_segv_handler
    at server.c line 97
  • #4 <signal handler called>
  • #5 strlen
    from /lib/libc.so.6
  • #6 string_to_dbt
    at e-book-backend-file.c line 93
  • #7 e_book_backend_file_create_contact
    at e-book-backend-file.c line 192
  • #8 _e_book_backend_create_contact
    at e-book-backend-sync.c line 375
  • #9 ORBit_small_invoke_adaptor
    from /usr/lib/libORBit-2.so.0
  • #10 ??
    from /usr/lib/libORBit-2.so.0
  • #11 ??
    from /usr/lib/libORBit-2.so.0
  • #12 giop_thread_queue_process
    from /usr/lib/libORBit-2.so.0
  • #13 ??
    from /usr/lib/libORBit-2.so.0
  • #14 ??
    from /usr/lib/libglib-2.0.so.0
  • #15 ??
    from /usr/lib/libglib-2.0.so.0
  • #16 start_thread
    from /lib/libpthread.so.0
  • #17 clone
    from /lib/libc.so.6
  • #18 ??


----------- .xsession-errors ---------------------
(evolution-2.10:6408): calendar-gui-CRITICAL **: e_week_view_event_item_draw: assertion `wveitem->event_num < week_view->events->len' failed
(evolution-2.10:6408): calendar-gui-CRITICAL **: e_week_view_event_item_draw: assertion `wveitem->event_num < week_view->events->len' failed
(evolution-2.10:6408): calendar-gui-CRITICAL **: e_week_view_event_item_draw: assertion `wveitem->event_num < week_view->events->len' failed
(evolution-2.10:6408): calendar-gui-CRITICAL **: e_week_view_event_item_draw: assertion `wveitem->event_num < week_view->events->len' failed
(evolution-2.10:6408): calendar-gui-CRITICAL **: e_week_view_event_item_draw: assertion `wveitem->event_num < week_view->events->len' failed
(evolution-2.10:6408): calendar-gui-CRITICAL **: e_week_view_event_item_draw: assertion `wveitem->event_num < week_view->events->len' failed
(evolution-2.10:6408): calendar-gui-CRITICAL **: e_week_view_event_item_draw: assertion `wveitem->event_num < week_view->events->len' failed
BBDB spinning up...
--------------------------------------------------
Comment 1 palfrey 2009-02-13 12:23:35 UTC
Created attachment 128636 [details] [review]
Make string_to_dbt do the "right" thing on NULL string

When handed a NULL string string_to_dbt now sets things as though a zero-length string had been handed to it.
Comment 2 Srinivasa Ragavan 2009-02-24 19:46:20 UTC
Its fine to avoid a crash, but do you know the real problem? I think its better to solve that way. But allowing this patch for now. to stable/trunk
Comment 3 Matthew Barnes 2009-02-24 20:01:04 UTC
@jdhoward: Did the email you were replying to happen to have a vCard attached?  Looks like Evolution was trying to convert it to a contact, failed (something wrong with the vCard maybe), and we didn't check the result.

Would you mind posting the mail here, or at least -- assuming it had one -- the vCard part of it?  Then maybe we can reproduce the crash and figure out what's really going on here.
Comment 4 Akhil Laddha 2009-03-26 04:36:32 UTC
ping , do we want to commit the patch ? 
Comment 5 Ross Burton 2009-03-26 10:06:33 UTC
No, the NULL should be handled before it hits string_to_dbt.  

I'd commit a patch which set the DBT as if a zero length string was passed but also emitted a warning, so these could be caught.

The real problem is the lack of error checking when creating a contact:

 vcard = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
 /* here vcard can be null */
 string_to_dbt (vcard, &vcard_dbt);

vcard should be checked for NULL and an error returned to the client.

That said I can't see why that vcard would have failed.

Oh and I guess this is from the automatic add to addressbook plugin.
Comment 6 Matthew Barnes 2013-08-23 18:24:47 UTC
Closing as OBSOLETE since the stack trace is too old to be useful now.