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

Bug #1241034 reported by Yann Papouin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
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.

Revision history for this message
Yann Papouin (yann-papouin) wrote :
Revision history for this message
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
Revision history for this message
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.

Revision history for this message
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)
Revision history for this message
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
Revision history for this message
su_v (suv-lp) wrote :

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

Revision history for this message
Markus Engel (engelmarkus) wrote :

Fixed in r12702.

Changed in inkscape:
status: In Progress → Fix Released
su_v (suv-lp)
Changed in inkscape:
milestone: 0.49 → none
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.