Summary: | tp_g_signal_connect_object: Invalid read in object_remove_closure when observer is destroyed | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Guillaume Desmottes <guillaume.desmottes> |
Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED NOTOURBUG | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | git master | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Guillaume Desmottes
2010-03-22 07:41:19 UTC
From your backtrace, it appears this happens when the signal-receiver (the "observer" in the terminology used in that code) loses its last reference, this causes disconnection of the signal, and that causes the closure to be invalidated, which somehow causes the closure to be removed from an object that doesn't exist (it's unclear whether that object was meant to be the observer or the emitter). I've been unable to cause this situation in a simple test case, using GLib 2.22.4-1 (Debian unstable) and telepathy-glib git master. What version of GLib are you using, and is it possible that it's buggy or behaves differently? Could you try building and running tests/signal-connect-object.c from this branch? It works for me, but if it fails for you then that might be informative... http://git.collabora.co.uk/?p=user/smcv/telepathy-glib-smcv.git;a=shortlog;h=refs/heads/signal-connect-test This test works fine for me. I'm using Glib 2.22.3-0ubuntu1 (Ubuntu Karmic). Did you try using my Empathy branch? It's scary. The problem appears to be related to invalidating a GClosure that points to an object (by disconnecting from a signal), from that object's own finalize function. Unfortunately, that's sort of the point of this branch... Still looking into it, but it won't be fixed today. In the Empathy branch, the (first) problematic case is an EmpathyLocationManager watching TpAccount::status-changed. At the boundary between stack frames 10 and 11, location manager's dispose() incorrectly chains up to GObject's finalize(). This causes misc stuff to be freed before the weak ref notifications have necessarily run, leading to disaster. Fixing the Empathy bug seems to fix this, so, not telepathy-glib's bug. |
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.