Bug 449226 - Krita crashes when trying to create an Animated Brush
Summary: Krita crashes when trying to create an Animated Brush
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Brush engines (show other bugs)
Version: 5.0.2
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: amyspark
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-27 05:56 UTC by ianmcclintock
Modified: 2022-02-28 13:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita crashlog for this particular event. (24.26 KB, text/plain)
2022-01-27 05:56 UTC, ianmcclintock
Details
Krita Project File (51.13 KB, application/x-zip-compressed)
2022-01-27 18:55 UTC, ianmcclintock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ianmcclintock 2022-01-27 05:56:25 UTC
Created attachment 145977 [details]
Krita crashlog for this particular event.

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
Attempting to follow this guide in the Krita 5 documentation:  https://docs.krita.org/en/tutorials/krita-brush-tips/animated_brushes.html

OBSERVED RESULT

When clicking 'OK' in the dialog box to create a stamp, Krita hangs for a moment, then closes.


EXPECTED RESULT

A new animated brush should be created and the program should not close.

SOFTWARE/OS VERSIONS
Windows:  10
Comment 1 Halla Rempt 2022-01-27 09:42:26 UTC
Hm, I see the crash, I can sort of guess the line where it crashes, but I cannot reproduce it :-(
Comment 2 ianmcclintock 2022-01-27 18:55:28 UTC
Created attachment 145999 [details]
Krita Project File

I'm attaching the project file that I was trying to use to create the brushes with, in case there's something about it that can help reproduce the crash.  If not, I guess it must be a conflict with something local on my system.  :(
Comment 3 amyspark 2022-02-21 13:25:39 UTC
Cannot reproduce it either, but 

https://invent.kde.org/graphics/krita/-/blob/master/plugins/paintops/libpaintop/kis_predefined_brush_chooser.cpp#L404

should not be executed if m_brush == NULL.
Comment 4 Dmitry Kazakov 2022-02-28 13:14:00 UTC
Git commit 606c5774795cdb32c50d08086a52f6a743ee1dd9 by Dmitry Kazakov.
Committed on 28/02/2022 at 13:13.
Pushed by dkazakov into branch 'master'.

Fix custom brush widget to not activate null brush resource when overriding
Related: bug 450121

M  +3    -3    plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp
M  +6    -4    plugins/paintops/libpaintop/kis_custom_brush_widget.cpp

https://invent.kde.org/graphics/krita/commit/606c5774795cdb32c50d08086a52f6a743ee1dd9
Comment 5 Dmitry Kazakov 2022-02-28 13:14:08 UTC
Git commit 594db4dfc6cdf453f17d0f4f2b5cbf30e90e8515 by Dmitry Kazakov.
Committed on 28/02/2022 at 13:13.
Pushed by dkazakov into branch 'master'.

Fix predefined brush widget doesn't crash when no brush is selected

To trigger the crash you need to create the brush with the same name
twice.

M  +1    -1    plugins/paintops/libpaintop/kis_predefined_brush_chooser.cpp

https://invent.kde.org/graphics/krita/commit/594db4dfc6cdf453f17d0f4f2b5cbf30e90e8515
Comment 6 Dmitry Kazakov 2022-02-28 13:48:22 UTC
Git commit 000f36f9a1dd2f512337cbfa294414cd6c6cc0d3 by Dmitry Kazakov.
Committed on 28/02/2022 at 13:48.
Pushed by dkazakov into branch 'krita/5.0'.

Fix custom brush widget to not activate null brush resource when overriding
Related: bug 450121

M  +3    -3    plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp
M  +6    -4    plugins/paintops/libpaintop/kis_custom_brush_widget.cpp

https://invent.kde.org/graphics/krita/commit/000f36f9a1dd2f512337cbfa294414cd6c6cc0d3
Comment 7 Dmitry Kazakov 2022-02-28 13:48:38 UTC
Git commit 69dcc22d0d203c632b05d46c9d1ec7b4ef153a26 by Dmitry Kazakov.
Committed on 28/02/2022 at 13:16.
Pushed by dkazakov into branch 'krita/5.0'.

Fix predefined brush widget doesn't crash when no brush is selected

To trigger the crash you need to create the brush with the same name
twice.

M  +1    -1    plugins/paintops/libpaintop/kis_predefined_brush_chooser.cpp

https://invent.kde.org/graphics/krita/commit/69dcc22d0d203c632b05d46c9d1ec7b4ef153a26