Summary: | Versions 4.1.7 onwards do not function properly with an .svg File Layer | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Ahab Greybeard <ahab.greybeard> |
Component: | Layer Stack | Assignee: | amyspark <amy> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | amy, emmetoneill.pdx, ghevan |
Priority: | NOR | ||
Version: | nightly build (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Debian stable | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/commit/1e70e4ed51908c82dc603e3031cbb66701e4afcb | Version Fixed In: | |
Sentry Crash Report: |
Description
Ahab Greybeard
2022-01-11 13:51:06 UTC
I can reproduce this issue easily, svg as file layer is not loaded anymore. List of commits between 4.1.5 and 4.1.7: https://invent.kde.org/graphics/krita/-/compare/v4.1.5...v4.1.7?from_project_id=206 The only one I could find regarding SVG is this one: commit dc4e44f448ba5fc8379ac7751baf2638593b0ac0 Author: Emmet O'Neill <emmetoneill.pdx@gmail.com> Date: Sun Oct 14 22:35:40 2018 +0200 Improved responsiveness of moving large SVG objects. Added a KisSignalCompressor to the KisShapeLayerCanvas to reduce the number of updates. BUG:399363 which, when reverted, makes both SVG File Layers and plain SVG documents show a blank canvas on opening. Further digging around KisSafeDocumentLoader::delayedLoadStart show that the document loads correctly through the SVG impex plugin, but the returned projection is a 0x0 image. For the record, the imported image claims to be of the expected size; it's just its projection that returns a broken bounds QRect. I found the root cause. Shape layers, when imported via a document's openPath or importDocument and not linked to the GUI, are never painted at all because the strokes are not given a chance to execute. This is caused by a mix of commits. First, commit dc4e44f448ba5fc8379ac7751baf2638593b0ac0, which was first introduced between 4.1.5 and 4.1.7, as the reporter surmised. The revert didn't fix the paint because there's a second commit compounding this, which removes all avenues of synchronous painting: commit 5355a56cf0b0eb7844f612d61946f335ce8bac23 Author: Dmitry Kazakov <dimula73@gmail.com> Date: Wed Dec 4 17:24:25 2019 +0300 Remove synchronous update capabilities from KisShapeLayerCanvas After we fixed KoShapeManager to be thread-safe, we can safely rerender the layer in background stroke. It is faster and looks smoother for the user. And finally, the jobs are killed here. This didn't cause an issue pre 4.1.7 because said layers were synchronously painted: commit 10b7e991fef3cba64c00d61543ad135656071e04 Author: Dmitry Kazakov <dimula73@gmail.com> Date: Sun Feb 15 22:10:38 2015 +0400 Fix applying transform masks to file layers 1) The original() of the file layer should store the correct KisDefaultBounds object. That was the exact cause of the bug. 2) KisSafeDocumentLoader should not keep the entire copy of the document in memory all the time. Clear the pointer when loaded. 3) Add an kritarc option to enlarge the are available for transform mask data fetching outside the image. Name: transformMaskOffBoundsReadArea Type: qreal Default value is 0.5, which means the image is expanded up to half its size into each of the four direction. 4) Added a unittest for KisFileLayer Assigning to Dmitry as the sum of all commits makes it an async jobs-related issue. A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1316 Git commit 5951c2b8090c7faf2cdee6450ca0500ace09c433 by L. E. Segovia. Committed on 31/01/2022 at 20:22. Pushed by lsegovia into branch 'master'. Force node updates before projecting a newly imported document M +5 -0 libs/ui/kis_safe_document_loader.cpp M +5 -0 libs/ui/utils/KisClipboardUtil.cpp https://invent.kde.org/graphics/krita/commit/5951c2b8090c7faf2cdee6450ca0500ace09c433 Git commit 1e70e4ed51908c82dc603e3031cbb66701e4afcb by L. E. Segovia. Committed on 31/01/2022 at 20:24. Pushed by lsegovia into branch 'krita/5.0'. Force node updates before projecting a newly imported document (cherry picked from commit 5951c2b8090c7faf2cdee6450ca0500ace09c433) M +5 -0 libs/ui/kis_safe_document_loader.cpp M +5 -0 libs/ui/utils/KisClipboardUtil.cpp https://invent.kde.org/graphics/krita/commit/1e70e4ed51908c82dc603e3031cbb66701e4afcb |