Hi, I'm currently having some problems allocating GObjects. I just added a class called SPPoint [0]. When I try to instantiate an object of that type (whether through SPObject/sp_object_child_added or manually from GDB using g_object_new does not matter), g_object_new returns an GObject* that contains a zero class: {g_type_instance = {g_class = 0x0}, ref_count = 0, qdata = 0x0} (this is not good as it breaks everything else about G_OBJECT). I was able to track down the problem to g_type_create_instance returning that when passed the new SPPoint type:
(gdb) print sp_object_get_type() $13 = 20593552 (gdb) print sp_point_get_type() $14 = 20619024 (gdb) print *((GObject*)g_type_create_instance(sp_point_get_type())) $20 = {g_type_instance = {g_class = 0x0}, ref_count = 0, qdata = 0x0} (gdb) print *((GObject*)g_type_create_instance(sp_object_get_type())) $21 = {g_type_instance = {g_class = 0x16ec560}, ref_count = 1, qdata = 0x0}
I'm currently building a glib with debugging symbols to further track down this problem. If anybody here has an idea about what might be the cause of this problem, your suggestions will likely be tremendously useful since I'm already pondering over this for a few hours. The code can be found at [1].
Thanks, Sebastian
[0] https://bazaar.launchpad.net/~h-e-6/inkscape/connector-wip/view/head:/src/sp... [1] https://code.launchpad.net/~h-e-6/inkscape/connector-wip