# Krita 5.1.0 beta 2 always crashes a few seconds after start

**URL:** <https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533>\
**Category:** Artists Feedback & Testing\
**Created:** [July 22, 2022, 10:16pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533 "2022-07-22T22:16:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 22, 2022, 10:16pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/1 "2022-07-22T22:16:23Z")

</div>

I need help.  
For some reason, Krita always crashes a few seconds after it starts.  
What could be causing this ?

SESSION: 22 Jul 2022 23:06:01 +0100. Executing I:\Downloads\Compressed\Krita x 64 nightly 5.1 prealpha\bin\krita.exe

Krita Version: 5.1.0-beta2 (git d3e9097), Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 22676

* * *

22 Jul 2022 23:06:01 +0100: Style: fusion. Available styles: windowsvista, Windows, Fusion  
22 Jul 2022 23:06:06 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.0-beta2, at Wed Jun 29 01:28:40 2022  
22 Jul 2022 23:06:17 +0100: Could not load resource patterns/krita\_CNLkSY.pat  
22 Jul 2022 23:06:17 +0100: Could not load resource patterns/krita\_EOUVvr.pat  
22 Jul 2022 23:06:17 +0100: Could not load resource patterns/krita\_zzHDct.pat  
22 Jul 2022 23:06:17 +0100: Could not retrieve md5 for resource paintoppresets/Special\_dyna\_dots.kpp  
22 Jul 2022 23:06:20 +0100: Non-store package - creating updater  
22 Jul 2022 23:06:30 +0100: Importing image/vnd.adobe.photoshop to application/x-krita. Location: I:/Downloads/ArtstationDownloader/barkode/gumroad/adfasdf2-1.psd. Real location: I:/Downloads/ArtstationDownloader/barkode/gumroad/adfasdf2-1.psd. Batchmode: 1  
22 Jul 2022 23:06:30 +0100: SAFE ASSERT (krita): “QThread::currentThread() == (static\_cast\<QApplication \*\>(QCoreApplication::instance()))-\>thread()” in file C:/Packaging/workspace/Krita\_Stable\_Windows\_Build/krita/libs/resources/KisRequiredResourcesOperators.cpp, line 24

I downgraded Krita to read the log file :

```auto
Error occurred on Friday, July 22, 2022 at 23:06:36.

krita.exe caused an Access Violation at location 00007FFE17FF4C8A in module libkritaresources.dll Reading from location 0000000000000000.

AddrPC Params
00007FFE17FF4C8A 0000000000000000 00007FFE00000000 000001D37B2E57E0 libkritaresources.dll!KisResourceStorage::addResource+0xa
00007FFE17FE701B 000001D3634A9370 00007FFE59D147B1 000000422EEFE4D0 libkritaresources.dll!KisResourceLocator::addResource+0x3ab
00007FFE17FFE275 000001D350880000 000001D300000000 000000422EEFE6D0 libkritaresources.dll!KisAllResourcesModel::addResource+0xd5
00007FFE18001C28 0000000000000100 0000000000000000 000001D350900000 libkritaresources.dll!KisResourceModel::addResource+0xb68
00007FFE02CC8D35 00007FFE0DD2A3C0 00007FFE0D91068D 0000000000000001 kritapsdimport.dll!PSDLoader::decode+0x4da5
00007FFE02CCA48D 000001D36B13ADD0 00007FFE0D941FCE 000001D36F0A6970 kritapsdimport.dll!PSDLoader::buildImage+0xd
00007FFE02CC1800 000000422EEFF4B0 000001D36B13AD00 000001D36B13ADD0 kritapsdimport.dll!psdImport::convert+0x30
00007FFE0F4DC479 000001D3701D2250 000001D300000000 000001D350880000 libkritaui.dll!KisImportExportManager::doImport+0x89
00007FFE0F4D8161 000001D3701F1530 00007FFE59D147B1 00007FFE10BBA85B libkritaui.dll!KisImportExportManager::convert+0xcf1
00007FFE0F4D735E 000001D360CF4978 00007FFE00000000 00007FFE0D8762F0 libkritaui.dll!KisImportExportManager::importDocument+0x4e
00007FFE0F4C5746 0000000000000001 00007FFE0D869505 000001D36287AB20 libkritaui.dll!KisDocument::openFile+0x706
00007FFE0F4C4F82 000000007FFFFFFF 000000422EEFF900 000001D3632CCFE0 libkritaui.dll!KisDocument::openPathInternal+0x1f2
00007FFE0F4C49F4 0000000000000000 00007FFE00000000 000001D36341EE80 libkritaui.dll!KisDocument::openPath+0x494
00007FFE0F3F6C26 0000000000000000 00007FFE0D7DB1FC 0000000200000000 libkritaui.dll!KisFileIconCreator::createFileIcon+0x406
00007FFE0F3F8D41 000001D36F0A6FD0 000001D36CE1D740 000001D36CE1D740 libkritaui.dll!(anonymous namespace)::getFileIcon+0x81
00007FFE0F3F9C43 000001D3632D1D20 0000000000000010 0000000000000000 libkritaui.dll!QtConcurrent::StoredFunctorCall1<(anonymous namespace)::IconFetchResult, (anonymous namespace)::IconFetchResult (*)((anonymous namespace)::GetFileIconParameters), (anonymous namespace)::GetFileIconParameters>::runFunctor+0x33
00007FFE0F3F99E8 000001D36CE1D740 000001D3632D1D20 0000000000000000 libkritaui.dll!QtConcurrent::RunFunctionTask<(anonymous namespace)::IconFetchResult>::run+0x38
00007FFE0D7DFFAD 0000000000000000 0000000000000000 0000000000000000 Qt5Core.dll!QThreadPoolThread::run+0xad
00007FFE0D7DBE6C 0000000000000000 0000000000000000 0000000000000000 Qt5Core.dll!QThreadPrivate::start+0x10c
00007FFE58387034 0000000000000000 0000000000000000 0000000000000000 KERNEL32.DLL!BaseThreadInitThunk+0x14
00007FFE59D42651 0000000000000000 0000000000000000 0000000000000000 ntdll.dll!RtlUserThreadStart+0x21

```

… I believe the access violation is the cause.

---

<div class="post-metadata">

**Author:** ![Ralek](https://krita-artists.org/user_avatar/krita-artists.org/ralek/32/107058_2.png) [@Ralek](https://krita-artists.org/u/Ralek)\
**Post date:** [July 22, 2022, 11:06pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/2 "2022-07-22T23:06:29Z")

</div>

5, 5.1 and 5.2 are going through some major resource management overhauls, this is likely related to that. Do you see the main window or does it crash before that? If you see the main window, does it stay open as long as you don’t touch anything, or does it crash once you open a document?

Try opening kritarc in a text editor and changing LastPreset equal to nothing?

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 22, 2022, 11:56pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/3 "2022-07-22T23:56:36Z")

</div>

I see the main window for a few seconds, then it crashes.  
I don’t touch anything before it does.

---

<div class="post-metadata">

**Author:** ![Ralek](https://krita-artists.org/user_avatar/krita-artists.org/ralek/32/107058_2.png) [@Ralek](https://krita-artists.org/u/Ralek)\
**Post date:** [July 23, 2022, 12:00am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/4 "2022-07-23T00:00:02Z")

</div>

I know 5.1 is a bit different with its resources than previous and the most recent prealpha, does this also happen on the nightly build of 5.2? It may be an automated schema update for the resource database which runs on startup. Unfortunately I’m less familiar with that.

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 23, 2022, 12:00am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/5 "2022-07-23T00:00:56Z")

</div>

Not sure. I didn’t install or use Krita 5.2’s nightly build.

---

<div class="post-metadata">

**Author:** ![Ralek](https://krita-artists.org/user_avatar/krita-artists.org/ralek/32/107058_2.png) [@Ralek](https://krita-artists.org/u/Ralek)\
**Post date:** [July 23, 2022, 12:05am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/6 "2022-07-23T00:05:19Z")

</div>

You can find builds for it over on the [Jenkins nightly builds page](https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/). Keep in mind these are prerelease builds likely with a lot of various bugs and loose ends. I’d highly recommend backing up your resources and preferences/shortcuts before updating just in case, but it’s good to know if the problem still persists there.

---

<div class="post-metadata">

**Author:** ![Lesqwe56](https://krita-artists.org/user_avatar/krita-artists.org/lesqwe56/32/151447_2.png) [@Lesqwe56](https://krita-artists.org/u/Lesqwe56)\
**Post date:** [July 23, 2022, 1:12am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/7 "2022-07-23T01:12:56Z")

</div>

If you move away Krita resource folder and start beta2, will it crash?

The first thing come out of my head is this:

> [@Krita 5.1 beta 2 doesn't open](https://krita-artists.org/t/krita-5-1-beta-2-doesnt-open/44277/2):
>
> If you have create some brushes in 5.1-beta1 (or brushes created in beta1 from others) and was using the brush before going to beta2, beta2 will pick that brush on startup and crash. You can launch beta1 and select a default brush, close it, then launch beta2 and see if it crash. If that’s the case, use [Brush Fixer for brushes created in Krita 5.1 beta 1](https://krita-artists.org/t/brush-fixer-for-brushes-created-in-krita-5-1-beta-1/44075) in beta1, then launch beta2 (as long as krita not crash on startup, no need to “convert in beta1, then launch beta2”, just convert it in any …

But since I can’t understand the crash backtrace, it is just my blind guess.

PS:

> [@novames00](#):
>
> I downgraded Krita to read the log file

If you can’t start krita to read the crash log, it can be find in %localappdata% (put this in file explorer route), a file called `kritacrash.log`

---

<div class="post-metadata">

**Author:** ![freyalupen](https://krita-artists.org/user_avatar/krita-artists.org/freyalupen/32/47913_2.png) [@freyalupen](https://krita-artists.org/u/freyalupen)\
**Post date:** [July 23, 2022, 3:30am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/8 "2022-07-23T03:30:36Z")

</div>

It seems to me that Krita is trying and failing to load a Photoshop file called “adfasdf2-1.psd”.  
There’s been a recent fix for trying to load invalid .PSD files, so it might be worth trying out the Nightly build to see if it works there.  
Otherwise, I’m not sure why Krita’s trying to load this file (did you open it in a previous version?), but maybe you can prevent it from doing so.

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 23, 2022, 1:05pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/9 "2022-07-23T13:05:22Z")

</div>

I opened it in the latest 5.1.0 beta 2, only for it to fail the next time.  
Right now, I downgraded the version to at least two previous builds before Krita remains stable again.  
I fear that using the new version once again would cause a crash.

---

<div class="post-metadata">

**Author:** ![freyalupen](https://krita-artists.org/user_avatar/krita-artists.org/freyalupen/32/47913_2.png) [@freyalupen](https://krita-artists.org/u/freyalupen)\
**Post date:** [July 23, 2022, 2:39pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/10 "2022-07-23T14:39:45Z")

</div>

> [@novames00](#):
>
> I downgraded the version to at least two previous builds before Krita remains stable again.

Specifically which version is this?

I think the file’s loading at startup because it’s in the list of Recent Documents.  
You can try opening the textfile located at “%localappdata%\kritarc” and removing the file from the list under “[RecentFiles]”, and see if Krita doesn’t crash.

Of course that doesn’t solve the problem of opening the file.  
If it opened once and not afterward, then it I assume it was modified at some point, either by Krita or a different application.

Judging from the backtrace, Krita’s trying to load an embedded resource (layer style, pattern, or gradient) in the file and crashing at this line of code:  
KisResourceStorage.cpp @ 224: `return d->storagePlugin->addResource(resource->resourceType().first, resource);`  
Meaning there’s probably a problem with either `storagePlugin` or `resource`. (That is, the code isn’t loading something somewhere.)  
It’s hard to tell exactly what’s happening without the file, though.

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 23, 2022, 3:08pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/11 "2022-07-23T15:08:41Z")

</div>

The version which caused the crash is krita 5.1.0 beta 2 (git 9d468b5).  
Now, the “adfasdf2-1.psd” file, has been opened but not modified at all by Krita or any other program. Though, it contains indeed some adjustment layers including gradient maps.  
Krita’s compatibility with Photoshop file and way of stacking layers, is in the works to be improved apparently… Should I file a bug on kde and give information about it for investigation ?

---

<div class="post-metadata">

**Author:** ![Hologram](https://krita-artists.org/letter_avatar_proxy/v4/letter/h/41988e/32.png) [@Hologram](https://krita-artists.org/u/Hologram)\
**Post date:** [July 23, 2022, 3:31pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/12 "2022-07-23T15:31:24Z")

</div>

I think you should first try to narrow down the problem and discuss it on the forum.

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 24, 2022, 3:52am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/13 "2022-07-24T03:52:39Z")

</div>

But what should I do now ?  
It’s not like I have a working workaround…  
Is there anything I could before before resorting to deletion of some file ?  
For now, I’ll try to modify the kritarc file and see what happens.

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 24, 2022, 5:23am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/14 "2022-07-24T05:23:49Z")

</div>

@Hologram @freyalupen  
Update.  
After erasing the adfasdf file in kritarc, the app doesn’t crash anymore…  
I guess the culprit was the psd file then.  
That means some recent changes are underway with how Krita read psd files.

---

<div class="post-metadata">

**Author:** ![raghukamath](https://krita-artists.org/user_avatar/krita-artists.org/raghukamath/32/59144_2.png) [@raghukamath](https://krita-artists.org/u/raghukamath)\
**Post date:** [July 24, 2022, 5:58am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/15 "2022-07-24T05:58:19Z")

</div>

Does the psd file open in krita? Is it too big?

---

<div class="post-metadata">

**Author:** ![Hologram](https://krita-artists.org/letter_avatar_proxy/v4/letter/h/41988e/32.png) [@Hologram](https://krita-artists.org/u/Hologram)\
**Post date:** [July 24, 2022, 6:31am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/16 "2022-07-24T06:31:54Z")

</div>

Is there a more complete list on PSD support than this?

> **[\*.psd](https://docs.krita.org/en/general_concepts/file_formats/file_psd.html)**
>
> The Photoshop file format as exported by Krita.

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 24, 2022, 7:52am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/17 "2022-07-24T07:52:34Z")

</div>

If Krita opens it for the 1st time,it works. And the psd file isn’t too big, about 10MB of size.  
However after you close Krita completely, if the file is among recently opened files, Krita crashes after reading the file to show its thumbnail.

---

<div class="post-metadata">

**Author:** ![tiar](https://krita-artists.org/user_avatar/krita-artists.org/tiar/32/22_2.png) [@tiar](https://krita-artists.org/u/tiar)\
**Post date:** [July 24, 2022, 10:28am UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/18 "2022-07-24T10:28:47Z")

</div>

Can you please report it on [bugs.kde.org](http://bugs.kde.org) with the log file qnd the psd file?

If you can’t share the psd file, it would he really useful if you could create a similar psd testing file from scratch, see if it crashes the same way, and then add it to the bug report. Alternatively you could say how the file looked like (in structure), but with a test file ready it would be much easier for the devs (and sometimes it’s hard to recreate the test file).

---

<div class="post-metadata">

**Author:** ![halla](https://krita-artists.org/user_avatar/krita-artists.org/halla/32/18581_2.png) [@halla](https://krita-artists.org/u/halla)\
**Post date:** [July 24, 2022, 1:40pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/19 "2022-07-24T13:40:21Z")

</div>

Krita actually used to use a different library to get the thumbnail of a psd for the recent files list. But @dkazakov has changed that recently.

---

<div class="post-metadata">

**Author:** ![novames00](https://krita-artists.org/user_avatar/krita-artists.org/novames00/32/577_2.png) [@novames00](https://krita-artists.org/u/novames00)\
**Post date:** [July 24, 2022, 5:12pm UTC](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533/20 "2022-07-24T17:12:29Z")

</div>

Sure.  
I also discovered another bug.  
This same build always crashes when you undo a newly inserted text.  
That makes two bug reports to file.

[Next page](https://krita-artists.org/t/krita-5-1-0-beta-2-always-crashes-a-few-seconds-after-start/44533.md?page=2)
