Bug 504781

Summary: Crash on clearing text field in text brush pipe mode
Product: [Applications] krita Reporter: Lukas <giga-zoddom>
Component: Brush enginesAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash CC: michelist.tracksbugs, penguinflyer2222
Priority: NOR    
Version First Reported In: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of text brush window with pipe mode checkbox
crash log with all crashes in different versions
krita log with all sessions in different versions
sys info
Crash-report 5.3.0-prealpha (git 954866a) for the confirmation of this bug: 504781

Description Lukas 2025-05-25 17:28:54 UTC
Created attachment 181740 [details]
screenshot of text brush window with pipe mode checkbox

SUMMARY
Clearing the text input field in the pixel engines brush tip text tab while having pipemode enabled leads to a crash. 

STEPS TO REPRODUCE
1. select brush tool
2. open brush editor
3. select text tab in brush tip menu
4. check pipe mode
5. clear text input (select all + delete)
(step 4 and 5 are interchangable)

OBSERVED RESULT
Crash

EXPECTED RESULT
Clearing input unchecks pipe mode without crashing (as in 5.1.5)

SOFTWARE/OS VERSIONS
Windows: 10 Pro, 10.0.19045 Build 19045
First version in regression without crash: 5.1.5 (I dont have any builds between 5.1.5 and 5.2.2)
Crashing in: 5.2.2, 5.2.3., 5.2.4, 5.2.5, 5.2.9 and 5.3.0-prealpha-a05ebc35

ADDITIONAL INFORMATION
see screenshot in attachements for exact window. I will also add the crash logs afterwards.
Comment 1 Lukas 2025-05-25 17:29:20 UTC
Created attachment 181741 [details]
crash log with all crashes in different versions
Comment 2 Lukas 2025-05-25 17:29:45 UTC
Created attachment 181742 [details]
krita log with all sessions in different versions
Comment 3 Lukas 2025-05-25 17:29:58 UTC
Created attachment 181743 [details]
sys info
Comment 4 Michael Strothotte 2025-05-26 08:54:49 UTC
Created attachment 181756 [details]
Crash-report 5.3.0-prealpha (git 954866a) for the confirmation of this bug: 504781

I checked this with Krita 5.2.2, 5.2.9, 5.2.10-prealpha (git ec4e34b) and 5.3.0-prealpha (git 954866a) can confirm that the steps reported let Krita crash. 

I'll add the report from the 5.3.0-prealpha (git 954866a) exemplary for the crashes that happened.


Best Regards
Michelist // Michael Strothotte
Comment 5 Bug Janitor Service 2025-06-06 11:36:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2410
Comment 6 Halla Rempt 2025-06-07 06:34:06 UTC
Git commit 8d9a1a8c6108a4ad47c98f54651757ede7312a07 by Halla Rempt, on behalf of Freya Lupen.
Committed on 07/06/2025 at 06:33.
Pushed by rempt into branch 'master'.

Avoid crash when clearing text pipe brushtip text

M  +5    -0    libs/brush/kis_text_brush.cpp

https://invent.kde.org/graphics/krita/-/commit/8d9a1a8c6108a4ad47c98f54651757ede7312a07