Bug 37288 - Crash on _get_entities_async_thread's GSimpleAsyncResult
Summary: Crash on _get_entities_async_thread's GSimpleAsyncResult
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: logger (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-17 07:30 UTC by Emilio Pozuelo Monfort
Modified: 2011-05-26 15:11 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix destroy function for _get_entities (888 bytes, patch)
2011-05-17 07:31 UTC, Emilio Pozuelo Monfort
Details | Splinter Review
testcase (1.62 KB, patch)
2011-05-18 01:59 UTC, Emilio Pozuelo Monfort
Details | Splinter Review

Description Emilio Pozuelo Monfort 2011-05-17 07:30:02 UTC
[ See https://bugzilla.gnome.org/show_bug.cgi?id=650394 ]

_get_entities_async_thread has:

  lst = _tpl_log_manager_get_entities (async_data->manager, event_info->account);

  g_simple_async_result_set_op_res_gpointer (simple, lst,
      (GDestroyNotify) tpl_log_manager_search_free);

That's wrong as _tpl_log_manager_get_entities doesn't return a list of TplLogSearchHit, but a list of TplEntity. We should call _list_of_object_free instead.

The bt is:

Thread 1 (Thread 0x7ffff7fa49c0 (LWP 17726)):
#0  0x00007fffeda41a80 in g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#1  0x00007ffff3b0c6cd in _tpl_log_manager_search_hit_free (hit=0x10fd000) at log-manager.c:750
#2  0x00007ffff3b0c705 in tpl_log_manager_search_free (hits=0xb16520) at log-manager.c:770
#3  0x00007fffedce6dff in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#4  0x00007fffeda41be4 in g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
#5  0x00007fffedce7cde in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
#6  0x00007fffed174bcd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7  0x00007fffed1753a8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#8  0x00007fffed1759f2 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#9  0x00007fffefad1af7 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#10 0x000000000044fee3 in main (argc=1, argv=0x7fffffffe108) at empathy.c:566
Comment 1 Emilio Pozuelo Monfort 2011-05-17 07:31:15 UTC
Created attachment 46817 [details] [review]
Fix destroy function for _get_entities
Comment 2 Nicolas Dufresne 2011-05-17 09:00:42 UTC
Please add a unit test to trigger that, see tests/dbus/tpl-test-log-manager.c.
Comment 4 Nicolas Dufresne 2011-05-26 15:11:34 UTC
Swapped test and code, and merged. Thanks !

(will be in 0.2.10)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.