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 431135 - e_cal_create_object does not set the uid on the icalcomponent
e_cal_create_object does not set the uid on the icalcomponent
Status: RESOLVED FIXED
Product: evolution-data-server
Classification: Platform
Component: Calendar
1.10.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-04-18 21:08 UTC by Rob Bradford
Modified: 2007-05-14 03:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (375 bytes, patch)
2007-04-18 21:08 UTC, Rob Bradford
committed Details | Review
Test case (1.06 KB, text/x-csrc)
2007-04-20 14:00 UTC, Rob Bradford
  Details

Description Rob Bradford 2007-04-18 21:08:08 UTC
e_cal_create_object does not assign the uid provided by the backend to the icalcomponent provided by the argument.

This means attempting to do e_cal_modify_object on the component will cause a crash in e-d-s (at least with the file backend) because it assumes that the icalcompent given to it has a valid uid.

The uid is correctly setup in the backend, this means that doing a query and then attempting to call e_cal_modify_object will work correctly.

I've attached a patch which I think should solved this.
Comment 1 Rob Bradford 2007-04-18 21:08:42 UTC
Created attachment 86592 [details] [review]
Patch
Comment 2 Rob Bradford 2007-04-20 14:00:51 UTC
Created attachment 86694 [details]
Test case

Test case.

Compile with:

gcc -o calendar-uid-missing-test calendar-uid-missing-test.c `pkg-config --libs --cflags glib-2.0 libecal-1.2`
Comment 3 Rob Bradford 2007-04-20 14:03:47 UTC
Upgrading severity to critical since this is a crasher (I should have done this before, sorry).

Ross has applied the patch to eds-dbus.
Comment 4 Chenthill P 2007-05-03 06:04:08 UTC
It makes sense to set the uid here. With this, You may want to remove the following from e-calendar-view.c,
(e_calendar_view_add_event): 
if (uid) {
  e_cal_component_set_uid (comp, uid);
  g_free (uid);
}

It would be good if the crash is also handled while trying to modify an event without the uid. Please commit the patch to svn HEAD and stable branch.