Guide labels are not getting saved to SVG

Bug #1029033 reported by Samuel Chase
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
High
Samuel Chase

Bug Description

This bug can be reproduced as follows:

1. Create a new guide.
2. Double-click the guide to open the guide dialog.
3. In the "Label" text-field, type the name you want to give the guide.

What will be observed is that "sodipodi:guide" becomes the name of the guide. It can also be observed that "sodipodi:guide" is the value of the attribute "inkscape:label".

Double-clicking the guide and then re-attempting to change the label of the guide will cause the label of the guide to be rendered, but the SVG will not have been updated.

Tags: guides
su_v (suv-lp)
tags: added: guides
Changed in inkscape:
assignee: nobody → Samuel Chase (samebchase)
Revision history for this message
su_v (suv-lp) wrote :

Steps to reproduce vary (testing with r11573 on OS X 10.7.4) - corruption mostly occurs after repeated edits of a guide's label (inserting characters seems to trigger the error more often than adding characters at the end), sometimes may produce broken SVG file which Inkscape can no longer reopen:

/path/to/bug/1029033-labeled-guide-1.svg:44: parser error : invalid character in attribute value
       inkscape:label="foobar" />
                             ^
/path/to/bug/1029033-labeled-guide-1.svg:44: parser error : attributes construct error
       inkscape:label="foobar" />
                             ^
/path/to/bug/1029033-labeled-guide-1.svg:44: parser error : Couldn't find end of Start Tag guide line 40
       inkscape:label="foobar" />
                             ^
/path/to/bug/1029033-labeled-guide-1.svg:44: parser error : PCDATA invalid Char value 2
       inkscape:label="foobar" />
                             ^

Revision history for this message
su_v (suv-lp) wrote :
Changed in inkscape:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Samuel Chase (samebchase) wrote :
Revision history for this message
jazzynico (jazzynico) wrote :

Looks better with the patch from comment #3. Tested on Windows XP, Inkscape revision 11575, and you now can modify the label as long as you're working on a new file.

But after saving and reloading the file, label modification sometimes adds invalid characters, hides the guide (it exists in the XML file but is not rendered, while other guides are), triggers various rendering weirdnesses (when zooming/panning) and even freezes or crashes the application (when editing the name from the XML editor).

New report(s)?

Changed in inkscape:
status: Confirmed → In Progress
Revision history for this message
Samuel Chase (samebchase) wrote :

@JazzyNico

Yes. I can confirm this.

Just generated a SVG that has guide labels in them.

Reopening the file rendered the guides correctly, but trying to change the guide causes the label to be rendered with unreadable characters. The XML, however, is updated.

The guide then isn't rendered anymore, i.e. it 'disappears'.

Revision history for this message
Samuel Chase (samebchase) wrote :

These warnings are being printed to the console:

(patchscape:2082): Pango-WARNING **: Invalid UTF-8 string passed to pango_layout_set_text()

(patchscape:2082): GLib-CRITICAL **: g_utf8_strlen: assertion `p != NULL || max == 0' failed

Revision history for this message
Martin Owens (doctormo) wrote :

Same as bug #1299185 but now the patch provided by Samuel is cleaned and inserted so it can do it's job :-) see r13228 and r13227

Changed in inkscape:
status: In Progress → Fix Committed
su_v (suv-lp)
Changed in inkscape:
milestone: none → 0.91
Bryce Harrington (bryce)
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
su_v (suv-lp) wrote :

Follow-up report:
* Bug #1469514 “Crash when renaming a guideline label in a new session”
  https://bugs.launchpad.net/inkscape/+bug/1469514

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.