Bug 453243 - Canvas projection often isn't updated properly after undoing/redoing
Summary: Canvas projection often isn't updated properly after undoing/redoing
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Layer Stack (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-04-30 20:18 UTC by tomtomtomreportingin
Modified: 2022-07-13 11:52 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Cutoff strokes are undoing/redoing (152.18 KB, video/webm)
2022-04-30 20:18 UTC, tomtomtomreportingin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomtomtomreportingin 2022-04-30 20:18:46 UTC
Created attachment 148482 [details]
Cutoff strokes are undoing/redoing

git f866b153a4

SUMMARY
In Krita 5.1, the canvas visual projection often isn't updated properly after undoing or redoing, leaving cutoff strokes. See attachment. This happens regardless of using the OpenGL canvas.

This is not always reproducible.

STEPS TO REPRODUCE
1. Draw a series of lines around the same spot, in 100% zoom
2. Undo lines

OBSERVED RESULT
The projection of the lines are often cutoff.

EXPECTED RESULT
The projection should accurately reflect the strokes after undo/redo.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian sid
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.90.0
Qt Version: 5.12.12 (appimage)
Comment 1 tomtomtomreportingin 2022-06-19 23:10:04 UTC
Still occurs in 5.1 git 82766ef. Sometimes occurs even without the use of undo/redo. Marking as a regression.
Comment 2 Halla Rempt 2022-07-01 10:09:06 UTC
I don't think it actually is a regression, though...
Comment 3 tomtomtomreportingin 2022-07-01 14:08:58 UTC
Can't say I ever recall noticing this before I started testing 5.1. On my end, it happens basically every time I draw, and sometimes messes up my perception of the artwork, leading me to undo stuff I shouldn't have.
Comment 4 Dmitry Kazakov 2022-07-11 14:23:35 UTC
Git commit 0617bb063a777e05aaf8e506f287eafa133a897c by Dmitry Kazakov.
Committed on 11/07/2022 at 14:23.
Pushed by dkazakov into branch 'master'.

Fix random artifacts when undoing brush strokes

It looks like making indirect painting merge multithreaded
revealed a very old race condition in the tiles data manager.
The extent of the memento should be calculated in a synchronous
way.

M  +16   -5    libs/image/tiles3/kis_memento.h
M  +6    -4    libs/image/tiles3/kis_memento_manager.cc
M  +1    -0    libs/image/tiles3/kis_memento_manager.h

https://invent.kde.org/graphics/krita/commit/0617bb063a777e05aaf8e506f287eafa133a897c
Comment 5 Dmitry Kazakov 2022-07-11 14:24:19 UTC
Git commit 0c85656e28a97b7113733b042e7a26dea12f5614 by Dmitry Kazakov.
Committed on 11/07/2022 at 14:23.
Pushed by dkazakov into branch 'krita/5.1'.

Fix random artifacts when undoing brush strokes

It looks like making indirect painting merge multithreaded
revealed a very old race condition in the tiles data manager.
The extent of the memento should be calculated in a synchronous
way.

M  +16   -5    libs/image/tiles3/kis_memento.h
M  +6    -4    libs/image/tiles3/kis_memento_manager.cc
M  +1    -0    libs/image/tiles3/kis_memento_manager.h

https://invent.kde.org/graphics/krita/commit/0c85656e28a97b7113733b042e7a26dea12f5614
Comment 6 Dmitry Kazakov 2022-07-11 14:27:00 UTC
Hi, Tomtomtom!

I think I have fixed the issue. The fix should be present in this build I just kicked off. Please check and report if it is really fixed :)

https://binary-factory.kde.org/job/Krita_Stable_Appimage_Build/1551/
Comment 7 tomtomtomreportingin 2022-07-12 05:48:45 UTC
Seems like it's been resolved, the issue no longer occurs from what I can tell. Feels nice to be able to draw again without the various artifacts, thanks for the fix.
Comment 8 Dmitry Kazakov 2022-07-12 07:37:44 UTC
You are welcome! :)