Skip to content

Fix dumb scanout buffer reference count

onscreen/native: Add ref to dumb buffer when using as scanout buffer

Each next and current scanout buffer has a reference on them making sure they stay alive. When dumb buffers were used on the secondary GPU state, this didn't happen, leading to crashes due to unref:ing one time too many, with backtraces such as

  0) g_type_check_instance_is_fundamentally_a ()
  1) g_object_unref ()
  2) secondary_gpu_release_dumb ()
  3) import_shared_framebuffer ()
  4) update_secondary_gpu_state_post_swap_buffers ()
  5) meta_onscreen_native_swap_buffers_with_damage ()
  6) cogl_onscreen_swap_buffers_with_damage ()
  7) swap_framebuffer ()
  8) clutter_stage_cogl_redraw_view_primary ()
  9) clutter_stage_cogl_redraw_view ()
 10) _clutter_stage_window_redraw_view ()
 11) handle_frame_clock_frame ()

Merge request reports

Loading