Bug 440561

Summary: Krita crashes when selecting a brush with missing tip, if the last used brush has missing tip then krita crashes on startup (git 5c6d30a)
Product: [Applications] krita Reporter: Raghavendra kamath <raghu>
Component: Resource ManagementAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: normal CC: halla
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: back trace

Description Raghavendra kamath 2021-08-03 15:46:23 UTC
Created attachment 140487 [details]
back trace

SUMMARY
I imported a old kpp painttop preset via the manage resources dialog in 5.0 appimage, the brush was quickly imported, but the brush tip was not imported (I think the kpp didn't have it embedded), so now when I click on the brush krita crashes, I added the brush tip manually krita loaded and I was able to select the brush correctly, for testing I deleted the brush tip again now krita crashes on startup due to the brush with missing tip being the active brush on startup.

STEPS TO REPRODUCE
1. Download Krita appimage nightly build
2. Import a kpp file which uses a external image as brush tip, through the manage resources dialog
3. You'll see that the brush has an X mark denoting that the brush tip is missing.
4. click on this brush to select it.

I am attaching the backtrace from gdb
Comment 1 Halla Rempt 2021-08-04 08:59:44 UTC
Git commit 12dd74a1d28b7b536dce6948f0f73d490f0566c5 by Halla Rempt.
Committed on 04/08/2021 at 08:59.
Pushed by rempt into branch 'master'.

Use a default brush tip if the brush tip cannot be found

M  +4    -0    libs/brush/kis_brush.cpp
M  +1    -1    plugins/paintops/libpaintop/kis_brush_option.cpp

https://invent.kde.org/graphics/krita/commit/12dd74a1d28b7b536dce6948f0f73d490f0566c5