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?
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.
You can find builds for it over on the Jenkins nightly builds page. 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.
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.
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.
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.
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 ?
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.
@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.
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.
Can you please report it on 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).