Bug 440139 - Resizing watercolor brush leads to crash on latest appimage
Summary: Resizing watercolor brush leads to crash on latest appimage
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Mint (Ubuntu based) Linux
: NOR crash
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
: 440189 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-07-22 06:37 UTC by Know Zero
Modified: 2021-07-31 01:06 UTC (History)
2 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 Know Zero 2021-07-22 06:37:05 UTC
SUMMARY

Krita crashes on latest appimage when trying to resize a watercolor brush


STEPS TO REPRODUCE
1. Select a water brush like j)Watercolor texture
2. Then try to resize it via the top resize bar


OBSERVED RESULT

Crash

Krita Version: 5.0.0-prealpha (git 63be085), Qt version compiled: 5.12.11, loaded: 5.12.11. Process ID: 17567
-- -- -- -- -- -- -- --
22 Jul 2021 02:22:18 -0400: Style: fusion. Available styles: Windows, Fusion
22 Jul 2021 02:22:19 -0400: Database is up to date. Version: 0.0.10, created by Krita 5.0.0-prealpha, at Tue Jul 20 03:36:31 2021
22 Jul 2021 02:22:19 -0400: Could not retrieve md5 for resourcepaintoppresets/Special_dyna_dots.kpp
22 Jul 2021 02:22:19 -0400: SAFE ASSERT (krita): "retval" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/resources/KisResourceCacheDb.cpp, line 1459
22 Jul 2021 02:22:19 -0400: Could not add resourcea63767fe-c3b9-4f98-8582-be74fffbdd0f_style
22 Jul 2021 02:22:24 -0400: Created image "Unnamed", 1650 * 900 pixels, 72 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 1
22 Jul 2021 02:22:38 -0400: SAFE ASSERT (krita): "brush" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/brush/kis_predefined_brush_factory.cpp, line 37

KRITA DID NOT CLOSE CORRECTLY


EXPECTED RESULT


SOFTWARE/OS VERSIONS
AppImage 63be085 on both Mint and on OpenSuse 15.3

ADDITIONAL INFORMATION

This does not happen on older Appimage 4c233e3
Comment 1 Know Zero 2021-07-22 07:00:30 UTC
I did a test in my KDE OpenSuse 15.3 dev environment updating it to latest, and it also crashed.

It did not crash back at commit c81ba5b3 which was 2 days ago.
Comment 2 Halla Rempt 2021-07-23 12:50:13 UTC
*** Bug 440189 has been marked as a duplicate of this bug. ***
Comment 3 Halla Rempt 2021-07-24 09:44:39 UTC
Git commit fe2aa5793870e51a7c63abd9aa4c64510a814ddf by Halla Rempt.
Committed on 24/07/2021 at 09:11.
Pushed by rempt into branch 'master'.

Do not crash if a brush tip does not exist

Instead create a default brush tip.
Related: bug 440138

M  +13   -10   libs/image/brushengine/kis_paintop_preset.cpp
M  +1    -4    libs/image/brushengine/kis_paintop_registry.cc
M  +1    -8    libs/ui/kis_canvas_resource_provider.cpp
M  +0    -1    libs/ui/kis_paintop_box.cc
M  +14   -5    plugins/paintops/libpaintop/kis_brush_based_paintop.cpp

https://invent.kde.org/graphics/krita/commit/fe2aa5793870e51a7c63abd9aa4c64510a814ddf
Comment 4 Know Zero 2021-07-24 21:11:24 UTC
I don't think the issue is fully fixed :(

It still crashes when trying to resize a water color brush. (or to be more specific, when upgrading from Krita 4, fresh seems to be fine)

Here is from the latest appimage:

Krita Version: 5.0.0-prealpha (git a3253a2), Qt version compiled: 5.12.11, loaded: 5.12.11. Process ID: 26423
-- -- -- -- -- -- -- --
24 Jul 2021 16:33:00 -0400: Style: fusion. Available styles: Windows, Fusion
24 Jul 2021 16:33:00 -0400: Database is up to date. Version: 0.0.10, created by Krita 5.0.0-prealpha, at Tue Jul 20 03:36:31 2021
24 Jul 2021 16:33:00 -0400: Could not retrieve md5 for resourcepaintoppresets/Special_dyna_dots.kpp
24 Jul 2021 16:33:00 -0400: SAFE ASSERT (krita): "retval" in file /home/appimage/workspace/Krita_Nightly_Appimage_Build/krita/libs/resources/KisResourceCacheDb.cpp, line 1459
24 Jul 2021 16:33:00 -0400: Could not add resourcea63767fe-c3b9-4f98-8582-be74fffbdd0f_style
24 Jul 2021 16:33:16 -0400: Created image "Unnamed", 1650 * 900 pixels, 72 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 1

KRITA DID NOT CLOSE CORRECTLY

----------------

I also updated my master to see if it is just the appimage, and it also crashed but looking at the QT logs:

krita.lib.store: KOStore "brushes/watercolor.gih" "brushes/watercolor.gih"
krita.lib.store: Opening for reading "brushes/watercolor.gih"
         [RESOURCE] Name: "Watercolor" Version: 0 Filename: "watercolor.gih" MD5: "ab0f2533f70f76314711899bec6b34cb" Type: QPair("brushes","gbr_brushes") Valid: true Storage: "/home/e/.local/share/krita/Krita_4_Default_Resources.bundle"
krita.lib.resources: resourceSelected: preset QSharedPointer(0x4712150) "1"
krita.ui: setPreviousPaintOpPreset "" ("paintbrush" )
global for filename "watercolor.gih" rowcount 256
         [RESOURCE] Name: "Watercolor" Version: 0 Filename: "watercolor.gih" MD5: "ab0f2533f70f76314711899bec6b34cb" Type: QPair("brushes","gbr_brushes") Valid: true Storage: "/home/e/.local/share/krita/Krita_4_Default_Resources.bundle"
krita.plugins: Unknown transform parameter : ""
krita.plugins: Unknown transform parameter : ""
global for filename "abominable_snowman.png" rowcount 256
         [RESOURCE] Name: "abominable_snowman" Version: 0 Filename: "abominable_snowman.png" MD5: "c605fb1974497a2974efa42352a88abe" Type: QPair("brushes","png_brushes") Valid: true Storage: "/home/e/.local/share/krita/Krita_4_Default_Resources.bundle"
global for filename "watercolor.gih" rowcount 256
         [RESOURCE] Name: "Watercolor" Version: 0 Filename: "watercolor.gih" MD5: "ab0f2533f70f76314711899bec6b34cb" Type: QPair("brushes","gbr_brushes") Valid: true Storage: "/home/e/.local/share/krita/Krita_4_Default_Resources.bundle"
global for filename "watercolor.gih" rowcount 256
         [RESOURCE] Name: "Watercolor" Version: 0 Filename: "watercolor.gih" MD5: "ab0f2533f70f76314711899bec6b34cb" Type: QPair("brushes","gbr_brushes") Valid: true Storage: "/home/e/.local/share/krita/Krita_4_Default_Resources.bundle"
KCrash: Application 'krita' crashing...

-----------------------------------------------

Seeing Krita 4 in there, I tried making a .home folder for the appimage to start fresh. And it seems to work fine then.
Comment 5 Know Zero 2021-07-31 01:06:25 UTC
This issue seems to be fixed.