Created attachment 138753 [details] the file that crashes on autosave SUMMARY When creating 4k or 8k documents with multiple layers, Krita will often crash on save, the crash can be triggered by an autosave or a manual save. This seems to be caused by using procedural fill / filter layers -- deleting all fill layers and replacing them with paint layers filled with a solid color seems to prevent the crash. I have tried turning most of the autosave / file handling settings on and off, as well as switching the autosave drive from "same as file" to user, an HDD and SSD, respectively, crash still happens. I am using the Steam version on a win10 machine, crashing file attached. I would submit a dxdiag but I can only add one attachment, so I've pasted it below STEPS TO REPRODUCE 1. open the crashing .kra 2. paint around a bit 3. save or wait for autosave OBSERVED RESULT crash! EXPECTED RESULT no crash! SOFTWARE/OS VERSIONS Windows: Win10 macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION ------------------ System Information ------------------ Time of this report: 5/24/2021, 12:10:26 Machine name: DESKTOP-DR1O1RV Machine Id: {EE9A827C-2933-48B4-A69F-C13DD05CBAA7} Operating System: Windows 10 Pro 64-bit (10.0, Build 19041) (19041.vb_release.191206-1406) Language: English (Regional Setting: English) System Manufacturer: System manufacturer System Model: System Product Name BIOS: 1704 (type: UEFI) Processor: Intel(R) Core(TM) i7-9800X CPU @ 3.80GHz (16 CPUs), ~3.8GHz Memory: 65536MB RAM Available OS Memory: 65206MB RAM Page File: 56714MB used, 27504MB available Windows Dir: C:\WINDOWS DirectX Version: DirectX 12 DX Setup Parameters: Not found User DPI Setting: 96 DPI (100 percent) System DPI Setting: 192 DPI (200 percent) DWM DPI Scaling: UnKnown Miracast: Available, with HDCP Microsoft Graphics Hybrid: Not Supported DirectX Database Version: 1.0.8 DxDiag Version: 10.00.19041.0928 64bit Unicode
This file isn't big or complicated. I don't get a crash when trying to save it. Could you open help->show information for bug reports and add the contents here? It would also be useful if you could find the kritacrash.log file and add it.
Created attachment 138811 [details] krita info for debug
Created attachment 138812 [details] krita crash log
(In reply to Halla Rempt from comment #1) > This file isn't big or complicated. I don't get a crash when trying to save > it. Could you open help->show information for bug reports and add the > contents here? It would also be useful if you could find the kritacrash.log > file and add it. Thanks for the quick reply! I've uploaded the additional files, also, it looks like there is a WER report for krita every time the crash happens, is this useful to have?
Yes, that probably would be useful as well. The crash log seems to be outdated, the latest crash is from February 28, 2021. Not sure what's up there...
Created attachment 138813 [details] one of the the wer crash reports that I believe was produced from this bug
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.
Hm, that doesn't say much either. Could you * make sure there are no krita related files in %LOCALAPPDATA% -- make a backup of those, then remove them * try to reproduce the issue with the portable nightly stable build: https://binary-factory.kde.org/job/Krita_Stable_Windows_Build/ with debug symbols Just unzip the krita zip file, then copy the contents of the dbg.zip file into the unzipped krita folder and try to reproduce.
(In reply to Halla Rempt from comment #8) > Hm, that doesn't say much either. Could you > > > * make sure there are no krita related files in %LOCALAPPDATA% -- make a > backup of those, then remove them > * try to reproduce the issue with the portable nightly stable build: > https://binary-factory.kde.org/job/Krita_Stable_Windows_Build/ with debug > symbols > > Just unzip the krita zip file, then copy the contents of the dbg.zip file > into the unzipped krita folder and try to reproduce. Sure sure, sorry about the delay, I'll do that right now :)
quite irritatingly, I'm having trouble reproing the issue myself after a restart and a windows update :| which is weird because previously I could open this doc, wait a few minutes for an autosave, and it would crash every time. Also this has happened in the past with other documents, it crops up once every couple weeks or so, only when I'm making large documents with procedural layers. Is it ok if I keep trying to repro this over the next few days or should the bug be closed down until I can make it happen and get the debug data?
I'm closing it as "worksforme" but you can reopen it when it happens again.
ah ha! I finally caught this sucker on video! https://youtu.be/iLNDUwyANtk
(In reply to LKS from comment #13) > ah ha! I finally caught this sucker on video! > > https://youtu.be/iLNDUwyANtk Also I'm on entirely new hardware this time, a pretty beefy machine. Same issue, largeish doc (2k) fill layers + filter layers
Created attachment 140040 [details] crashing .kra file And the file. I can crash my krita by opening the file, making a few brush strokes, and attempting to save it
Ah, well... I still cannot reproduce this -- and it's still not a big document, it only takes ~170mb of memory. In the meantime, the video is private, so I cannot watch it. If this is different hardware could you again attach the crash log, system info and krita log files?
Oh, and _where_ are you saving? Local disk, google drive, onedrive, dropbox or shared network drive?
Thanks a bunch for the reply! I've set the previous to unlisted instead of private, Here's another vid demonstrating the same thing that includes opening the file: https://youtu.be/YRvcMOZxSyw system specs etc incoming shortly
Created attachment 140057 [details] krita system information
Created attachment 140058 [details] dxdiag info
Created attachment 140059 [details] krita usage log
more info for context: - kritacrash file doesn't exist or get updated after this kind of crash, on this machine there is no kritacrash log because it has never crashed another way so far - saving the file to a local SSD resilio sync folder C:/BTS/Work date/ which doesn't lock files or anything but I can save it to a different folder to eliminate that variable if we want
Could you please update to 4.4.5 and check whether that still happens? I see a lot of asserts in the log, and that's rather scary.
New hardware, bigger doc (8k x 4k) same crash, will post all the info again
Created attachment 140291 [details] dxdiag info (PC 3)
Created attachment 140292 [details] Krita System Info PC 3
Created attachment 140293 [details] Krita Usage Log
I'm currently on 4.4.5 as well, I'll try it out with a fresh portable install
I was able to repro the crash repeatedly until I nuked my prefs, now the saving seems quite stable. Will keep trying
Did a bunch of testing. Using all my regular kritarc prefs but disabling "compress krita files", "zip64", and "trim files" prevented crash. will try messing around with each setting on its own
Hi, LKS! Thank you for all your info! I think I can reproduce the problem now. It happens because getLodCapableDevices() sometimes returns non-unique items, so race conditions happen.
Git commit d148fafb3c4b68ef9347b59ec624a1b8e0797b7e by Dmitry Kazakov. Committed on 30/07/2021 at 05:47. Pushed by dkazakov into branch 'master'. Fix crash when saving the image with trimming We should avoid concurrent write access to paint devices... M +4 -0 libs/image/kis_image.cc https://invent.kde.org/graphics/krita/commit/d148fafb3c4b68ef9347b59ec624a1b8e0797b7e
Git commit a9da310311c98974b78e0cf26b95f342d48c53e1 by Dmitry Kazakov. Committed on 30/07/2021 at 05:48. Pushed by dkazakov into branch 'krita/4.3'. Fix crash when saving the image with trimming We should avoid concurrent write access to paint devices... M +4 -0 libs/image/kis_image.cc https://invent.kde.org/graphics/krita/commit/a9da310311c98974b78e0cf26b95f342d48c53e1
I'm not sure we are able to release Krita 4.x update with this fix. If you are using Krita 4.x and face this bug, please disable "Trim files before saving" option in Krita preferences.
Yey! Thanks for the fix, I have disabled trimming for now. Super happy to have found out what it was!