Skip to content

Fix a crash when opening GMic filter while the image is busy

QMic has a tendency to request the image for preview right from the paint event. When Krita prepares a reply for it, not only it should block the image, it can also enter a busy-wait indication mode, which reenters the event loop and therefore and enter the paint event handler again, which is a crashy condition.

The patch solves the problem in three ways:

  1. Krita will now wait for the image to complete its tasks before launching QMic. It will not guarentee safety, because the image may become busy with autosaving while GMic is already open, hence the next points...

  2. KisImageInterface will refuse to enter busy-wait loop if the image in busy. It will just return an empty image set.

  3. The patch for QMic makes QMic to re-request the update if an empty set of images is returned.

Merge request reports