https://bugs.kde.org/show_bug.cgi?id=525476

            Bug ID: 525476
           Summary: Duplicating a precomp layer copies the referenced
                    composition without regenerating UUIDs, so both copies
                    resolve to the same asset after save/reload
    Classification: Applications
           Product: glaxnimate
      Version First 0.6.0
       Reported In:
          Platform: Mint (Ubuntu based)
                OS: Linux
            Status: REPORTED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 195941
  --> https://bugs.kde.org/attachment.cgi?id=195941&action=edit
Rawr file with duplicated precomp UUIDs

Steps to reproduce:
1. Create a composition containing a shape with a solid fill.
2. Add it to another composition as a precomp layer.
3. Duplicate that precomp layer.
4. Change the fill colour inside the duplicate's composition.
   Both instances now render correctly and independently.
5. Save the .rawr, close Glaxnimate, reopen the file.

Observed:
Both precomp layers render using the first composition's
fill. The second composition's content is unreachable.

Expected:
Each duplicate keeps the appearance it had before saving.

Cause (from inspecting the saved file):
The duplicate operation deep-copies the referenced
composition, but does not assign new UUIDs to the copy.
In the attached file, "Parallelogram-pink" and
"Parallelogram-purple" both carry uuid
10c0f4a8-0543-41a7-84c1-ba9bc52c0b94, and both PreCompLayers
in the "Animation" composition reference that UUID. Every
object in the duplicated subtree is affected, not just the
composition: Layer, both Groups, Fill, Stroke and Path all
share UUIDs with their originals (7 collisions total).

On load, both PreCompLayer references resolve to whichever
composition registered first, so the duplicate's content is
discarded.

Impact:
The error is invisible in the editing session, because the
in-memory objects are distinct. It only appears after a
save/reload cycle, or when the file is rendered by another
consumer — I hit it first in Kdenlive, where both shapes
rendered in the original's colour. Work can be lost without
any warning.

Workaround:
Editing the saved JSON to assign fresh UUIDs to the
duplicated subtree restores correct rendering, with no
other changes needed.

Detection:
grep -o '"uuid": "[0-9a-f-]*"' file.rawr | sort | uniq -d

Glaxnimate: 0.6.0+-git-
potrace: potracelib 1.16
libav: Lavu59.39.100, Lavf61.7.100, Lavc61.19.101, SwS8.3.100
libarchive: 3.8.7
zlib
Inkscape
pybind11: 2.13.6
CPython: 3.13.14
KDE Frameworks: 6.29.0
Qt: Using 6.10.3 and built against 6.10.3
Flatpak
KDE Flatpak runtime (Xcb)
Build ABI: x86_64-little_endian-lp64
Kernel: linux 6.8.0-138-generic


DESCRIPTION


STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Operating System (available in the Info Center app, or by running `kinfo` in a
terminal window):
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to