GNOME Bugzilla – Bug 743291
Core dump when calling VolumeMonitor() get_volumes()
Last modified: 2015-01-22 04:24:50 UTC
Mistakenly calling get_volumes() directly on a VolumeMonitor causes a core dump: $ python3 Python 3.4.2 (default, Oct 8 2014, 13:08:17) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from gi.repository import Gio >>> v = Gio.VolumeMonitor() >>> v.get_volumes() Segmentation fault (core dumped) The correct way to call get_volumes() is to do this: >>> v = Gio.VolumeMonitor().get() >>> v.get_volumes() The simple error of not including the .get() probably should not cause a core dump.
This also segfaults when using the C API: #include <gio/gio.h> int main(int argc, char *argv[]) { GVolumeMonitor *monitor = g_object_new(G_TYPE_VOLUME_MONITOR, NULL); g_volume_monitor_get_mounts (monitor); return 0; }
See: https://wiki.gnome.org/Projects/PyGObject/Analysis/Bug675581 *** This bug has been marked as a duplicate of bug 675581 ***