
Hi,
I was experimenting with additional knotholders for items carrying an LPE but I'm having problems. What I did was simply to add another case distinction to sp_item_knot_holder() in object-edit.cpp. It checks whether an object has an LPE applied to it, in which case it returns a different knotholder than the standard one.
The handling methods for the new knotholder are minimal (a 'set' method which does nothing and a 'get' method wich just returns a constant point) but Inkscape keeps crashing when handles corresponding to the "ordinary" knotholder are moved. I suspect that the new knotholder somehow interferes with the one that is created for paths in nodepath.cpp but I can't seem to find the exact cause of the problem. The backtraces don't look very helpful to me either since the crash happens in different places and I haven't yet found the common cause (see below for 2 sample backtraces; note that the line numbers may slightly vary due to my changes to the code).
I wonder if anyone has an idea what could be wrong. Really some kind of interference between the two knotholders? How do the knotholders for paths work anyway? Is object-edit.cpp the wrong place to alter them?
Thanks in advance, Max
Backtraces:
#0 0xb7376c77 in g_str_hash () from /usr/lib/libglib-2.0.so.0 #1 0xb73484db in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0 #2 0xb7341271 in g_quark_from_string () from /usr/lib/libglib-2.0.so.0 #3 0x087b783e in Inkscape::XML::SimpleNode::attribute (this=0x9ef1600, name=0x40240000 <Address 0x40240000 out of bounds>) at xml/simple-node.cpp:222 #4 0x081eae1d in update_repr_internal (np=0xaee6c00) at nodepath.cpp:578 #5 0x081ee47c in sp_nodepath_update_repr (np=0xaee6c00, annotation=0x884685c "Move nodes") at nodepath.cpp:613 #6 0x081eeb4b in node_ungrabbed (data=0xb2a1c40) at nodepath.cpp:3363 #7 0xb741265a in g_cclosure_marshal_VOID () from /usr/lib/libgobject-2.0.so.0 #8 0xb74056f9 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #9 0xb7419c3d in ?? () from /usr/lib/libgobject-2.0.so.0 #10 0x09a99b00 in ?? () #11 0x00000000 in ?? ()
#0 0x081a122c in sp_document_maybe_done (doc=0xb08eb40, key=0x0, event_type=111, event_description=@0xbfbff160) at document-undo.cpp:173 #1 0x081a14f0 in sp_document_done (doc=0xb08eb40, event_type=111, event_description=@0xbfbff190) at document-undo.cpp:125 #2 0x081ee4c4 in sp_nodepath_update_repr (np=0xb08eb48, annotation=0x884685c "Move nodes") at nodepath.cpp:617 #3 0x081eeb4b in node_ungrabbed (data=0xb7f8ae0) at nodepath.cpp:3363 #4 0xb73c865a in g_cclosure_marshal_VOID () from /usr/lib/libgobject-2.0.so.0 #5 0xb73bb6f9 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0 #6 0xb73cfc3d in ?? () from /usr/lib/libgobject-2.0.so.0 #7 0x0b974be8 in ?? () #8 0x00000000 in ?? ()