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 55674 - gnomecard crashes when "Categories" field is deleted
gnomecard crashes when "Categories" field is deleted
Status: RESOLVED DUPLICATE of bug 60965
Product: gnome-pim
Classification: Deprecated
Component: gnomecard
1.4.x
Other Linux
: Normal major
: ---
Assigned To: gnome-pim Maintainers
gnome-pim Maintainers
: 55663 57041 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-06-03 19:36 UTC by Jay.St.Pierre
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jay.St.Pierre 2001-06-03 19:36:53 UTC
NOTE: please mark bug 55663 as a duplicate of this one... I created that
one through the bug-buddy program, but now I can't modify it.
 
If a record has a non-null "Categories", and the text of the field is
deleted, when the user attempts to save the change, gnomecard crashes and
the GnomeCard.gcrd file is zeroed out.

When the change is made to the "in-memory" database, i.e., when the record
modification is applied either via the "apply" or "ok" buttons, the
following error appears four times in the terminal window that started
gnomecard:

GLib-CRITICAL **: file gstring.c: line 294 (g_string_append): assertion
`val != NULL' failed.

To reproduce this problem, use the following VCARD entry in the
GnomeCard.gcrd file:

BEGIN:VCARD
FN:Jay St. Pierre
N:St. Pierre;Jay
REV:2001-06-03T19:16:41
CATEGORIES;QUOTED-PRINTABLE:Unknown
END:VCARD

Then use gnomecard to delete the text in the "Categories" field.

I have marked this bug as "major" because it zeros out the GnomeCard.gcrd
file.  Even though the database can be recovered using one of the ~# files,
the novice user doesn't know this, and will just think they've lost all
their information.

Apparently, judging from the behavior of gaby, the appropriate action to
take when the "Categories" field is deleted is to just remove the
CATEGORIES line from the VCARD record.

The debugging information attached below came from bug-buddy, although I
did not submit this bug via bug-buddy.

-Jay

Debugging Information:

(no debugging symbols found)...0x404f78c9 in __wait4 () from /lib/libc.so.6
  • #0 __wait4
    from /lib/libc.so.6
  • #1 ??
    from /lib/libc.so.6
  • #2 gnome_segv_handle
    at gnome-init.c line 659
  • #3 __restore
    at ../sysdeps/unix/sysv/linux/i386/sigaction.c line 127
  • #4 addProp
  • #5 card_load
  • #6 card_load
  • #7 card_geopos_str
  • #8 card_save
  • #9 gnomecard_save
  • #10 gtk_marshal_NONE__NONE
    at gtkmarshal.c line 312
  • #11 gtk_handlers_run
    at gtksignal.c line 1917
  • #12 gtk_signal_real_emit
    at gtksignal.c line 1477
  • #13 gtk_signal_emit
    at gtksignal.c line 552
  • #14 gtk_button_clicked
    at gtkbutton.c line 336
  • #15 gtk_real_button_released
    at gtkbutton.c line 861
  • #16 gtk_marshal_NONE__NONE
    at gtkmarshal.c line 312
  • #17 gtk_signal_real_emit
    at gtksignal.c line 1440
  • #18 gtk_signal_emit
    at gtksignal.c line 552
  • #19 gtk_button_released
    at gtkbutton.c line 327
  • #20 gtk_button_button_release
    at gtkbutton.c line 721
  • #21 gtk_marshal_BOOL__POINTER
    at gtkmarshal.c line 28
  • #22 gtk_signal_real_emit
    at gtksignal.c line 1492
  • #23 gtk_signal_emit
    at gtksignal.c line 552
  • #24 gtk_widget_event
    at gtkwidget.c line 2864
  • #25 gtk_propagate_event
    at gtkmain.c line 1378
  • #26 gtk_main_do_event
    at gtkmain.c line 818
  • #27 gdk_event_dispatch
    at gdkevents.c line 2139
  • #28 g_main_dispatch
    at gmain.c line 656
  • #29 g_main_iterate
    at gmain.c line 877
  • #30 g_main_run
    at gmain.c line 935
  • #31 gtk_main
    at gtkmain.c line 524
  • #32 main
  • #33 __libc_start_main
    at ../sysdeps/generic/libc-start.c line 92
  • #0 __wait4
    from /lib/libc.so.6
  • #1 ??
    from /lib/libc.so.6
  • #2 gnome_segv_handle
    at gnome-init.c line 659
  • #3 __restore
    at ../sysdeps/unix/sysv/linux/i386/sigaction.c line 127
  • #4 addProp
  • #5 card_load
  • #6 card_load
  • #7 card_geopos_str

Comment 1 Jay.St.Pierre 2001-06-04 05:30:13 UTC
I think I've found the problem, but the best solution is not clear. 
Basically what's going on is that gnomecard_property_used in my.c gets
called each time the "categories" field is edited, and that function
always sets the prop->used value to TRUE, regardless the content of
the field.

-Jay, 6-3-2001
Comment 2 Joshua Eichorn 2001-09-25 07:13:36 UTC
*** Bug 55663 has been marked as a duplicate of this bug. ***
Comment 3 Sebastian Rittau 2002-03-10 21:01:20 UTC
*** Bug 57041 has been marked as a duplicate of this bug. ***
Comment 4 Jay.St.Pierre 2002-03-10 21:19:06 UTC
Note that bug 60965 is a duplicate of this bug.  However, in my
unfamiliarity with bug stomping policies, I'm not sure which should be
closed as a duplicate of the other.

Also note that I poked around the code with gdb, but could only
determine that there is buffer overflow/access to an invalid pointer
in vobject.c  This files apparently came from Apple orignally, and
there are several variants out there (e.g., KDE has a modified
version), but I haven't been able to figure out what exactly is going
wrong, nor what the "correct" fix is.

Comment 5 Christian Biesinger 2002-03-10 22:10:40 UTC
Actually this works for me - Gnomecard does not crash, though I also
get the assertion you quoted above.

Does the problem still occur in Gnomecard 1.4.4 or the latest CVS version?
Comment 6 Christian Biesinger 2002-03-10 22:12:00 UTC
eh, nevermind. I did not try saving after deleting the text from that
field... This bug still exists.
Comment 7 Sebastian Rittau 2002-03-11 23:26:46 UTC

*** This bug has been marked as a duplicate of 60965 ***