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 303702 - Segfault trying to sync calendar with an multi-day all-day event
Segfault trying to sync calendar with an multi-day all-day event
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Do Not Use
2.0.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: Veerapuram Varadhan
Evolution QA team
: 270431 306694 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-05-10 18:48 UTC by Dave Malcolm
Modified: 2013-09-13 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dave Malcolm 2005-05-10 18:48:39 UTC
1. Create a new event in evolution
2. Select "all day event"
3. Make the end date a date at least a day older than the start date
4. Make sure that "Split multi-day events" is enabled in the ECalendar conduit
4. Launch a sync

(gpilotd:26204): libecal-CRITICAL **: file e-cal-component.c: line 1100
(e_cal_component_get_icalcomponent): assertion `priv->need_sequence_inc ==
FALSE' failed
Segmentation fault

An all day event that stays within a day doesn't crash.
With "Split multi-day events" disabled, the event(s) aren't synced at all.

The snippet of code causing the crash in the conduit is probably in
process_multi_day():
                dt_end.value = &end_value;
                e_cal_component_set_dtend (clone, &dt_end);

                /* FIXME Error handling */                 e_cal_create_object
(ctxt->client, e_cal_component_get_icalcomponent (clone), NULL, NULL);

e_cal_component_set_dtend sets priv->need_sequence_inc = TRUE;
but e_cal_component_get_icalcomponent has the assert: g_return_val_if_fail
(priv->need_sequence_inc == FALSE, NULL);

So this can't possibly ever work correctly.

One possible fix is probably:
+ e_cal_component_commit_sequence (clone);
in between the e_cal_component_set_dtend() and the
e_cal_component_get_icalcomponent() calls.

The "Split multi-day events" is probably another problem, in that same function.

This is a clone of this downstream bug report:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=157074

This was filed against Evolution 2.0.2, but the code in e-d-s and
evolution/calendar/conduits appears not to have changed.
Comment 1 Bastien Nocera 2005-05-10 21:48:54 UTC
I was wondering if anyone could either:
1) Check that my "patch" does what it's supposed to do
2) Could test this patch with a real Palm
Comment 2 Nagappan Alagappan 2005-05-11 11:16:24 UTC
Varadhan: Patch is available. Can you please review it ?
Comment 3 Veerapuram Varadhan 2005-06-09 12:05:10 UTC
Any links to the patch?

Also, Nagappan, did you verify the bug?

I am not able to reproduce the bug by creating an all-day event.  I am using the
Current CVS-head code.
Comment 4 Bastien Nocera 2005-06-09 12:11:47 UTC
First, you need to make an all-day event spanning multiple days:
3. Make the end date a date at least a day older than the start date

And the patch was "inline" above, and also at:
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=114232
Comment 5 Veerapuram Varadhan 2005-06-09 14:26:26 UTC
I can reproduce the bug for Multi-day events.
Also, 
"3. Make the end date a date at least a day older than the start date" not
possible, probably, would david would mean "3. Make the start date a date at
least a day older than end date".

Comment 6 Veerapuram Varadhan 2005-06-09 14:26:59 UTC
*** Bug 306694 has been marked as a duplicate of this bug. ***
Comment 7 Bastien Nocera 2005-06-09 14:36:23 UTC
Hmm, no it is "3. Make the end date a date at least a day older than the start
date", meaning that the end date is after the start date, and the end date is at
least a day after the start date.
Comment 8 Mohammed Mubeen J 2005-08-05 13:08:03 UTC
The patch is working fine.
Comment 9 Mohammed Mubeen J 2005-09-20 06:58:12 UTC
Varadhan: I have tested the above patch. Can you commit it.
Comment 10 Veerapuram Varadhan 2005-09-20 11:27:13 UTC
Mubeen:  Thanks for your comments.  I though I committed David's patch long ago
with few changes as mentioned
http://mail.gnome.org/archives/evolution-patches/2005-July/msg00018.html

However, it seems to have got missed.  Will be committing the patch mentioned in
that mail soon.
Comment 11 Veerapuram Varadhan 2005-09-30 17:04:43 UTC
Fix in CVS for 2.4.1 and HEAD.
Comment 12 Bastien Nocera 2005-10-04 18:27:49 UTC
The small things:

2005-09-30  Veerapuram Varadhan <vvaradhan@novell.com>

        Fixes #303702
        * calendar/conduits/calendar/calendar-conduit.c:
        (process_multi_day): Call e_cal_component_commit_sequence() after
        modifying the properties of an ECalComponent and before fetching
        its icalcomponent.

        Reworked the patch from Dave Malcolm <dmalcolm@redhat.com>

I actually wrote the original patch...
Comment 13 André Klapper 2005-11-22 01:34:09 UTC
*** Bug 270431 has been marked as a duplicate of this bug. ***
Comment 14 André Klapper 2005-11-22 09:13:31 UTC
bug 317411 could also be a dup, please check when closing this one
Comment 15 Veerapuram Varadhan 2005-12-06 16:04:37 UTC
Andre: 317411 is not a duplicate of this bug.
Bastein: Corrected and committed the corrected changelog. :-) 

Fixed in Head.