Comment 4 for bug 1290573

Revision history for this message
Liam P. White (liampwhite) wrote :

Recreating the crash, and using GDB to get a backtrace, we see that in this instance the program crashes with SIGABRT. The portion of the code we are interested in is here:

#0 0x0000000000982ef4 in Inkscape::UI::Dialog::ObjectProperties::widget_setup (this=0x5b0aa40) at ui/dialog/object-properties.cpp:396
         EntryID.set_text (obj->getId());

Looking in the XML editor, directly before the crash, the object has NO path ID, which explains the crash (the XML node is trying to send back a Glib::ustring created with a NULL C string, which fails and usually sets SIGTRAP, for those developers out there)

The offending XML is this: <path style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" d="[random point data]" inkscape:connector-curvature="0" />

Notice something missing there? It's the Object's path ID. Keep in mind that everything is fine and dandy if the Object Properties window is not open (I added in a little try/catchall code to keep Inkscape going) but when it is the XML editor displays that the object now has no path ID.

Using a slightly different method suggested by Alvin Penner we see:

(inkscape:27779): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

terminate called after throwing an instance of 'std::logic_error'
  what(): basic_string::_S_construct null not valid

Program received signal SIGABRT, Aborted.
...
#0 0x0000000000982ef4 in Inkscape::UI::Dialog::ObjectProperties::widget_setup (this=0x5a742c0) at ui/dialog/object-properties.cpp:396
         EntryID.set_text (obj->getId());

Running the debugging code again allows us to open the XML Editor after the crash, where we see that the object seems to have a path ID. Wrong, the XML Editor is lying. Using the node tool to tweak the path then causes the path ID to disappear from the XML editor, which is actually what happened.

Looking into object-properties.cpp, nothing appears to be out of place (except for proper exception handlers for this type of error). Looking into splivarot.cpp (the file that calls path outliner) once again nothing appears to be wrong. Checking document-undo.cpp, nothing appears to be wrong. Not sure why this is happening, but it's rather serious.