Bug 388818 - Fill layers break the projection update system
Summary: Fill layers break the projection update system
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 4.0.0-beta.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-11 17:37 UTC by razvanc87
Modified: 2018-01-16 11:16 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
callgring log (772.93 KB, application/zip)
2018-01-11 18:56 UTC, Halla Rempt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description razvanc87 2018-01-11 17:37:28 UTC
System: 16 gb ram, intel i7-4710mq cpu 2.5ghz x 8, geforce gt 750m, ubuntu 17.04

Downloaded krita 4-beta1 (appimage) and immediately saw something was wrong. The mouse pointer (when hovering over canvas) doesn't follow the motion of the stylus smoothly. It stalls and jumps over the canvas making painting impossible.

I've noticed beta1 uses high CPU (around 85-90%) even on idle, something that doesn't happen in pre-alpha and v3. I tried both opnengl on and off with no effect. Brush preset doesn't matter.

I've also noticed my terminal is filled with <<falling back on QIcon::FromTheme: "enhancedpath">> messages and looks to me like this bug isn't directly related to the brush engine performance, it's more like a CPU usage leak or something. Hope it helps, I'm really looking forward to v4 stable :)
Comment 1 wolthera 2018-01-11 18:15:12 UTC
A few questions to start off with:

1. Are you using fill layers anywhere on the canvas? If so, this is the cause.

2. Which pre-alpha did you last play with? We made two(just typing in the git hash will help a lot)

3. Does turning off openGL make a difference? Maybe something is going awry there.

Any any other information bout the canvas would be great. Thing is, I cannot reproduce it on KDE Neon based on Uuntu 16.04, but then, I don't have an NVidea card.
Comment 2 Halla Rempt 2018-01-11 18:46:04 UTC
I cannot reproduce on my opensuse + nvidia system either.
Comment 3 Halla Rempt 2018-01-11 18:56:59 UTC
Created attachment 109800 [details]
callgring log

I do see this with fill layers, and that's because of something wrong in the update code. I've attached a callgrind log, and I'll assign to Dmitry.
Comment 4 razvanc87 2018-01-11 21:10:11 UTC
Yes, you are right, I can confirm that without fill layers krita beta1 behaves nicely. I didn't realize, I had a template with fill layers and I didn't make the connection. Nice to see I'm not crazy :)
Comment 5 Dmitry Kazakov 2018-01-16 11:16:00 UTC
Git commit 79f3a44038b5f7d742956ee7fe31d3bc657d6fe9 by Dmitry Kazakov.
Committed on 16/01/2018 at 11:15.
Pushed by dkazakov into branch 'master'.

Fix infinite loop when adding a Fill Layer to the image

We should invent some better way avoid this loop... Right now the
construction a bit fragile :)

M  +2    -2    libs/image/generator/kis_generator_layer.cpp

https://commits.kde.org/krita/79f3a44038b5f7d742956ee7fe31d3bc657d6fe9