Using Brush or Line Tools Sometimes Delete Part of The Layer in a Square/Rectangle Pattern

You can see it in her chin.

I start experiencing this (bug?) maybe after Krita 5.0 update. At first it happened only if I use line tools in a layer that has already pixels drawn in it. When I want to create line using the tool, it erased a huge part in a rectangular shape where I want to make the lines, and the line tool wasn’t on erase mode.

Now it happen with regular brush tool too. This is the second time it happened on this piece, and I think it happen when I do quick brush swap after a brush stroke. Also the size of the area it erased is actually much bigger than the size of the brush used when it happen.

I paint quite in a rapid manner, so sometimes I make another brush strokes while krita still processing stuff, but I am not sure if my rapid paint process have something to do with this bug. Does this happen with anyone else? I hope there’s a solution for this.

Which graphic card do you have? AMD?

I sometimes have something similar when I have a lot of FX layers or complicated masks like transform mask. It’s an visual glitch, I can normally resolve it by just toggling the visibility of the layer so that Krita renders the projections new. Do you have canvas acceleration enabled? Perhaps using a different renderer (Angle or OpenGL) can do the trick. Never had it with just drawing or the line tool, though.

@raghukamath
my PC spec:
CPU Intel i5-9400F,
*GPU Nvidia GTX 1050ti,
RAM 16 GB 2400 MHz,
Krita Installed in C drive, in an M.2 SSD
File being worked on is saved in a HDD

@Takiro I do have canvas acceleration setting turned on, I do not remember if my Krita display config is on default setting, but here is a screenshot of it

edit: I forget to mention, it is not a visual glitch, the drawing really got erased, I tried to turn on/off the visibilty too at first but it’s not it. Even tried to do undo but the erased part won’t come back.

This is serious data loss then, can you reproduce it, we need to report it if it is reproducible

It doesn’t happen quite often, but yeah I think this is serious too. I’ll try to reproduce it and record it with OBS tomorrow. It’s quite late at night at my place.

If there’s a parameter or procedure that I should know please do tell.

There was another topic like this recently as well: Line tool erases a rectangular area of an image before drawing a line . And as in that topic I suggest seeing if the console log contains any asserts when this happens (when undoing).
I’ve also noticed this before when testing the line tool, but I can’t consistently reproduce it. I don’t believe there’s been a bug report for it, so one probably should be made.

1 Like

I just want to report, I drew for another 3 hours this morning, for the same piece and the bug didn’t occur.
I hope there maybe more people that can report on this issue and have more info to show to the dev. Wish I could record full screen everytime I draw, but my storage drive is a really old HDD, can’t really lost another one because some bad things happen during recording (e.g. Electric outage).

Also I tried to use console log (attempt to read the manual and install), but it is too confusing for me and I haven’t got time to sit down and really learn technical stuff on krita. I’ll try changing my settings, maybe Krita will work better somehow

1 Like

Don’t worry, I am trying to keep an eye on this too. The worrying thing is finding this even if it is random. we need to remember when it happened. So that the devs know where to look.

1 Like

I tried to scribble with the line tool all the layers of a Kra file I had with a huge layer stack, but I couldn’t reproduce the tile crash, unfortunately. Tile crashes are very dangerous bugs, the last time I saw one I could reproduce was 10 years ago. I hope we’ll find the set of conditions and settings to reproduce this one.

1 Like

For demonstration, here’s a video I recorded on 5.2.x (git 939408c), just repeatedly using the line tool for a few minutes; brush is “b) Basic-2 Opacity”. Before that I was using “b) Basic-1”, but nothing was happening, so I switched brushes. Could be it only happens with certain brushes, could be the act of switching brushes somehow triggers it, could be I was just (un)lucky. After a while it just randomly happens, trying to undo it causes a safe assert in libs/image/tiles3/kis_memento_manager.cc, line 275, and redoing in line 332.

(For fun I turned on all the logging options. The Unknown transform parameter : "" being logged is from kis_dynamic_sensor::id2sensor(). The brush is trying to use some sort of incorrect sensor or something, but the message is very unhelpfully worded.)

3 Likes

@ynr_nohara do you have canvas acceleration disabled by any chance

No, my canvas acceleration is on. I have screenshot of my display setting in the earlier reply to this topic.

Currently I change my renderer to OpenGL, I have a hunch that something is wrong with my nvidia driver. Had some weird sound glitch with my chrome browser and stutter in games that previously run just fine But I am not sure if it is related to this Krita bug.

For reference, I used ANGLE with an Intel GPU, and Canvas Acceleration enabled.

Registering an account to say that I have encountered the same issue.
My setup is as follows:
CPU: Intel i7-8750h
GPU: Nvidia RTX 3080 12G (connected through Thunderbolt)
The same issue can be reproduced with both ANGLE and OpenGL, with or without texture buffer.
The issue appeared when I used the “Basic 2- Opacity” preset, but I suspect this affects all brushes with opacity control.
Krita would stop updating the tiles close to the glitching tile when using undo/redo after placing a problematic stroke, and the glitched tile could propagate to the undo steps in some instances.
Hope this helps narrow down the cause since it is affecting my work a lot. Thanks.

Edit: I enabled the log viewer and drew until the bug came up, here is what came up:


As frealupen observed, safe assert line 275 and 332 are called when undoing and redoing respectively.

2 Likes

Half the time I work with the line tool, and sometimes I run into a bug where a rectangular area (a little larger than the line itself) is erased first, and only then the line is applied. At the same time, this unpleasant case cannot be simply rolled back with Ctrl + Z, it may be necessary to press this shortcut several times, or it may not help at all.

Restarting the program does not help. I encountered this problem in version 5.0.0. I tried to update to version 5.1.1, drawing in a new file, but this bug is still there.

Hardware configuration:
Intel Core i5-10300H, 2.50 GHz
16 GB of RAM
4095MB NVIDIA GeForce GTX 1650
SSD

OS: Windows 10 Pro 64-bit

Does Krita print anything to the console log when this happens? (How to get the console log: Getting Krita logs — Krita Manual 5.0.0 documentation)
I’m suspecting it to contain a safe assert in the memento manager.

Does the bug only occur randomly, or do you have some idea how to more reliably reproduce it? (Using a certain brush, etc.)

Moved the other thread here as well.

I think we need to report this as a bug to keep it in records.

I reported the bug here - 460461 – Using line tool repeatedly and undoing results in irrecoverable data loss of tile data.

please subscribe to it and add any relevant new information.

@raghukamath today with the line tool I was able to reproduce this bug with all canvas acceleration off. My canvas acceleration was off in the hopes of avoiding this bug. But it seems my original assumption that this is acceleration related is false. I usually save my work everytime before drawing any line with the line tool.

Hi, everyone!

Just wanted to let you know, this bug is unrelated to canvas GPU acceleration. It is related to the Undo/Redo system. If you happen to see the memento manager assert, save your image into a safe space and restart Krita immediately. The data that has disappeared under the line stroke cannot be recovered.

I’m still trying to reproduce the issue, but cannot do that for some reason :slight_smile:

2 Likes