crash in mm-device.c:modem_valid

Ben Chan benchan at chromium.org
Sat Feb 11 00:07:46 UTC 2017


Hi Aleksander and Dan

I encountered a crash in mm-device.c:modem_valid:345 where 'self->priv'
seemed invalid, but 'modem' looked fine. As there is no code to clear the
"notify::base-modem-valid" signal in MMDevice, I think MMDevice currently
relies on auto disconnection of the signal when MMBaseModem is destroyed.
However, there seems to be a circular reference between MMBaseModem and
MMBaseSim (as also indicated in mm_device_remove_modem), so it seems like
MMDevice::dispose doesn't break the cycle.

Both MMDevice::dispose and MMDevice::set_property call 'g_clear_object
(&self->priv->modem) without calling 'g_object_run_dispose (G_OBJECT
(self->priv->modem)), which seems problematic.  I was thinking about adding
the g_object_run_dispose call, but then wondering if we should instead
address the circular reference between MMBaseModem and MMBaseSim with a
weak reference?

Thanks,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170210/d774cd1e/attachment.html>


More information about the ModemManager-devel mailing list