Bug 441976 - Krita slows down and eventually crashes after fast repeated strokes with textured brush.
Summary: Krita slows down and eventually crashes after fast repeated strokes with text...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: * Unknown (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Manjaro Linux
: NOR crash
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-04 06:07 UTC by invisible.rhino
Modified: 2021-09-08 07:53 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Log shortened for readability (20.23 KB, text/x-log)
2021-09-04 06:07 UTC, invisible.rhino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description invisible.rhino 2021-09-04 06:07:59 UTC
Created attachment 141283 [details]
Log shortened for readability

SUMMARY
Krita slows down and eventually crashes after fast repeated strokes with textured brush. This does NOT happen in nightly krita-5.1.0-prealpha-c2e53df-x86_64 from 31 August.

STEPS TO REPRODUCE
1. Select any brush preset with pattern assigned (for example c) Pencil-3 Large 4B)
2. Make many short quick strokes like when crosshatching or even faster.

OBSERVED RESULT
After varied number of strokes (over a hundred) Krita will pause before rendering each stroke, this pause will grow longer and Krita will soon close.

EXPECTED RESULT
None of the above happens.

It seem Krita spams exception on every stroke into log, i've shortened the log as it was several megabytes of the same line.

Krita

 Version: 5.1.0-prealpha (git 995cfd2)
 Languages: en_US, en
 Hidpi: false

Qt

  Version (compiled): 5.12.11
  Version (loaded): 5.12.11

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.10.60-1-MANJARO
  Pretty Productname: Manjaro Linux
  Product Type: manjaro
  Product Version: unknown
  Desktop: KDE

OpenGL Info
 
  Vendor:  "AMD" 
  Renderer:  "AMD Radeon (TM) RX 470 Graphics (POLARIS10, DRM 3.40.0, 5.10.60-1-MANJARO, LLVM 12.0.1)" 
  Version:  "4.6 (Compatibility Profile) Mesa 21.2.1" 
  Shading language:  "4.60" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 4.6, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
     Version: 4.6
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 16015 Mb
  Number of Cores: 12
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 14
  Use OpenGL: true
  Use OpenGL Texture Buffer: false
  Disable Vector Optimizations: false
  Disable AVX Optimizations: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 300
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false
Comment 1 Ahab Greybeard 2021-09-05 06:55:46 UTC
I can confirm this for the Sept 04 5.1.0-prealpha (git 6ca8117) appimage on Debian 10.
It does not happen with the Aug 31 5.1.0-prealpha (git c2e53df) appimage.

It happened after just over 100 rapid strokes of Pencil-3 Large 4B.
It did not happen after over 200 rapid strokes of Basic-5 Size.

The first time it crashed with four safe assert in the log file.
The second time it crashed, there were thirteen safe asserts.
The terminal output was "Segmentation fault".
Comment 2 Halla Rempt 2021-09-07 11:30:29 UTC
Git commit b510c738190eb53d276ab9681aadfcea04057db2 by Halla Rempt.
Committed on 07/09/2021 at 11:30.
Pushed by rempt into branch 'master'.

Pattern manager: Do not add resources if not in gui thread
Related: bug 442120

M  +3    -1    plugins/paintops/libpaintop/kis_linked_pattern_manager.cpp

https://invent.kde.org/graphics/krita/commit/b510c738190eb53d276ab9681aadfcea04057db2
Comment 3 Halla Rempt 2021-09-08 07:53:26 UTC
Git commit 7c2cc8e722da77fd460c09d3bb383392a5cd2142 by Halla Rempt.
Committed on 08/09/2021 at 07:29.
Pushed by rempt into branch 'krita/5.0'.

Pattern manager: Do not add resources if not in gui thread
Related: bug 442120
(cherry picked from commit b510c738190eb53d276ab9681aadfcea04057db2)

M  +3    -1    plugins/paintops/libpaintop/kis_linked_pattern_manager.cpp

https://invent.kde.org/graphics/krita/commit/7c2cc8e722da77fd460c09d3bb383392a5cd2142