Bug 420322

Summary: Krita crashing instantly on certain files
Product: [Applications] krita Reporter: Chris Ogilvie <triggerpigking>
Component: File formatsAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: crash CC: halla
Priority: NOR    
Version First Reported In: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: One of the files crashing Krita

Description Chris Ogilvie 2020-04-20 01:02:44 UTC
Created attachment 127699 [details]
One of the files crashing Krita

SUMMARY

I upgraded to the Krita nightly build "krita-nightly-x64-v4.3.0-prealpha-1511-gb8bc4d6cf2" from a much older version, it worked smoothly at first however since a few hours ago it is crashing to desktop instantaneously on certain files.
It is leaving no crash-log but is mentioned in the logfile so i'll paste the last few instances here.  This happens whether I open it from inside the program via open file, or via desktop. I have also attached a copy of one of the files crashing.
Other Krita files seem to be working fine so it does'nt appear to be a file type issue, i've not seen crashes on anything but Krita files either but I can't confirm if that's the case for certain.

This is my first bug report, sorry if it's missing some information or if I've placed it wrong, tried to put as much in as I could think of.


================================================================================
SESSION: 20 Apr 2020 01:26:33 +0100. Executing C:\Users\trigg\Downloads\New folder\krita-nightly-x64-v4.3.0-prealpha-1511-gb8bc4d6cf2\krita-nightly-x64-v4.3.0-prealpha-1511-gb8bc4d6cf2\bin\krita.exe

Krita Version: 4.3.0-prealpha (git b8bc4d6), Qt version compiled: 5.12.7, loaded: 5.12.7. Process ID: 11652
-- -- -- -- -- -- -- --
20 Apr 2020 01:32:14 +0100: Importing application/x-krita to application/x-krita. Location: C:/Users/trigg/OneDrive/Desktop/Eve The Elf/Page1-.kra. Real location: C:/Users/trigg/OneDrive/Desktop/Eve The Elf/Page1-.kra. Batchmode: 0
20 Apr 2020 01:32:14 +0100: ASSERT (krita): "m_buffer[currentIndex].loadAcquire() > 0" in file C:\Packaging\workspace\Krita_Stable_Windows_Build\krita\libs\image\tiles3\KisTiledExtentManager.cpp, line 87
================================================================================
SESSION: 20 Apr 2020 01:36:28 +0100. Executing C:\Users\trigg\Downloads\New folder\krita-nightly-x64-v4.3.0-prealpha-1511-gb8bc4d6cf2\krita-nightly-x64-v4.3.0-prealpha-1511-gb8bc4d6cf2\bin\krita.exe

Krita Version: 4.3.0-prealpha (git b8bc4d6), Qt version compiled: 5.12.7, loaded: 5.12.7. Process ID: 17844
-- -- -- -- -- -- -- --
20 Apr 2020 01:37:39 +0100: Importing application/x-krita to application/x-krita. Location: C:/Users/trigg/OneDrive/Desktop/dailysketch.kra. Real location: C:/Users/trigg/OneDrive/Desktop/dailysketch.kra. Batchmode: 0
20 Apr 2020 01:37:40 +0100: ASSERT (krita): "m_buffer[currentIndex].loadAcquire() > 0" in file C:\Packaging\workspace\Krita_Stable_Windows_Build\krita\libs\image\tiles3\KisTiledExtentManager.cpp, line 87

SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Dmitry Kazakov 2020-04-23 22:39:04 UTC

*** This bug has been marked as a duplicate of bug 419301 ***
Comment 2 Dmitry Kazakov 2020-04-24 17:41:33 UTC
Hi, Chris!

Could you please test this package? Does it fix the crash for you?

https://yadi.sk/d/K0CN26KoDcGa4g

It fixes one transformation masks threading issue, which might be the reason for your bug.
Comment 3 Dmitry Kazakov 2020-04-27 21:42:17 UTC
Git commit 7b147c93b51bb4c7e2d0ed2148fd828c54226022 by Dmitry Kazakov.
Committed on 27/04/2020 at 21:40.
Pushed by dkazakov into branch 'master'.

Fix threading issue when loading KisGeneratorLayer

We shouldn't call the same function from both, GUI thread and a worker
thread. It may lead to concurrent writes to the same image area, which
is not something we are allowed to do
Related: bug 419301

M  +1    -1    libs/image/generator/kis_generator_layer.cpp

https://invent.kde.org/kde/krita/commit/7b147c93b51bb4c7e2d0ed2148fd828c54226022
Comment 4 Dmitry Kazakov 2020-04-27 21:44:56 UTC
Git commit 6ba81a096f29cb1eaf5a100615e15f671a4326d8 by Dmitry Kazakov.
Committed on 27/04/2020 at 21:44.
Pushed by dkazakov into branch 'krita/4.3'.

Fix threading issue when loading KisGeneratorLayer

We shouldn't call the same function from both, GUI thread and a worker
thread. It may lead to concurrent writes to the same image area, which
is not something we are allowed to do
Related: bug 419301

M  +1    -1    libs/image/generator/kis_generator_layer.cpp

https://invent.kde.org/kde/krita/commit/6ba81a096f29cb1eaf5a100615e15f671a4326d8