Skip to content

wayland: Fix transaction cleanup with destroyed surfaces

Vlad Zahorodnii requested to merge work/zzag/transaction-crash-fixes into master

When sorting surfaces in the ancestor order we need to ignore null surfaces.

In addition to that, we also need to properly handle the case where a transaction with dependencies is unlocked and it contains null surfaces.

For example, if there are three transactions A -> B -> C, and the B transaction is unlocked, we cannot apply it until transaction A is applied. The readiness check is based on checking the first pending transaction of the surface. But if the surface is null, the check will be skipped, which is not ideal as transaction B can be applied before transaction A now. To address that, lock dependant transactions. If the previous transaction is applied, unlock the next transaction. That way, B transaction will always be applied after A.

BUG: 475648

Edited by Vlad Zahorodnii

Merge request reports