Bug 447454 - Resource-related crash (?) on startup
Summary: Resource-related crash (?) on startup
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: * Unknown (show other bugs)
Version: 5.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR critical
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
: 447450 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-12-24 03:25 UTC by Cheyenne
Modified: 2021-12-24 12:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
this is the ms dos application everytime I start up, I notice it's about my brushes being broken but I can't remove them if I can't open krita (41.38 KB, image/png)
2021-12-24 03:25 UTC, Cheyenne
Details
attachment-25550-0.html (1.36 KB, text/html)
2021-12-24 11:17 UTC, Cheyenne
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cheyenne 2021-12-24 03:25:32 UTC
Created attachment 144819 [details]
this is the ms dos application everytime I start up, I notice it's about my brushes being broken but I can't remove them if I can't open krita

SUMMARY
***   I would try to send a backtrace crash report but I really don't understand how? 
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
1. have windows 11
2. start up krita
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Alvin Wong 2021-12-24 04:25:54 UTC
Hi Cheyenne, if you may, please try to find the backtrace by following https://docs.krita.org/en/reference_manual/dr_minw_debugger.html?highlight=backtrace#getting-a-backtrace

---

Note: the original subject was:

> Hi so I am currently using windows 11  and I was previously using krita 4,
> I previously tried krita 5 beta and the same issue occurred. the loading
> screen would say loading resources but then after a minute it would just
> exit out.  I really don't know wha

(Yes it was truncated as-is.)
Comment 2 Dmitry Kazakov 2021-12-24 07:34:15 UTC
Hi, Cheyenne!

The problem is in loading of some .abr brushes. Please try the following:

0) Make sure Krita is closed
1) Go to `%APPDATA%\krita` folder
2) Remove file `resourcecache.sqlite`
3) Move the following bundles into the safe space outside Krita's resources directory:
   * Sketch-and-lineart-brush-set.bindle
   * The-Cloud-Brush-set.bundle
4) Try running Krita. If Krita starts fine without these bundles, please share them with me. You can do that privately by sending to 'dimula73 at gmail dot com'
5) If it doesn't help, search for .abr files in `%APPDATA%\krita\brushes` folder and move all of them into a safe space
6) Remove file `resourcecache.sqlite` again (!)
7) Try running Krita. If Krita starts fine without these files, share the files with me (privately, if needed).
8) If nothing helps, move the entire `%APPDATA%\krita` folder into a safe place, run Krita and add the old resources one-by-one. And share the failing resource with me.

I tried to forcefully trigger the 'unable to decode abr format version' error here locally, but it doesn't cause a crash. The resource is just skipped.
Comment 3 Dmitry Kazakov 2021-12-24 07:37:31 UTC
*** Bug 447450 has been marked as a duplicate of this bug. ***
Comment 4 Dmitry Kazakov 2021-12-24 08:17:35 UTC
Hi, @Cheyenne!

Could you check if you have any **upper case** extensions in files like *.ABR,  *.BUNDLE or *.ASL files in your  `%APPDATA%\krita` folder (and its subdirectories)? If yes, please rename them into lower-case, like .abr, .bundle and .asl. It looks like that is the cause of the problem
Comment 5 Bug Janitor Service 2021-12-24 10:08:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1257
Comment 6 Dmitry Kazakov 2021-12-24 10:20:21 UTC
Hi, Cheyenne and Jennifer!

I have a fix in for this bug. The patch is in process of review now, but it will be included only in the next minor release of Krita. Which will happen only in January, when all the holidays are over.

To fix the crash on your system please do the following steps:

1) Open `%APPDATA%\krita` folder 
2) Make sure that all the files in all subdirectories have **lower-case** file extensions. That is most important for .abr, .bundle and .asl files

After these manipulations, when all file extensions are in lower case, Krita should run fine.
Comment 7 Cheyenne 2021-12-24 11:17:52 UTC
Created attachment 144825 [details]
attachment-25550-0.html

Thank you that fixed it!

