Bug 456775 - Access violation in libkritalibpaintop.dll when saving/loading a custom brush preset
Summary: Access violation in libkritalibpaintop.dll when saving/loading a custom brush...
Status: RESOLVED DUPLICATE of bug 455541
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-15 19:42 UTC by Franck Rabeson
Modified: 2022-07-18 19:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Krita logs and the bundle used to reproduce the crash (1.75 MB, application/x-zip-compressed)
2022-07-15 19:42 UTC, Franck Rabeson
Details
Krita settings (44.33 KB, text/plain)
2022-07-18 19:32 UTC, Franck Rabeson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franck Rabeson 2022-07-15 19:42:57 UTC
Created attachment 150653 [details]
Krita logs and the bundle used to reproduce the crash

STEPS TO REPRODUCE
1. Modify a brush preset.
2. Save as a new preset.

OR

1. Try to load a brush preset created in a previous version, using the steps above.

OBSERVED RESULT
Krita immediately crashes without any error message.

SOFTWARE/OS VERSIONS
Windows: 10 21H2

ADDITIONAL INFORMATION
The crash does NOT occur in 5.1 Beta 1 and 5.2 nightly (build 2130f06ac8, July 1).
It occurs in both 5.1 Beta 1 and later 5.2 nightlies.
It occurs when I try to either save a variation of the brush "m) RGBA 04 Impasto" in the attached bundle, or try to load a variation of said brush created with an earlier version of Krita.
Comment 1 Franck Rabeson 2022-07-15 19:46:14 UTC
Correction: "It occurs in both 5.1 Beta 2 and later 5.2 nightlies."
Comment 2 Tiar 2022-07-15 19:50:13 UTC
Am I correct saying that the brushes that crash are those that there were created in Krita 5.1 beta 1 versions or similar? And that if you now (for example version 5.1. beta2) save a brush, it will load correctly without a crash in the same version of Krita and in earlier versions (like 5.0.6)?

Krita 5.1. beta1 version and a few nightly versions before and after had a bug in saving brushes. It was reverted so now it saves just like 5.0.6 did. If you have affected brushes and want to restore them so they won't crash, please use this plugin that I made: https://krita-artists.org/t/brush-fixer-for-brushes-created-in-krita-5-1-beta-1/44075
Comment 3 Franck Rabeson 2022-07-15 22:44:08 UTC
The brush was created with Krita 5.0, long before Beta 1.
Deleting the brush, then trying to recreate it using Beta 2 also causes the crash.
I’ve also just tried using that plugin, and unfortunately the crash is still present as soon as I select the brush.
Comment 4 Bug Janitor Service 2022-07-16 04:37:00 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Dmitry Kazakov 2022-07-18 06:53:45 UTC
Hi, Franck!

The backtrace shows that the crash actually happens not when you save the brush, but when the stylus comes into proximity and Krita tries to switch to some preset that has been assigned to the stylus the last time. Could you please check the following steps:

0) Close Krita 
1) Make a backup of your config file: %localappdata%\kritarc
2) Remove your config file
3) Start Krita and try to repeat the steps

If the crash is solved, please attach the version of the config file that you backed up. If not, please write the exact name of the brush that you tried to modify and save. The bundle that you attached is the standard one and it seems to work correctly here.

PS:
The backtrace looks as if the crash is actually the one we got in Beta1 and that is fixed by Tiar's plugin. The brush object is null due to some reason.
Comment 6 Tiar 2022-07-18 15:33:03 UTC
Another option would be to open Krita 5.1. beta 1 (you can download a portable zip to not install over the beta2) and see which brush the stylus switches to, if what Dmitry says is correct. It won't crash, and you can use my Brush Fixer plugin to convert it (and other brushes you saved/updated in beta1, if you remember which ones they were) to the correct state, and then open beta2 and the crash should be gone.
Comment 7 Franck Rabeson 2022-07-18 19:32:59 UTC
Created attachment 150718 [details]
Krita settings

All right, I've attached my kritarc file.

Beta 2 started as normal after I deleted the file, but crashed as soon as I tried to select my custom brush, named "m) RGBA 04 Impasto Erkhyan".

After checking, it turns out the corresponding kpp file hadn't been processed when I used the brush fixer plugin. I possibly selected the wrong file? Anyway, I ran the plugin on the brush again and it works now.
Comment 8 Tiar 2022-07-18 19:55:55 UTC
Great, thanks for the information. I'm closing the bug, then.

*** This bug has been marked as a duplicate of bug 455541 ***