Bug 455541 - A brush preset made with the 5.2.0-prealpha causes a crash in 5.0.6
Summary: A brush preset made with the 5.2.0-prealpha causes a crash in 5.0.6
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Debian stable Linux
: NOR crash
Target Milestone: ---
Assignee: Tiar
URL:
Keywords: regression, release_blocker
: 456484 456775 456834 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-18 10:20 UTC by Ahab Greybeard
Modified: 2022-08-15 10:55 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Simple renamed brush preset (22.78 KB, application/x-wine-extension-kpp)
2022-06-18 10:20 UTC, Ahab Greybeard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahab Greybeard 2022-06-18 10:20:35 UTC
Created attachment 149886 [details]
Simple renamed brush preset

SUMMARY
This was first reported in the forum:
https://krita-artists.org/t/recreate-sai-brush-in-krita/42787/17

A quick test shows that a brush preset made with the Jun 17 5.2.0-prealpha (git 4f0137a120) appimage will crash the 5.0.6 appimage when it is selected from the brush presets docker.

I attach an example brush preset that was made by Saving the Basic-2 Opacity preset, from the 5.0.2-prealpha, with a new name but no other modifications.
It was brought into 5.0.6 by using Settings -> Manage Resources -> Import Resources


STEPS TO REPRODUCE
See Summary

OBSERVED RESULT
See Summary

EXPECTED RESULT
There should be no crash

SOFTWARE/OS VERSIONS
Krita

 Version: 5.2.0-prealpha (git 4f0137a)
 Hidpi: false

Qt

  Version (compiled): 5.12.12
  Version (loaded): 5.12.12

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 4.19.0-20-amd64
  Pretty Productname: Debian GNU/Linux 10 (buster)
  Product Type: debian
  Product Version: 10
  Desktop: MATE
Comment 1 Dannel Gutiérrez 2022-06-18 19:08:10 UTC
 I created another brush in 5.1.0 and this one crashes in 5.0.6
Comment 2 Halla Rempt 2022-06-27 14:10:33 UTC
Note: https://invent.kde.org/graphics/krita/-/commit/74eb1ffa9cafc529585e7a47bf5c84f0ec4d0bf7 might be the breaking commit.
Comment 3 Tiar 2022-07-04 13:33:24 UTC
Fixed by reverting mentioned commit: https://invent.kde.org/graphics/krita/-/commit/9e12726bf39cf1053755fc7fbf35ba39a32e7ed1 .
I reopened the bug that was fixed in that commit: bug 446376
Comment 4 Dmitry Kazakov 2022-07-12 12:51:56 UTC
*** Bug 456484 has been marked as a duplicate of this bug. ***
Comment 5 tomtomtomreportingin 2022-07-13 17:52:19 UTC
For reference, to continue using brushes from 5.1 beta 1 in other versions, use this plugin: https://krita-artists.org/t/brush-fixer-for-brushes-created-in-krita-5-1-beta-1/44075
Comment 6 Tiar 2022-07-18 01:16:43 UTC
*** Bug 456834 has been marked as a duplicate of this bug. ***
Comment 7 Tiar 2022-07-18 19:55:55 UTC
*** Bug 456775 has been marked as a duplicate of this bug. ***
Comment 8 Dmitry Kazakov 2022-08-15 10:55:18 UTC
Git commit f409ceb9faf236d302a13d5866aae3907bc5e036 by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 15/08/2022 at 10:55.
Pushed by dkazakov into branch 'krita/5.1'.

Fix crash on incorrect brush preset metadata

Before this commit, if you tried to open a brush preset that
had incorrect brush metadata (for example any brush saved in
Krita 5.1 beta 1, with < changed to &lt; etc.), Krita would crash.
This commit ensures it will not crash in that case.

It's not an ideal solution, because there is no way to propagate the
information about the issue and the safe assert around line 370
in KisBrushBasedPaintOpSettings::regenerateResourceCache()
would still be fired. However it's less disruptive for the user.

M  +6    -0    plugins/paintops/libpaintop/kis_brush_based_paintop_settings.cpp

https://invent.kde.org/graphics/krita/commit/f409ceb9faf236d302a13d5866aae3907bc5e036
Comment 9 Dmitry Kazakov 2022-08-15 10:55:29 UTC
Git commit 78cca8fbaea96ac37687b8d8ef2c94d8eedb46cd by Dmitry Kazakov, on behalf of Agata Cacko.
Committed on 15/08/2022 at 10:55.
Pushed by dkazakov into branch 'master'.

Fix crash on incorrect brush preset metadata

Before this commit, if you tried to open a brush preset that
had incorrect brush metadata (for example any brush saved in
Krita 5.1 beta 1, with < changed to &lt; etc.), Krita would crash.
This commit ensures it will not crash in that case.

It's not an ideal solution, because there is no way to propagate the
information about the issue and the safe assert around line 370
in KisBrushBasedPaintOpSettings::regenerateResourceCache()
would still be fired. However it's less disruptive for the user.

M  +6    -0    plugins/paintops/libpaintop/kis_brush_based_paintop_settings.cpp

https://invent.kde.org/graphics/krita/commit/78cca8fbaea96ac37687b8d8ef2c94d8eedb46cd