Bug 453831

Summary: Consistent hard crash when renaming tags in Krita 5.0.6
Product: [Applications] krita Reporter: Hologram <intuos5>
Component: TaggingAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: crash CC: dimula73
Priority: NOR    
Version: 5.0.6   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: This is the log file created by Krita.
Systeminfo
Another log file after clearing the Sqlite cache
This is the crash log, which includes another test from today (18th of july), which immediately crashed Krita

Description Hologram 2022-05-15 14:24:40 UTC
Created attachment 148853 [details]
This is the log file created by Krita.

SUMMARY
***
When I rename an existing tag, such as "Paint" to "0_Paint" Krita crashes. 
***

This could also be because I have multiple bundles associated to a particular tag before renaming. These bundles were imported through the resource manager. The crash still occurs after clearing old paintoppresets and the Sqlite cache file. 

See: https://krita-artists.org/t/consistent-hard-crash-when-renaming-tags-in-krita-5-0-6/41078
Comment 1 Hologram 2022-05-15 14:25:37 UTC
Created attachment 148854 [details]
Systeminfo
Comment 2 Hologram 2022-05-15 14:26:08 UTC
Created attachment 148855 [details]
Another log file after clearing the Sqlite cache
Comment 3 Dmitry Kazakov 2022-07-18 07:14:47 UTC
Hi, Hologram!

Could you please attach the Krita's crash log? It should be located at address:

%localappdata%\kritacrash.log

I cannot reprodute the issue here locally, neither in Krita 5.0.6, nor in Krita Nigthly. This crash log would help be identify the problem
Comment 4 Hologram 2022-07-18 07:26:56 UTC
Created attachment 150698 [details]
This is the crash log, which includes another test from today (18th of july), which immediately crashed Krita

Hi Dmitry,

I tested the same procedure on Krita 5.1 Beta 1 and it still causes a hard crash for me. The log file is added.

Hope this helps!
Comment 5 Bug Janitor Service 2022-07-19 04:36:38 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 6 Dmitry Kazakov 2022-07-20 06:22:26 UTC
Hi, Hologram!

Thanks a lot for the crash log. The problem looks a bit more clear now :)
Comment 7 Dmitry Kazakov 2022-07-20 12:30:29 UTC
Git commit 851d3cf2301b9f1819633ef98f9c5f7fa9443b66 by Dmitry Kazakov.
Committed on 20/07/2022 at 12:30.
Pushed by dkazakov into branch 'master'.

Fix a crash when renaming a tag

There were multiple problems that caused the crash. Under some
circumstances, including wrong tag cache value, the tag chooser
widget could try to dereference a null pointer.

(the patch still doesn't fix the issue of the renamed tags
reappearing after Krita restart, but that is a different
issue)

M  +2    -1    libs/resources/KisTagModel.cpp
M  +3    -1    libs/resourcewidgets/KisTagChooserWidget.cpp

https://invent.kde.org/graphics/krita/commit/851d3cf2301b9f1819633ef98f9c5f7fa9443b66
Comment 8 Dmitry Kazakov 2022-07-20 12:30:39 UTC
Git commit 008134384de50fc7a3925afbb3aff7dd7b3b05aa by Dmitry Kazakov.
Committed on 20/07/2022 at 12:30.
Pushed by dkazakov into branch 'krita/5.1'.

Fix a crash when renaming a tag

There were multiple problems that caused the crash. Under some
circumstances, including wrong tag cache value, the tag chooser
widget could try to dereference a null pointer.

(the patch still doesn't fix the issue of the renamed tags
reappearing after Krita restart, but that is a different
issue)

M  +2    -1    libs/resources/KisTagModel.cpp
M  +3    -1    libs/resourcewidgets/KisTagChooserWidget.cpp

https://invent.kde.org/graphics/krita/commit/008134384de50fc7a3925afbb3aff7dd7b3b05aa