screen-cast-virtual-stream: Crash due to null pointer dereference
(gdb) bt
#0 clutter_paint_context_get_redraw_clip (paint_context=0x0) at ../clutter/clutter/clutter-paint-context.c:140
#1 0x00007f59dc72ab26 in actors_painted (stage=<optimized out>, view=<optimized out>, paint_context=<optimized out>, frame=<optimized out>, user_data=0x5573ae4a1840)
at ../src/backends/meta-screen-cast-virtual-stream-src.c:197
#2 0x00007f59dc69c3be in notify_watchers_for_mode (stage=0x5573a95f1fe0, view=0x5573adfd3000, paint_context=0x0, frame=0x5573ade540f0, watch_phase=<optimized out>) at ../src/backends/meta-stage.c:207
#3 0x00007f59dcaa560d in clutter_stage_paint_view (stage=stage@entry=0x5573a95f1fe0, view=view@entry=0x5573adfd3000, redraw_clip=redraw_clip@entry=0x5573a95d73f0, frame=frame@entry=0x5573ade540f0)
at ../clutter/clutter/clutter-stage.c:482
#4 0x00007f59dc6a6cd4 in paint_stage (stage_impl=0x5573a9836280, frame=0x5573ade540f0, redraw_clip=0x5573a95d73f0, stage_view=0x5573adfd3000) at ../src/backends/meta-stage-impl.c:423
#5 meta_stage_impl_redraw_view_primary (frame=0x5573ade540f0, stage_view=0x5573adfd3000, stage_impl=0x5573a9836280) at ../src/backends/meta-stage-impl.c:676
#6 meta_stage_impl_redraw_view (stage_window=0x5573a9836280, stage_view=0x5573adfd3000, frame=0x5573ade540f0) at ../src/backends/meta-stage-impl.c:789
#7 0x00007f59dc79735b in meta_stage_native_redraw_view (stage_window=<optimized out>, view=0x5573adfd3000, frame=0x5573ade540f0) at ../src/backends/native/meta-stage-native.c:144
#8 0x00007f59dcaaea3d in _clutter_stage_window_redraw_view (frame=0x5573ade540f0, view=0x5573adfd3000, window=0x5573a9836280) at ../clutter/clutter/clutter-stage-window.c:95
#9 handle_frame_clock_frame (frame_clock=0x5573ad02f7d0, frame=0x5573ade540f0, user_data=0x5573adfd3000) at ../clutter/clutter/clutter-stage-view.c:1267
#10 0x00007f59dca7b786 in clutter_frame_clock_dispatch (time_us=<optimized out>, frame_clock=0x5573ad02f7d0) at ../clutter/clutter/clutter-frame-clock.c:797
#11 frame_clock_source_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at ../clutter/clutter/clutter-frame-clock.c:845
#12 0x00007f59dcce139c in g_main_dispatch (context=0x5573a93de920) at ../glib/gmain.c:3460
#13 g_main_context_dispatch (context=0x5573a93de920) at ../glib/gmain.c:4200
#14 0x00007f59dcd3f438 in g_main_context_iterate.isra.0 (context=0x5573a93de920, block=1, dispatch=1, self=<optimized out>) at ../glib/gmain.c:4276
#15 0x00007f59dcce099f in g_main_loop_run (loop=0x5573ab06e000) at ../glib/gmain.c:4479
#16 0x00007f59dc6d52aa in meta_context_run_main_loop (context=context@entry=0x5573a93dccf0, error=error@entry=0x7ffd5c1bf630) at ../src/core/meta-context.c:482
#17 0x00005573a7536f87 in main (argc=<optimized out>, argv=<optimized out>) at ../src/main.c:663
I got this crash when trying to capture virtual monitors using getDisplayMedia() API in my WebKit dev environment.
You can see frame 2 passes a null paint_context
. I suppose this should be checked in actors_painted()
:)