Diffusion Krita 3613f13c72bd

Fixes `libqtforandroid.so` crash

Authored by sh-zam on Jul 20 2019, 6:05 PM.

Description

Fixes libqtforandroid.so crash

This crash could be reproduced when canvas is rotated/zoomed in/out as
soon as KisFloatingMessage is about to disappear. This crash is probably
caused by a race between adding and removing windows to
QAndroidPlatformScreen::m_windowStack. What happens is, when user
zooms/rotates the canvas KisFloatingMessage is created add pushed onto
m_windowStack, when user stops for a bit, it is pushed off of stack
in QAndroidPlatformScreen::removeWindow and then queued for deletion
in KisFloatingMessage::removeMessage().

But if user almost immediately starts zooming/rotating again, the window
is pushed onto the stack again. But, because it was queued for deletion,
and it will be deleted (as there is nothing to stop it). The reference
in m_windowStack is dangling. Hence the crash.

Maniphest: T10784

Details

Committed
sh-zamApr 1 2020, 5:15 PM
Parents
R37:ce9d5a40eada: Fix crash during startup
Branches
Unknown
Tags
Unknown