GNOME Bugzilla – Bug 647731
Singleton objects are constructed using g_object_new even though they should not be
Last modified: 2012-07-24 14:15:13 UTC
Created attachment 185920 [details] segfault get_mounts While porting a pygtk app i've found that get_mounts is segfaulting. I've attached a test that reproduces the error.
Use Gio.VolumeMonitor.get(). The VolumeMonitor is a singleton which doesn't have a constructor. Unfortunately we don't currently check for that and allocate the object with g_object_new. Since there is no backing class it crashes when trying to call the get_mounts vfunc which is NULL. Leave this bug open. We should probably return an error if you try to construct a class that has no constuctors.
This bug is still present with pygobject 3.2.0: No symbol table info available.
+ Trace 230116
*** Bug 680202 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 675581 ***