GNOME Bugzilla – Bug 431135
e_cal_create_object does not set the uid on the icalcomponent
Last modified: 2007-05-14 03:12:14 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.
Created attachment 86592 [details] [review] Patch
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`
Upgrading severity to critical since this is a crasher (I should have done this before, sorry). Ross has applied the patch to eds-dbus.
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.