file gets mangled due to Object->UnGroup

Bug #479638 reported by Alvin Penner
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Inkscape
In Progress
Medium
Mc

Bug Description

- this is based on a .svg file from Bug 474963, but it is a separate bug.
- load the file binary_tree.svg
- perform Edit->Select All
- perform Object->UnGroup
- save the file as binary_tree_mangled

Revision history for this message
Alvin Penner (apenner) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :
Revision history for this message
Alvin Penner (apenner) wrote :

What has happened is that all of the circles except one (the one around 'G') have been translated by the same amount.

The circles that have been moved appear to be clones. They all contain a reference to xlink:href #path3873, where path3873 is the circle around 'G'.

Revision history for this message
su_v (suv-lp) wrote :

The bug is triggered by un-grouping the group that contains the original circle (grouped with the character 'G').
a) individually un-grouping the groups containing a clone doesn't result in unexpected transformations.
b) manually removing the 'translate' attribute of the group containing the original circle and the character 'G' in the XML Editor before un-grouping all shows the revers happening: the circle and 'G' are translated by the same amount in the opposite direction as the clones are moved in you attached example 'binary_tree_mangled.svg' whereas the un-grouped clones stay in place.

possibly related or similar issues reported:
 bug #168651 "Tiled Clones" inside transformed groups broken
 bug #168286 ungrouping rotated group with text-on-path transforms text twice

tags: added: trasnformations
Revision history for this message
su_v (suv-lp) wrote :

reproduced with Inkscape 0.46+devel r22566 on OS X 10.5.8

possibly the other reports originating from the same SVG octree file share a common cause (nested 'translate' attributes of grouped clones, maybe aggravated by 'resize page to selection' which adds an additional translate attribute to the parent group "Layer 1"):
Bug #474963 “Can't export to WMF (UniConvertor failed)”
Bug #479553 “Moving shape with connectors, connectors go wild”
Bug #479577 “Cannot move (drag) an object”

Changed in inkscape:
status: New → Confirmed
Revision history for this message
jazzynico (jazzynico) wrote :

Also reproduced on Ubuntu 9.10, pre4, and Windows XP, 0.46 and pre4.

Changed in inkscape:
importance: Undecided → Medium
tags: added: groups
su_v (suv-lp)
tags: added: transformations
removed: trasnformations
Revision history for this message
su_v (suv-lp) wrote :

Two references to what seems to be a known problem:

A) detailed earlier comment by Pjrm in bug #168651 about page resize:
<quote>
A second question is how Fit canvas to selection should implement its
translation step, whether adding a transform attribute to the group as it
does now or whether to go more deeply. If the latter, then how deeply? If
fully deeply, then beware of issues with objects in a group being cloned
(especially if that group has a rotation transformation): need to be
careful about how to adjust the clone's transform.
</quote>
<https://bugs.launchpad.net/inkscape/+bug/168651/comments/1>

B) related posting in inkscape-devel:
From: bulia byak
Subject: "clone behaviour"
Date: 2009-07-03
<quote>
> -transform management: create an object A, create a clone A' of it, put A'
> in a group G. Now select A and G and rotate them. A' is rotated twice!!!

I have spent quite a time coding around issues like this and ensuring
that clones transform intuitively, using compensations. However my
calculations are limited to the simple case of naked clones. If you
put a clone in a group and transform the group, or use clone of clone
chains, this will still behave wrong. But it's not some unfixable
problem. The code for compensations is there, we just need to make
this code smarter and make it look farther around the clone to figure
out the correct compensating transformation. Maybe it was just me, but
I found this too difficult, so I limited myself to the simple case -
someone more mathematically gifted can probably crack it easily. Give
it a try.
</quote>
<http://article.gmane.org/gmane.comp.graphics.inkscape.devel/30630>

I haven't yet found an earlier report of this issue (besides the possibly related one about the clone-tiler) but since it has been unsolved for some time I expect there must be other reports describing unexpected behavior of clones or their original objects in transformed groups. Anyone?

Revision history for this message
Alvin Penner (apenner) wrote :

- something has changed in the rendering of the file binary_tree.svg. The last 'normal' rendering I have is from 0.47 rev 22583, Nov 22, 2009.
- screen dump attached :

Revision history for this message
Alvin Penner (apenner) wrote :

the first bad rendering is from bzr rev 9111, Feb 25, 2010, which is what it currently looks like:

Revision history for this message
su_v (suv-lp) wrote :

@Alvin - could be the same regression as reported in bug #556467 “connectors between groups misplaced (regression)”
<https://bugs.launchpad.net/inkscape/+bug/556467> (and also noted in <https://bugs.launchpad.net/inkscape/+bug/552289/comments/4>).

Revision history for this message
Alvin Penner (apenner) wrote :

wow, I am truly impressed by your powers of recollection. The only reason I looked at this was because I vaguely remembered being the author of the bug, long ago.

- fwiw, the original bug still apears to be present as well, the Object Ungroup operation will produce further mangling in addition to the errors in the original rendering.

su_v (suv-lp)
tags: added: clones
Revision history for this message
su_v (suv-lp) wrote :

Related (likely duplicate) reports:
Bug #653574 “Ungrouping moves clones inside nested groups”
Bug #659452 “Ungrouping objects causes translation in clones”

Revision history for this message
insaner (insaner) wrote :

related bug:
    Bug #1195043 - "move selection to layer above" spreads clones up Edit

does anyone know roughly where in the code this bug is located? i might be able to give it a quick gander and see what could potentially be done.

su_v (suv-lp)
Changed in inkscape:
assignee: nobody → Mc (mc...)
status: Confirmed → In Progress
milestone: none → 0.92
Revision history for this message
su_v (suv-lp) wrote :

Patch from comment #14 tested successfully with Inkscape 0.91+devel r13915 on OS X 10.7.5 using the test case from comment #1 and the steps to reproduce from the original bug description.

Revision history for this message
Mc (mc...) wrote :
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.