Bug 451771 - Krita crash when applying layer style (possible corrupted resourcecache.sqlite)
Summary: Krita crash when applying layer style (possible corrupted resourcecache.sqlite)
Status: RESOLVED WORKSFORME
Alias: None
Product: krita
Classification: Applications
Component: layer styles (other bugs)
Version First Reported In: 5.0.2
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-21 15:43 UTC by Konayachi
Modified: 2025-05-28 10:09 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konayachi 2022-03-21 15:43:00 UTC
SUMMARY

After 5+ hours of use without issues, I tried to apply a stroke style to text and krita crashed.
Crash repeated every time I tried to apply stroke again.
Deleting resourcecache.sqlite stopped the crashing but I lost favorites and tags

CRASH DATA
I can't provide crash information because the how to provided (https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports) does not explain how to get for the crash data from an AppImage.


STEPS TO REPRODUCE
1. Draw and be unlucky
2. Open layer style
3. Add stroke

OBSERVED RESULT
1. Freeze for 3-5 secs
2. Crash

EXPECTED RESULT
Stroke is applied

SOFTWARE/OS VERSIONS

Device: Linux Mint 20.3 xfce
KDE Plasma Version: N/A
KDE Frameworks Version: N/A 
Qt Version: Unknown

ADDITIONAL INFORMATION

So, today I was drawing on Krita whole morning. I use lots of Layer Style -» Stroke a lot in my piece. Out of nowhere, suddenly Krita crashed when I'm about to add Stroke to a layer. I've been adding Stroke to layers prior to that, and all was normal and smooth without problem.

Since then, Krita always crashes each time I try to add Stroke to a layer. I thought, perhaps the file was corrupted, so I tried on a new file - it still crashed. Now Krita also crashed even when I was just opening the Layer Style -» Stroke window without ticking the box.


WORKAROUND

I found out that deleting the `resourcecache.sqlite` while krita is not running allowed me to try again and get it working. Maybe corrupted cache?

CONSEQUENCES OF WORKAROUND

However, I lose a lot of data including my favorite brushes list being completely empty. Custom tags are also gone.

If there's a way to extract that information from the old settings I have backed up and apply to the fixed database, please share. I would like my favorites and tags back without having to recreate them.

I don't know what personal or copyrighted information is in my .local/krita directory, so I rather not share the files publicly, however, I'm willing to share those files with some of krita devs through direct sharing.

Thank you for the attention.
Comment 1 Dmitry Kazakov 2022-03-29 14:28:20 UTC
Hi, Konayachi!

I have a feeling that your problem is related to bug 445922, which has been recently fixed, but not released yet.

If it is the case, you have the following options to workaround the issue:

1) Restore your original database (resourcecache.sqlite)

then either

2a) Make sure that "All" tag filter is selected in Patterns and Grandient popup selectors in the ToolBar. After that all subordinate resource selectors will use this filter as well and will not be able to have no resource selected.

or 

2b) Just try the nightly stable build. It has the fix for the bug. https://binary-factory.kde.org/job/Krita_Stable_Appimage_Build/

If the problem still persists, please write me again :)
Comment 2 Konayachi 2022-03-30 14:54:16 UTC
Hello Dmitry,

I did step 1 and 2b as you explained, and now Layer Style is completely greyed out. I cannot click on it, nor access it from a shortcut shows anything. I used the Krita nightly version 5d2860885a.
I retested the same on my Krita 5.0.2 and now instead of crashing, it is completely greyed out as well.

Also, I experienced another strange behavior as I wrote in bug 452056, it may or may not be related. Perhaps you can have a look from your side?

Thank you for your attention, looking forward to hearing back from you :)
Comment 3 Bug Janitor Service 2022-03-31 04:35:25 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 4 Halla Rempt 2025-05-28 10:09:35 UTC
I'm going to assume this got fixed by now because I cannot reproduce this anymore.