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 457394 - Tasks crashed because wrong reference counting
Tasks crashed because wrong reference counting
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Tasks
2.12.x
Other Linux
: Normal critical
: ---
Assigned To: evolution-calendar-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2007-07-16 16:05 UTC by Milan Crha
Modified: 2013-09-13 00:59 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
proposed patch (1.55 KB, patch)
2007-07-16 16:13 UTC, Milan Crha
committed Details | Review

Description Milan Crha 2007-07-16 16:05:12 UTC
There was wrong reference counting on 'ECalModelClient::client' when showing tasks in calendar/gui/e-calendar-table.c: missing g_object_ref at show_completed_rows, and missing g_object_unref at hide_completed_rows. It may be related with couple of crashes in tasks because of periodical calling of e_calendar_table_process_completed_tasks.
I found it when changing "Hide completed tasks" from checked to unchecked after restart evolution and checking tasks as completed (filter isn't changed, so those tasks are hidden, unreferencing 'client', and because there was no referencing, then it crashes.
Maybe this is also related to some crashes on exit.
Comment 1 Milan Crha 2007-07-16 16:13:37 UTC
Created attachment 91861 [details] [review]
proposed patch

for evolution;
Comment 2 Hiroyuki Ikezoe 2007-07-26 12:45:29 UTC
This fix is very reasonable to me.

Can somebody review the patch?
Comment 3 Matthew Barnes 2007-07-26 19:07:38 UTC
Looks right to me.  e_cal_model_free_component_data() unrefs the ECal "client" object, so you're correct to increment its refererence count when creating a new ECalModelComponent.
Comment 4 Milan Crha 2007-07-27 06:33:38 UTC
Committed to trunk. Committed revision 33858.