On Fri, Dec 24, 2021, 5:20 AM Dmitry Kazakov <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=447454
>
> --- Comment #6 from Dmitry Kazakov <dimula73@gmail.com> ---
> Hi, Cheyenne and Jennifer!
>
> I have a fix in for this bug. The patch is in process of review now, but it
> will be included only in the next minor release of Krita. Which will happen
> only in January, when all the holidays are over.
>
> To fix the crash on your system please do the following steps:
>
> 1) Open `%APPDATA%\krita` folder
> 2) Make sure that all the files in all subdirectories have **lower-case**
> file
> extensions. That is most important for .abr, .bundle and .asl files
>
> After these manipulations, when all file extensions are in lower case,
> Krita
> should run fine.
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 8 Jennifer Reuter 2021-12-24 11:46:38 UTC
Will confirm here too that it worked for me also, thanks!
Comment 9 Dmitry Kazakov 2021-12-24 12:03:15 UTC
Git commit 4315e88c326bccdffc61d3c30dbc7178c4637094 by Dmitry Kazakov.
Committed on 24/12/2021 at 12:01.
Pushed by dkazakov into branch 'master'.

Make file extension comparisons more robust

Wehn detecting file format via file extension we should compare
it in case-insensitive way.

M  +1    -1    libs/libqml/plugins/kritasketchplugin/models/RecentImageImageProvider.cpp
M  +1    -1    libs/resources/KisResourceCacheDb.cpp
M  +1    -1    libs/ui/KisApplication.cpp
M  +1    -1    libs/ui/KisWelcomePageWidget.cpp
M  +1    -1    libs/ui/animation/KisFFMpegWrapper.cpp
M  +1    -1    libs/ui/widgets/kis_preset_live_preview_view.cpp
M  +1    -1    plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp

https://invent.kde.org/graphics/krita/commit/4315e88c326bccdffc61d3c30dbc7178c4637094
Comment 10 Dmitry Kazakov 2021-12-24 12:03:24 UTC
Git commit 8d32f9a3a5deda59b787ecf9d06f7345929184bc by Dmitry Kazakov.
Committed on 24/12/2021 at 12:01.
Pushed by dkazakov into branch 'master'.

Make sure that the storage is not removed when its file extension is uppercase

M  +3    -3    libs/resources/KisResourceLocator.cpp

https://invent.kde.org/graphics/krita/commit/8d32f9a3a5deda59b787ecf9d06f7345929184bc
Comment 11 Dmitry Kazakov 2021-12-24 12:03:32 UTC
Git commit 73ecac022b59a424fd2b23139db446164d3869de by Dmitry Kazakov.
Committed on 24/12/2021 at 12:01.
Pushed by dkazakov into branch 'master'.

Fix crash when opening Krita with ABR brushes with upper case extensions


On Windows we QDirIterator returns us all the matching storages in
case-insensitive manner, so we should make sure we can handle these
storages later.

The patch also adds a fallback storage plugin to make sure Krita
will not crash when handling such storage later.

M  +4    -0    libs/resources/KisResourceLocator.cpp
M  +5    -3    libs/resources/KisResourceStorage.cpp

https://invent.kde.org/graphics/krita/commit/73ecac022b59a424fd2b23139db446164d3869de
Comment 12 Dmitry Kazakov 2021-12-24 12:10:27 UTC
Git commit 81aeca107357d1ba54b126c343f199d819053e61 by Dmitry Kazakov.
Committed on 24/12/2021 at 12:05.
Pushed by dkazakov into branch 'krita/5.0'.

Fix crash when opening Krita with ABR brushes with upper case extensions


On Windows we QDirIterator returns us all the matching storages in
case-insensitive manner, so we should make sure we can handle these
storages later.

The patch also adds a fallback storage plugin to make sure Krita
will not crash when handling such storage later.

M  +4    -0    libs/resources/KisResourceLocator.cpp
M  +5    -3    libs/resources/KisResourceStorage.cpp

https://invent.kde.org/graphics/krita/commit/81aeca107357d1ba54b126c343f199d819053e61
Comment 13 Dmitry Kazakov 2021-12-24 12:10:34 UTC
Git commit e0bf0314cd62ef3b4bcef5e6b6096b06ee8e87aa by Dmitry Kazakov.
Committed on 24/12/2021 at 12:05.
Pushed by dkazakov into branch 'krita/5.0'.

