GNOME Bugzilla – Bug 570651
DISPLAY env var overrides --display argument, but the latter should take precedence
Last modified: 2012-04-20 10:54:22 UTC
Steps to repro: $ echo $DISPLAY :0.0 $ totem --display :2.0 Gdk-ERROR **: The program 'totem' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 28 error_code 3 request_code 3 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) Breakpoint 1, gdk_x_error (display=0x88e19c0, error=0xbfb15698) at gdkmain-x11.c:619 619 { (gdb) where
+ Trace 212252
I think it's trying to create the xv on :0.0, not :2.0. You can also observe this crash when unsetting the DISPLAY variable and just passing the display with --display :0.0. In gtk_init(), --display takes precedence over DISPLAY, so totem should pass that through to gstreamer backend.
Might be related to bug 369134.
Created attachment 147875 [details] [review] Set the display on the video sink When creating the video sink, make sure it gets assigned the same display as passed to --display on the command-line.
Comment on attachment 147875 [details] [review] Set the display on the video sink Attachment 147875 [details] pushed as e79427f - Set the display on the video sink
This patch should work. Can you test?
Still crashing with the same error: $ Xnest -ac :2 $ DISPLAY=:0.0 totem --display :2.0 testfile.ogv (gdb) where
+ Trace 219128
When running the other way, $ DISPLAY=:2.0 totem --display :0.0 testfile.ogv the crash is the same, except that it's using ximagesink instead of xvimagesink. Also it's not an Xnest bug; the same thing happens with Xephyr.
Fixed since the move to clutter for video output.