Bug 404552

Summary: Safe Asserts triggered while drawing.
Product: [Applications] krita Reporter: wolthera <griffinvalley>
Component: Brush enginesAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR Keywords: regression, release_blocker
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description wolthera 2019-02-19 11:54:41 UTC
SUMMARY
Found the following safe asserts in my terminal while running Krita in it.

-----------------------
SAFE ASSERT (krita): "m_d->suspend || !m_d->sanityResumingFinished" in file /home/wolthera/krita/src/libs/image/kis_suspend_projection_updates_stroke_strategy.cpp, line 509
SAFE ASSERT (krita): "0 && "why the heck we are undoing the last job of the stroke?!"" in file /home/wolthera/krita/src/libs/image/kis_suspend_projection_updates_stroke_strategy.cpp, line 329
SAFE ASSERT (krita): "m_d->suspend || !m_d->sanityResumingFinished" in file /home/wolthera/krita/src/libs/image/kis_suspend_projection_updates_stroke_strategy.cpp, line 509
SAFE ASSERT (krita): "0 && "why the heck we are undoing the last job of the stroke?!"" in file /home/wolthera/krita/src/libs/image/kis_suspend_projection_updates_stroke_strategy.cpp, line 329
----------------------

STEPS TO REPRODUCE
No idea, I was just doodling with a pixel brush on a 4 layer 300DPI canvas. I did use the move tool earlier. Instant Preview is on.

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS

================================================================================
SESSION: 18 Feb 2019 19:28:23 +0100

WARNING: This file contains information about your system and the
images you have been working with.

If you have problems with Krita, the Krita developers might ask
you to share this file with them. The information in this file is
not shared automatically with the Krita developers in any way. You
can disable logging to this file in Krita's Configure Krita Dialog.

Please review the contents of this file before sharing this file with
anyone.

Krita

  Version: 4.2.0-pre-alpha (git ab53dc1)

Qt

  Version (compiled): 5.11.2
  Version (loaded): 5.11.2

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.15.0-43-generic
  Pretty Productname: KDE neon User Edition 5.14
  Product Type: neon
  Product Version: 18.04

OpenGL Info
 
  Vendor:  Intel Open Source Technology Center 
  Renderer:  "Mesa DRI Intel(R) UHD Graphics 620 (Kabylake GT2) " 
  Version:  "3.0 Mesa 18.0.5" 
  Shading language:  1.30 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 
18 Feb 2019 19:28:29 +0100: Importing application/x-krita to application/x-krita. Location: /home/wolthera/Wolthera_temp/writing/HP/riddle_doodle_2.kra. Real location: /home/wolthera/Wolthera_temp/writing/HP/riddle_doodle_2.kra. Batchmode: 0

Hardware Information

  GPU Acceleration: auto
  Memory: 7725 Mb
  Number of Cores: 8
  Swap Location: /tmp

18 Feb 2019 19:43:40 +0100: Converting from application/x-krita to application/x-krita. Location: /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra. Real location: /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra. Batchmode: 0. Configuration: none
18 Feb 2019 19:43:42 +0100: Completed saving /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra (mime: application/x-krita). Result: OK
18 Feb 2019 19:58:42 +0100: Converting from application/x-krita to application/x-krita. Location: /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra. Real location: /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra. Batchmode: 0. Configuration: none
18 Feb 2019 19:58:44 +0100: Completed saving /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra (mime: application/x-krita). Result: OK
18 Feb 2019 20:15:09 +0100: Converting from application/x-krita to application/x-krita. Location: /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra. Real location: /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra. Batchmode: 0. Configuration: none
18 Feb 2019 20:15:11 +0100: Completed saving /home/wolthera/Wolthera_temp/writing/HP/.riddle_doodle_2.kra-autosave.kra (mime: application/x-krita). Result: OK
Comment 1 Dmitry Kazakov 2019-04-30 14:17:32 UTC
Git commit 6d7f665b3d0f3a7a43bf991e76d87525a965c5ce by Dmitry Kazakov.
Committed on 30/04/2019 at 14:17.
Pushed by dkazakov into branch 'master'.

Fix asserts in KisSuspendProjectionUpdatesStrokeStrategy

It looks like RESUME stroke strategy works differently from
other strategies. It can be suspended even when there are no
internal jobs left. It happens because the strokes queue uses
RESUME strategies as a marker for a position, where to place
LodN strokes. It will add new strokes before it even if the
resume strategy is almost done :)

M  +28   -2    libs/image/kis_suspend_projection_updates_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/6d7f665b3d0f3a7a43bf991e76d87525a965c5ce