Removing ID attribute from group (XML editor) causes crash
While editing an Inkscape-created document, if I delete the ID attribute of a group (or any other element, on further investigation) using the XML editor, and then select that element in the visual editor, Inkscape crashes.
The ID in question is not referenced elsewhere in the document.
Is it valid SVG to have objects without IDs? It certainly seems like it should be, particularly for hand-crafted SVG.
I can reproduce this trivially in Inkscape's trunk build from 22 Sep 2013 on a blank document with nothing but a plain rectangle.
- Bryan
On 2013-10-31 04:09 +0200, Bryan Hoyt | Brush Technology wrote:
While editing an Inkscape-created document, if I delete the ID attribute of a group (or any other element, on further investigation) using the XML editor, and then select that element in the visual editor, Inkscape crashes.
The ID in question is not referenced elsewhere in the document.
Is it valid SVG to have objects without IDs? It certainly seems like it should be, particularly for hand-crafted SVG.
AFAIK it is valid SVG.
I can reproduce this trivially in Inkscape's trunk build from 22 Sep 2013 on a blank document with nothing but a plain rectangle.
Steps to reproduce: 1) launch inkscape (default prefs, default new doc) 2) draw a rect 3) group it 4) open XML Editor 5) delete ID attribute of selected group 6) on-canvas, double-click the selection to enter the group 7) click on the rectangle to select it
-> crash with current stable and trunk (backtrace from latest trunk attached)
Please file a report in the bug tracker, thanks.
(or any other element, on further investigation)
I cannot reproduce this part as described, but I can confirmed that I have experienced so many related (but seemingly more "random") crashes in trunk that I had stopped using the XML Editor for anything but the most simplest tasks (I did suspect a regression in trunk's refactored dockable XML Editor, in addition to the crash above which can be reproduced in stable and trunk).
Regards, V
2013/10/31 su_v <suv-sf@...58...>:
On 2013-10-31 04:09 +0200, Bryan Hoyt | Brush Technology wrote:
While editing an Inkscape-created document, if I delete the ID attribute of a group (or any other element, on further investigation) using the XML editor, and then select that element in the visual editor, Inkscape crashes.
The ID in question is not referenced elsewhere in the document.
Is it valid SVG to have objects without IDs? It certainly seems like it should be, particularly for hand-crafted SVG.
AFAIK it is valid SVG.
Yes, it's valid - the ID attribute is not required. Inkscape shouldn't crash even on malformed SVGs.
Steps to reproduce:
- launch inkscape (default prefs, default new doc)
- draw a rect
- group it
- open XML Editor
- delete ID attribute of selected group
- on-canvas, double-click the selection to enter the group
- click on the rectangle to select it
-> crash with current stable and trunk (backtrace from latest trunk attached)
Please file a report in the bug tracker, thanks.
I fixed this particular crash in r12754, but there's another one when exiting the group (double click somewhere else after entering the group). I'll try to fix it soon. In the meantime if anyone can provide a backtrace that would be cool (it requires running GDB in a separate VT because the crash happens while the pointer is grabbed).
Regards, Krzysztof
On 2013-10-31 17:29 +0200, Krzysztof Kosiński wrote:
2013/10/31 su_v <suv-sf@...58...>:
On 2013-10-31 04:09 +0200, Bryan Hoyt | Brush Technology wrote:
While editing an Inkscape-created document, if I delete the ID attribute of a group (or any other element, on further investigation) using the XML editor, and then select that element in the visual editor, Inkscape crashes.
The ID in question is not referenced elsewhere in the document.
Steps to reproduce:
- launch inkscape (default prefs, default new doc)
- draw a rect
- group it
- open XML Editor
- delete ID attribute of selected group
- on-canvas, double-click the selection to enter the group
- click on the rectangle to select it
-> crash with current stable and trunk (backtrace from latest trunk attached)
Please file a report in the bug tracker, thanks.
I fixed this particular crash in r12754, but there's another one when exiting the group (double click somewhere else after entering the group). I'll try to fix it soon. In the meantime if anyone can provide a backtrace that would be cool (it requires running GDB in a separate VT because the crash happens while the pointer is grabbed).
I'd be glad to provide a backtrace, but I fail to reproduce this crash - tried several times with r12753 as well as with latest r12755. Any additional step(s) required apart from these?
0) launch inkscape with default (new) prefs 1) draw rect 2) switch back to select tool (S) 3) group the rectangle (Ctrl+G) 4) open XML Editor (Shift+Ctrl+X) 5) delete 'id' attribute of selected group 6) enter group with double-click on selected group (or with <Esc> (return focus to canvas), Ctrl+Enter) 7) leave group with a double-click on empty canvas (or with Ctrl+Backspace)
Regards, V
I don't think this bug is specific to groups, unless there are different bugs with similar symptoms.
This seems to be preferences-dependent. I've attached my preferences.xml which causes this bug to trigger.
Steps to reproduce: 1) Launch inkscape with the attached preferences.xml 2) Create a rect 3) Open XML editor and delete "id" attribute of the rect 4) Manifestation 1: Choose "select" tool, click away from rect and then click rect again. Inkscape dies with "unhandled exception (type std::exception) in signal handler:\n what: basic_string::_S_construct null not valid" 5) Manifestation 2: Don't choose the select tool, just click the rect with the rect tool. Inkscape dies with "terminate called after throwing an instance of 'std::logic_error' \n what(): basic_string::_S_construct null not valid"
- Bryan
On Fri, Nov 1, 2013 at 6:38 AM, su_v <suv-sf@...58...> wrote:
On 2013-10-31 17:29 +0200, Krzysztof Kosiński wrote:
2013/10/31 su_v <suv-sf@...58...>:
On 2013-10-31 04:09 +0200, Bryan Hoyt | Brush Technology wrote:
While editing an Inkscape-created document, if I delete the ID
attribute
of a group (or any other element, on further investigation) using the XML editor, and then select that element in the visual editor, Inkscape crashes.
The ID in question is not referenced elsewhere in the document.
Steps to reproduce:
- launch inkscape (default prefs, default new doc)
- draw a rect
- group it
- open XML Editor
- delete ID attribute of selected group
- on-canvas, double-click the selection to enter the group
- click on the rectangle to select it
-> crash with current stable and trunk (backtrace from latest trunk attached)
Please file a report in the bug tracker, thanks.
I fixed this particular crash in r12754, but there's another one when exiting the group (double click somewhere else after entering the group). I'll try to fix it soon. In the meantime if anyone can provide a backtrace that would be cool (it requires running GDB in a separate VT because the crash happens while the pointer is grabbed).
I'd be glad to provide a backtrace, but I fail to reproduce this crash - tried several times with r12753 as well as with latest r12755. Any additional step(s) required apart from these?
- launch inkscape with default (new) prefs
- draw rect
- switch back to select tool (S)
- group the rectangle (Ctrl+G)
- open XML Editor (Shift+Ctrl+X)
- delete 'id' attribute of selected group
- enter group with double-click on selected group (or with <Esc> (return focus to canvas), Ctrl+Enter)
- leave group with a double-click on empty canvas (or with Ctrl+Backspace)
Regards, V
On Fri, 2013-11-08 at 09:18 +1300, Bryan Hoyt | Brush Technology wrote:
- Manifestation 1: Choose "select" tool, click away from rect and
then click rect again. Inkscape dies with "unhandled exception (type std::exception) in signal handler:\n what: basic_string::_S_construct null not valid" 5) Manifestation 2: Don't choose the select tool, just click the rect with the rect tool. Inkscape dies with "terminate called after throwing an instance of 'std::logic_error' \n what(): basic_string::_S_construct null not valid"
I have the strangest feeling this might be my doing. Could you post this as a real bug on launchpad with a full traceback so we can see?
https://bugs.launchpad.net/inkscape
BEst regards, Martin Owens
What's the easiest way for me to get a traceback from the Inkscape trunk build (ubuntu apt package)? I didn't compile it myself and I don't have much experience with gdb etc. -Bryan
On Fri, Nov 8, 2013 at 9:30 AM, Martin Owens <doctormo@...400...> wrote:
On Fri, 2013-11-08 at 09:18 +1300, Bryan Hoyt | Brush Technology wrote:
- Manifestation 1: Choose "select" tool, click away from rect and
then click rect again. Inkscape dies with "unhandled exception (type std::exception) in signal handler:\n what: basic_string::_S_construct null not valid" 5) Manifestation 2: Don't choose the select tool, just click the rect with the rect tool. Inkscape dies with "terminate called after throwing an instance of 'std::logic_error' \n what(): basic_string::_S_construct null not valid"
I have the strangest feeling this might be my doing. Could you post this as a real bug on launchpad with a full traceback so we can see?
https://bugs.launchpad.net/inkscape
BEst regards, Martin Owens
On Fri, 2013-11-08 at 09:53 +1300, Bryan Hoyt | Brush Technology wrote:
What's the easiest way for me to get a traceback from the Inkscape trunk build (ubuntu apt package)? I didn't compile it myself and I don't have much experience with gdb etc. -Bryan
Try this page:
http://staging.inkscape.org/en/contribute/report-bugs/
If you get stuck, let us know, we're still trying to improve the documentationals.
Martin,
On 2013-11-07 21:30 +0100, Martin Owens wrote:
On Fri, 2013-11-08 at 09:18 +1300, Bryan Hoyt | Brush Technology wrote:
- Manifestation 1: Choose "select" tool, click away from rect and
then click rect again. Inkscape dies with "unhandled exception (type std::exception) in signal handler:\n what: basic_string::_S_construct null not valid" 5) Manifestation 2: Don't choose the select tool, just click the rect with the rect tool. Inkscape dies with "terminate called after throwing an instance of 'std::logic_error' \n what(): basic_string::_S_construct null not valid"
I have the strangest feeling this might be my doing. Could you post this as a real bug on launchpad with a full traceback so we can see?
AFAICT this crash was introduced with - Revision 10992: Fix for 171579 : Make inkscape remember dialogs window status http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/10992
This based on tests with archived builds on OS X: - not reproduced with rev <= 10990 - reproduced with rev >= 10992
Attached is a full backtrace with a recent debug build (r12780), using glib2 2.38.1, glibmm 2.38.0, gtk2 2.24.22, gtkmm 2.24.4, libsigcxx2 2.2.11 (I don't have debug symbols installed for the dependencies).
Note: the crash is unrelated to the GLib-GObject console warnings in the log about
Attempt to add property gtkmm__CustomObject_N8Inkscape2UI6Widget12ImageTogglerE (…)
and occurs with older versions of glib2/glibmm/gtk2/gtkmm too.
Steps to reproduce such a crash with (new) default prefs: 1) launch trunk 2) draw rect 3) switch back to select tool 4) open 'File > Export PNG image' 5) open 'Edit > XML Editor' 6) delete id of rect in XML Editor 7) deselect and reselect the rect on-canvas --> crash
Regards, V
On 2013-11-07 21:18 +0100, Bryan Hoyt | Brush Technology wrote:
I don't think this bug is specific to groups, unless there are different bugs with similar symptoms.
This seems to be preferences-dependent. I've attached my preferences.xml which causes this bug to trigger.
Steps to reproduce:
- Launch inkscape with the attached preferences.xml
- Create a rect
- Open XML editor and delete "id" attribute of the rect
- Manifestation 1:**Choose "select" tool, click away from rect and then
click rect again. Inkscape dies with "unhandled exception (type std::exception) in signal handler:\n what: basic_string::_S_construct null not valid" 5) Manifestation 2: Don't choose the select tool, just click the rect with the rect tool. Inkscape dies with "terminate called after throwing an instance of 'std::logic_error' \n what(): basic_string::_S_construct null not valid"
Since AFAICT no report had been filed about this crash, I reported it now myself:
Bug #1257417 “trunk: Removing ID attribute from group (XML editor) causes crash (rev >= 10992)” https://bugs.launchpad.net/inkscape/+bug/1257417
@Bryan - please comment in the report if I ommitted important information, and please file one yourself if you think the one just reported is not about what you experience with your highly customized set of preferences.
Regards, V
Thanks very much, su_v -- sorry I took so long to get onto doing this myself.
Yes, I've just tested that with your method of reproducing it (open export-to-PNG dialog), and both symptoms are identical, so I believe it's likely to be the same bug.
- Bryan
On Wed, Dec 4, 2013 at 7:37 AM, su_v <suv-sf@...58...> wrote:
On 2013-11-07 21:18 +0100, Bryan Hoyt | Brush Technology wrote:
I don't think this bug is specific to groups, unless there are different bugs with similar symptoms.
This seems to be preferences-dependent. I've attached my preferences.xml which causes this bug to trigger.
Steps to reproduce:
- Launch inkscape with the attached preferences.xml
- Create a rect
- Open XML editor and delete "id" attribute of the rect
- Manifestation 1:**Choose "select" tool, click away from rect and then
click rect again. Inkscape dies with "unhandled exception (type std::exception) in signal handler:\n what: basic_string::_S_construct null not valid" 5) Manifestation 2: Don't choose the select tool, just click the rect with the rect tool. Inkscape dies with "terminate called after throwing an instance of 'std::logic_error' \n what(): basic_string::_S_construct null not valid"
Since AFAICT no report had been filed about this crash, I reported it now myself:
Bug #1257417 “trunk: Removing ID attribute from group (XML editor) causes crash (rev >= 10992)” https://bugs.launchpad.net/inkscape/+bug/1257417
@Bryan - please comment in the report if I ommitted important information, and please file one yourself if you think the one just reported is not about what you experience with your highly customized set of preferences.
Regards, V
participants (4)
-
Bryan Hoyt | Brush Technology
-
Krzysztof Kosiński
-
Martin Owens
-
su_v