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 763166 - keyboard key press lead to crash
keyboard key press lead to crash
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: Backend
3.19.x
Other Linux
: Normal normal
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2016-03-06 09:21 UTC by priyanshu Jain
Modified: 2017-04-17 18:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
search-view: protect against empty component date (965 bytes, patch)
2016-03-08 17:18 UTC, Georges Basile Stavracas Neto
committed Details | Review
event: implement GInitable (11.11 KB, patch)
2016-09-28 03:07 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description priyanshu Jain 2016-03-06 09:21:45 UTC
First open calendar and then press any key of keyboard that's use is not defined in source ,then first search box opens and application crashes(segmentation fault).
Comment 1 priyanshu Jain 2016-03-06 09:58:10 UTC
search bar open due to function: gtk_search_bar_handle_event () but it crashed why?
Comment 2 Georges Basile Stavracas Neto 2016-03-08 17:18:34 UTC
Created attachment 323419 [details] [review]
search-view: protect against empty component date

Another issue tracked down by Sebastien.
Comment 3 Georges Basile Stavracas Neto 2016-03-08 17:19:09 UTC
Thanks for looking at this.

Attachment 323419 [details] pushed as 17af33a - search-view: protect against empty component date
Comment 4 Sebastien Bacher 2016-03-08 18:25:36 UTC
I'm hitting a similar segfault

    component=0x84c0a70 [ECalComponent], self=0xa2b5388 [GcalEvent])
    at gcal-event.c:202
202	      date = icaltime_normalize (*start.value);

(the lines numbers might be slightly off what is in trunk I've some debugging code in there)

printing the info it seems like I've some eds event from 2009 without a dtstart which is leading to a segfault
Comment 5 Sebastien Bacher 2016-03-08 18:26:08 UTC
the commit is not enough
Comment 6 Georges Basile Stavracas Neto 2016-03-08 18:30:26 UTC
This is clearly an issue on EDS side. How does a 2009 event doesn't have a start date? Reassigning.
Comment 7 Milan Crha 2016-03-08 18:40:33 UTC
(In reply to Georges Basile Stavracas Neto from comment #6)
> This is clearly an issue on EDS side. How does a 2009 event doesn't have a
> start date? Reassigning.

It's saved in the case for some reason, can be some leftover issues in the past (~6 years is a long time). The ECalComponent can return NULL for start.value,the gnome-calendar should check for it, like the other clients do.
Comment 8 Sebastien Bacher 2016-03-08 18:43:09 UTC
just for the record ~/.local/share/evolution/calendar/system/calendar.ics has a event

"BEGIN:VEVENT
UID:<uid>
DTSTAMP:20090325T133726Z
SUMMARY: <....> 
DESCRIPTION: <....>
ORGANIZER;CN=<...>
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;
 RSVP=FALSE;CN=<...>
CREATED:20090325T133726Z
LAST-MODIFIED:20090325T133726Z
END:VEVENT"

which seems to be creating the issue
Comment 9 Milan Crha 2016-03-08 18:43:17 UTC
I forgot to add, eds cannot do anything about it, because the dtstart.value is a pointer and it should point to something, while there is no dtstart, thus it cannot point to anything. The gnome-calendar should check the value before dereferencing it and ignore VEVENT-s without DTSTART.
Comment 10 Sebastien Bacher 2016-03-08 19:05:42 UTC
https://git.gnome.org/browse/gnome-calendar/commit/?h=gnome-3-18&id=22a204ecc7105e87dc044d7c44603fe8d495db04 fixes it for 3.18, trunk needs a similar change
Comment 11 Georges Basile Stavracas Neto 2016-09-28 03:07:09 UTC
Created attachment 336407 [details] [review]
event: implement GInitable

Since the event creation can fail, lets make it a GInitable
so that we can fail during initialization.
Comment 12 Georges Basile Stavracas Neto 2016-09-28 03:07:55 UTC
The non-hackish version of this bug is implemented for 3.22. Closing the report. Thanks!

Attachment 336407 [details] pushed as f1069c9 - event: implement GInitable