Make file extension comparisons more robust

Wehn detecting file format via file extension we should compare
it in case-insensitive way.

M  +1    -1    libs/libqml/plugins/kritasketchplugin/models/RecentImageImageProvider.cpp
M  +1    -1    libs/resources/KisResourceCacheDb.cpp
M  +1    -1    libs/ui/KisApplication.cpp
M  +1    -1    libs/ui/KisWelcomePageWidget.cpp
M  +1    -1    libs/ui/animation/KisFFMpegWrapper.cpp
M  +1    -1    libs/ui/widgets/kis_preset_live_preview_view.cpp
M  +1    -1    plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp

https://invent.kde.org/graphics/krita/commit/e0bf0314cd62ef3b4bcef5e6b6096b06ee8e87aa
Comment 14 Dmitry Kazakov 2021-12-24 12:10:43 UTC
Git commit 308e4717d2dcbff4665aa890f4a79d5aa6914373 by Dmitry Kazakov.
Committed on 24/12/2021 at 12:05.
Pushed by dkazakov into branch 'krita/5.0'.

Make sure that the storage is not removed when its file extension is uppercase

M  +3    -3    libs/resources/KisResourceLocator.cpp

https://invent.kde.org/graphics/krita/commit/308e4717d2dcbff4665aa890f4a79d5aa6914373
Comment 15 Dmitry Kazakov 2021-12-24 12:31:40 UTC
Git commit b07762336f40d129290e1b348a1d632c7b89aaf5 by Dmitry Kazakov.
Committed on 24/12/2021 at 12:14.
Pushed by dkazakov into branch 'krita/5.0.0'.

Make file extension comparisons more robust

Wehn detecting file format via file extension we should compare
it in case-insensitive way.

M  +1    -1    libs/libqml/plugins/kritasketchplugin/models/RecentImageImageProvider.cpp
M  +1    -1    libs/resources/KisResourceCacheDb.cpp
M  +1    -1    libs/ui/KisApplication.cpp
M  +1    -1    libs/ui/KisWelcomePageWidget.cpp
M  +1    -1    libs/ui/animation/KisFFMpegWrapper.cpp
M  +1    -1    libs/ui/widgets/kis_preset_live_preview_view.cpp
M  +1    -1    plugins/paintops/mypaint/MyPaintPaintOpPreset.cpp

https://invent.kde.org/graphics/krita/commit/b07762336f40d129290e1b348a1d632c7b89aaf5
Comment 16 Dmitry Kazakov 2021-12-24 12:31:48 UTC
Git commit 17328ee82b09e4abf4a4dfd33ec225e3ede0f8d8 by Dmitry Kazakov.
Committed on 24/12/2021 at 12:14.
Pushed by dkazakov into branch 'krita/5.0.0'.

Fix crash when opening Krita with ABR brushes with upper case extensions


On Windows we QDirIterator returns us all the matching storages in
case-insensitive manner, so we should make sure we can handle these
storages later.

The patch also adds a fallback storage plugin to make sure Krita
will not crash when handling such storage later.

M  +4    -0    libs/resources/KisResourceLocator.cpp
M  +5    -3    libs/resources/KisResourceStorage.cpp

https://invent.kde.org/graphics/krita/commit/17328ee82b09e4abf4a4dfd33ec225e3ede0f8d8
Comment 17 Dmitry Kazakov 2021-12-24 12:31:58 UTC
Git commit a8c0e4dd41c332f88d6d1fd7922bbb9fd1f54e5b by Dmitry Kazakov.
Committed on 24/12/2021 at 12:14.
Pushed by dkazakov into branch 'krita/5.0.0'.

Make sure that the storage is not removed when its file extension is uppercase

M  +3    -3    libs/resources/KisResourceLocator.cpp

https://invent.kde.org/graphics/krita/commit/a8c0e4dd41c332f88d6d1fd7922bbb9fd1f54e5b