Gradient are lost when the file is saved (rev >= 12686)

Bug #1241034 reported by Yann Papouin on 2013-10-17
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Markus Engel

Bug Description

I'm using latest version from trunk.

To reproduce, please open file attached:
- Create a new rectangle
- Apply a gradient to it
- Save your file
- Re-open it (via Revert or Open)
- Your rectangle content has been set to none.

Yann Papouin (yann-papouin) wrote :
su_v (suv-lp) wrote :

Confirmed with r12698 on OS X 10.7.5 with provided sample file, but not with gradients applied to a rectangle in a new document (based on the 'default.svg' template).

Testing with archived builds:
- not reproduced with rev <= 12685
- reproduced with rev >= 12686

@Yann - could you also attach the original version of the SVG file? AFAICT based on the SVG content it was not originally created with Inkscape - there are elements in the <defs> section and a namespace declaration which indicates that the SVG file was created with MS Visio:

   xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/"

tags: added: gradient regression
Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.49
status: New → Confirmed
su_v (suv-lp) wrote :

@Markus - maybe you could take a closer look?

Revision 12686: Changes to object creation. Fixes some warning in new from template.
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/12686>

Opening the sample file with r12685 has these console messages:
** (inkscape-12685:49709): WARNING **: TypeNotRegistered exception: v:textBlock

** (inkscape-12685:49709): WARNING **: TypeNotRegistered exception: v:textRect

** (inkscape-12685:49709): WARNING **: TypeNotRegistered exception: v:textBlock

** (inkscape-12685:49709): WARNING **: TypeNotRegistered exception: v:textRect

** (inkscape-12685:49709): WARNING **: TypeNotRegistered exception: v:textBlock

** (inkscape-12685:49709): WARNING **: TypeNotRegistered exception: v:textRect

With revision >= 12686 these messages no longer appear, but inkscape apparently doesn't apply gradients from the <defs> section when loading the file, unlike with earlier revisions.

su_v (suv-lp) wrote :

Another side-effect of the changes in r12686 seems to be that Inkscape no longer cleans up unused defs in such a document (it works with r12685 as expected).

summary: - Gradient are lost when the file is saved
+ Gradient are lost when the file is saved (rev >= 12686)
Markus Engel (engelmarkus) wrote :

Somehow I didn't get that this exception may occur inside a loop. Try the attached patch please, new from template should still work without any warnings as well.

Changed in inkscape:
assignee: nobody → Markus Engel (engelmarkus)
status: Confirmed → In Progress
su_v (suv-lp) wrote :

Patch tested successfully with r12701 on OS X 10.7.5 with the provided sample SVG file.

Markus Engel (engelmarkus) wrote :

Fixed in r12702.

Changed in inkscape:
status: In Progress → Fix Released
su_v (suv-lp) on 2013-10-21
Changed in inkscape:
milestone: 0.49 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers