Bug 421376 - Krita hiccups while painting every few seconds
Summary: Krita hiccups while painting every few seconds
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.3.0-beta1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2020-05-11 22:48 UTC by Tiar
Modified: 2021-08-28 04:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2020-05-11 22:48:40 UTC
SUMMARY
When my PC is under a heavy load, usually when my RAM is kinda full (I guess around 80-90%?) even though CPU is free, Krita sometimes has a hiccup. This is not related to autosave since it happens way too often. It seems to be regular.
Note: there is a chance it happens under lower load as well but I don't notice it as much?

STEPS TO REPRODUCE
1. Open programs to take up a lot of RAM.
2. Paint one consistent line for a long time, quite quickly. (It doesn't need to be one stroke, but it helps seeing the problem).


EXPECTED RESULT
The line is being drawn all the time consistently.


OBSERVED RESULT
Sometimes the line stops, but then restarts - it is just a visual lag, since the underlying stroke has the same shape as other parts of the stroke.


ADDITIONAL INFO
The lag happens around every 5 seconds.

Also when I tried to use a simple applet, I had a problem recording the video because I had a huge lag all the time - and the stroke shape was different, because, I believe, Krita didn't get enough tablet events because of the heavy performance needs. That suggests that in this case it might be something inside of Krita instead of my system?

NOTE: It can of course still be my system...

Also Krita 4.3.0 I think has the same issue, and I'm not sure if it's a regression or not. I will check further. I'd like to leave it here so other people (1) can see the video and check if it looks familiar, (2) can tell me it's all because my system is bad and doesn't deserve a cookie, or (3)... maybe someone would guess the reason.

I will check other versions to see which has it.


Recorded screen video: https://drive.google.com/open?id=1KRegM9sjgjqhWadxpBTz7OK59Y6XbNef


SOFTWARE/OS VERSIONS
Krita git version: built upon b9b20f3376

Krita

 Version: 5.0.0-prealpha (git a23d232)
 Languages: en_US, en, en_US, en, en_US, en, pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.11.1
  Version (loaded): 5.11.1

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.3.7-050307-generic
  Pretty Productname: Linux Mint 19.3
  Product Type: linuxmint
  Product Version: 19.3
  Desktop: X-Cinnamon
Comment 1 vanyossi 2020-05-12 03:19:44 UTC
Sounds to me like a normal computer behaviour. CPU does use RAM to mover data in and out. Less free ram, less space to work with. Does this happen in the same conditions with an image smaller, say 250x250? It might be related to texture buffering for openGL. afaik it needs physical RAM to buffer the texture data before sending it to the videocard for rendering/processing
Comment 2 Lynx3d 2020-05-12 17:34:27 UTC
I've had that issue when I used krita for several hours, at some point drawing would often have short freezes somewhat randomly just like in your recording. It still created the strokes as expected, "just" delayed which gets rather irritating and annoying.

There was always plenty of RAM available though, and krita itself didn't seem to leak larger amounts either, but restarting Krita seemed to help.

Unfortunately, I have absolutely no idea how to debubg something like that, it might be some allocator that gets into a messy internal state and needs way too long to cleanup periodically, but that's pure speculation.

I've had it with various 4.2.x versions, but it's hard to say if it existed before or if it's still in 4.3/master because I just don't often that kind of patience to do that long painting session, and 4.1 (the first Krita I really used) would rarely run that long without crashing in the first place...
Comment 3 Halla Rempt 2021-02-13 12:56:03 UTC
For what it's worth, I've been painting regularly since October, on Windows, on a 32gb Thinkpad 470p and never noticed anything like this. I'm not sure how useful it is to keep this bug open?
Comment 4 Autumn Lansing 2021-03-10 22:58:51 UTC
The exact same issue is happening for me as well. It seemed to have begun only recently though, starting in at least 4.3.2 and continuing in 4.4.3-beta1.  It may have been happening prior to this, however, and I just didn't notice at the time. It's highly noticeable now.

It's not a memory issue, as it occurs when there's well over 10 GB of memory available. It also ONLY happens in Krita. It doesn't happen in GIMP. It happens with both mouse and table pen.

It also happens with a newly-opened Krita window, not just a instance that's been open for a while.

Though I'm not certain, I may have begun to notice it after I upgraded my Nvidia card from a Quadro 600 to a GeForce GTX 660. The GeForce card, however, is the same card used in my previous computer, and this problem never occurred with it there, so I don't think that has anything to do with it, but I thought I'd mention it in case it was relevant.
Comment 5 Halla Rempt 2021-03-23 11:51:32 UTC
I suspect the GPU pipeline stalls -- but there isn't a whole lot we can do about that...
Comment 6 Dmitry Kazakov 2021-07-29 12:48:54 UTC
Hi, Tiar!

Could you pelase recheck this bug in Krita 5.0? I think it is the same bug I fixed in this commit:

https://invent.kde.org/graphics/krita/-/commit/cbb70a7b4518f234bf905e9042faa387d8226e0f
Comment 7 Bug Janitor Service 2021-08-13 04:36:05 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Bug Janitor Service 2021-08-28 04:36:36 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!