Bug 437980

Summary: Assert and crash when change image color space with Color Space plugin
Product: [Applications] krita Reporter: Dmitry Kazakov <dimula73>
Component: ScriptingAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Other   
Latest Commit: Version Fixed In:
Attachments: Screenshot of the assert

Description Dmitry Kazakov 2021-06-02 04:42:06 UTC
Created attachment 138937 [details]
Screenshot of the assert

I checked Krita 4.4.3 and it worked fine, so that is a regression. I couldn't check krita/4.3 branch though.


STEPS TO REPRODUCE
1. Open any RGB8 image (my image had vector shapes)
2. Tools->Scripts->Color Space
3. Select LabA/U16
4. Press Ok

OBSERVED RESULT
See the assert screenshot in the attachment
Comment 1 Dmitry Kazakov 2021-07-30 12:32:49 UTC
Git commit 8ebe5e92507e7d519692b5d92785dda517c4be69 by Dmitry Kazakov.
Committed on 30/07/2021 at 12:31.
Pushed by dkazakov into branch 'master'.

Fix an assert when converting image colorspace with a pythin plugin

It turns our that we can enter image->barrierLock() twice. It happens
because the image may emit queued signals to the GUI in the meantime,
and the GUI may call barrierLock again. E.g. in
KisCanvas2::slotImageColorSpaceChanged()

M  +15   -6    libs/image/KisBusyWaitBroker.cpp

https://invent.kde.org/graphics/krita/commit/8ebe5e92507e7d519692b5d92785dda517c4be69
Comment 2 Dmitry Kazakov 2021-08-03 10:09:07 UTC
Git commit 11e17f6b20dde9634829bcbea363301cc8f2956b by Dmitry Kazakov.
Committed on 03/08/2021 at 08:36.
Pushed by dkazakov into branch 'krita/4.3'.

Fix an assert when converting image colorspace with a pythin plugin

It turns our that we can enter image->barrierLock() twice. It happens
because the image may emit queued signals to the GUI in the meantime,
and the GUI may call barrierLock again. E.g. in
KisCanvas2::slotImageColorSpaceChanged()

M  +15   -6    libs/image/KisBusyWaitBroker.cpp

https://invent.kde.org/graphics/krita/commit/11e17f6b20dde9634829bcbea363301cc8f2956b