Hi,<br><br>&gt; When running my test program I get the following situations with the associated errors:<br>
&gt;<br>&gt; 1. Window and video appears fine.<br>&gt; ##############################<div id=":6v" class="ii gt">&gt; ###<br>&gt; Now playing</div><br>I have managed to solve the problem of the random crashes and X errors preventing the program from working stably by using the &quot;expose&quot; method used by Tristan in his blog and test program (<a href="http://tristanswork.blogspot.com/2008/09/fullscreen-video-in-gstreamer-with-gtk.html">http://tristanswork.blogspot.com/2008/09/fullscreen-video-in-gstreamer-with-gtk.html</a>). I added the following line to my .ui file (attached in my original message) in the GtkDrawingArea widget &quot;object&quot;.<br>
<br><div style="margin-left: 40px;">&lt;signal name=&quot;expose-event&quot; handler=&quot;window_expose_cb&quot; /&gt;<br></div><br>And the following handler function to my &quot;test.c&quot; file, also attached in the original message:<br>
<br><div style="margin-left: 40px;">void window_expose_cb(GtkWidget * widget, GdkEventExpose * event, gpointer data)<br>{<br>    gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(vidsink), GDK_WINDOW_XWINDOW(widget-&gt;window));<br>
}<br></div><br>Of course I then deleted the &quot;setup_window&quot; bus sync handler I was using before.<br><br>&gt; The &quot;tristan-test&quot; only overlays to the Gtk Window widget and works
<br>&gt; fine except it throws an X error on exit with the messages in the
console as follows:...<br><br>This is the only problem I still have and is the error Tristan&#39;s test program has - when you close the window the following error appears:<br><br><div style="margin-left: 40px;">The program &#39;test&#39; received an X Window System error.<br>
This probably reflects a bug in the program.<br>The error was &#39;BadWindow (invalid Window parameter)&#39;.<br>  (Details: serial 205 error_code 3 request_code 3 minor_code 0)<br>  (Note to programmers: normally, X errors are reported asynchronously;<br>
   that is, you will receive the error a while after causing it.<br>   To debug your program, run it with the --sync command line<br>   option to change this behavior. You can then get a meaningful<br>   backtrace from your debugger if you break on the gdk_x_error() function.)<br>
</div><br>I assume this is because when the gst main loop is exited by closing the window the video overlay isn&#39;t being shutdown properly? My final question: is there a specific way you are meant to exit programs that are using X overlays? <br>
<br>Many thanks,<br>Nick<br>