GNOME Bugzilla – Bug 761899
wayland: window manager error: buffer control taken twice
Last modified: 2016-02-16 14:30:55 UTC
Description: xvidtune, the old Xaw based app to control XVidMode extension crashes mutter: Window manager error: buffer control taken twice How reproducible: 100% How to reproduce: This is where it gets a tad tricky, because Xwayland as it is does not yet support XVidMode. 1. Get xserver source code from git 2. Apply the series of patch to add XVidMode support to Xwayland: https://patchwork.freedesktop.org/series/3118/ 3. Rebuild Xwayland with XVidMode support, and install 4. Run gnome-shell 5. Open a terminal and run xvidtune Actual result: mutter crashes with: Window manager error: buffer control taken twice Expected result: No crash, xvidtune window appears just like it does in weston Additional data: This is not an XVidMode issue, we just need XVidMode support in Xwaylamd so that xvidtune can run and trigger the bug in mutter. Removing the call to meta_fatal() avoids the problem obviously and allows to run xvidtune flawlessly, but that that's not a solutions of course. mutter/src/wayland/meta-wayland-buffer.c :63 63 void 64 meta_wayland_buffer_take_control (MetaWaylandBuffer *buffer) 65 { 66 if (buffer->accessible) 67 meta_fatal ("buffer control taken twice"); 68 69 buffer->accessible = TRUE; 70 } 71
Does this work with other Xaw apps as well?
(In reply to Jasper St. Pierre from comment #1) > Does this work with other Xaw apps as well? Yes, there aren't so many, but at least it works with xedit and xterm. Pure speculation on my side, maybe it has to do with the fact that xvidtune initially maps 2 windows at startup simultaneously? The xvidtune main window and a dialog box warning the user about the potential ill effects of using the software on the hardware.
Created attachment 321005 [details] [review] Patch to apply on top of git xvidtune to reproduce with regulat Xwayland Right, attaching a patch to break^W make xvidtune runable even when XVidMode-extension is not available. 1. Get xvidtune from git here: git://anongit.freedesktop.org/xorg/app/xvidtune 2. Apply attached patch 3. Build 4. Run GNOME on Wayland from git 5. run xvidtune => Crash Interestingly, this seems to be a regression in mutter 3.19.x as 3.18.x had no such issue.
This seems somewhat related to bug 761613 which changes how buffers are tracked.
Note, vlc also causes the same crash in mutter (might be easier as a reproducer)
A quick manual "bissection" points toward commit 7adbb58 Reverting that commit doesn't trig the "buffer control taken twice" fatal error anymore.
*** This bug has been marked as a duplicate of bug 761613 ***