handle_dev_destroy_primary_surface: ASSERT !worker->surfaces[surface_id].context.canvas
@yhalperi
Submitted by Yonit Halperin Assigned to Spice Bug List
Description
It looks like the bug is in red_worker::destroy_surface_wait. destroy_surface_wait, doesn't really assure that all the references to the surface were destroyed. Specifically, if there are drawables that depends on this surface in the pipe, they stay in the pipe, and also all other drawables that belong to this surface and precede them; see red_worker::red_clear_surface_drawables_from_pipe. The same bug can also occur in handle_dev_destroy_surfaces
We need to wait till the last item in the pipe that depends on the surface is sent.