GNOME Bugzilla – Bug 791809
Recording the last frame in g-s crashes mutter if not happening during paint
Last modified: 2017-12-20 11:02:07 UTC
When using the EasyScreencast (this doesn't happen when calling the Stop method from d-feet for example) to record a screencast, once I hit "Stop" g-s crashes, here there are the JS and C traces: Dec 20 00:57:45 ubuntu org.gnome.Shell.desktop[121748]: == Stack trace for context 0x563fbe3de000 == Dec 20 00:57:45 ubuntu org.gnome.Shell.desktop[121748]: #0 0x563fbe520080 i resource:///org/gnome/shell/ui/screencast.js:87 (0x7f040453ac48 @ 91) Dec 20 00:57:45 ubuntu org.gnome.Shell.desktop[121748]: #1 0x7ffdabb501f0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f04240b4de0 @ 71) Dec 20 00:57:45 ubuntu org.gnome.Shell.desktop[121748]: #2 0x563fbe51ffd0 i resource:///org/gnome/shell/ui/screencast.js:167 (0x7f040453ae68 @ 36) Dec 20 00:57:45 ubuntu org.gnome.Shell.desktop[121748]: #3 0x7ffdabb50da0 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f04240b4de0 @ 71) Dec 20 00:57:45 ubuntu org.gnome.Shell.desktop[121748]: #4 0x563fbe51ff08 i resource:///org/gnome/gjs/modules/overrides/Gio.js:300 (0x7f04240dff78 @ 614) Dec 20 00:57:45 ubuntu org.gnome.Shell.desktop[121748]: #5 0x563fbe51fe60 i resource:///org/gnome/gjs/modules/overrides/Gio.js:331 (0x7f04240e3230 @ 34)
+ Trace 238276
This seems similar to this downstream bug https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=1504062
Created attachment 365776 [details] [review] stage: Push framebuffer before setting up viewport When capture_view* functions are called with the paint flag set to TRUE, we need to setup the framebuffer, however this was happening after setting up the viewport, while the viewport needs the framebuffer to be valid when calling cogl_set_viewport.
Review of attachment 365776 [details] [review]: Ugh, make sense. I'd really like for us to stop using all of the old deprecated cogl_* functions that rely on framebuffers pushed on a stack. An alternative is to have maybe_setup_viewport() to call cogl_framebuffer_set_viewport(), but that I guess will just be "for good measure" since the viewport actually used here and there by clutter is the one actually pushed.
The following fix has been pushed: commit 2b60fb0 stage: Push framebuffer before setting up viewport
Created attachment 365790 [details] [review] stage: Push framebuffer before setting up viewport When capture_view* functions are called with the paint flag set to TRUE, we need to setup the framebuffer, however this was happening after setting up the viewport, while the viewport needs the framebuffer to be valid when calling cogl_set_viewport.
(In reply to Jonas Ådahl from comment #2) > Review of attachment 365776 [details] [review] [review]: > > Ugh, make sense. I'd really like for us to stop using all of the old > deprecated cogl_* functions that rely on framebuffers pushed on a stack. > > An alternative is to have maybe_setup_viewport() to call > cogl_framebuffer_set_viewport(), but that I guess will just be "for good > measure" since the viewport actually used here and there by clutter is the > one actually pushed. Yeah, I was also thinking about using cogl_framebuffer_set_viewport instead as it will make things more clear, maybe passing the fb... Let me know if you've any other code cleanup ideas.