I have a video program that use gstreamer and wxwidgets. Before Ubuntu 9.10, the program works fine. But since I upgraded to 9.10 (or 10.04), it keeps getting crashes when trying to view video. The error is usually Fatal X11 IO error. I googled and found that GTK+ implementation is slightly changed in 9.10 and up and that caused the problem (from this thread https://bugzilla.gnome.org/show_bug.cgi?id=599885). It shows how to fixed the problem, but I don't see any GTK code in my code, so I'm not sure where I would put the gtk_window_ensure_native() method. My code essentially create a wxWindow and a wxPanel within it. Gstreamer is given the XID of the wxPanel to put the video in. I am a newbie when it comes to this stuff. Can someone help me fix this Fatal X11 error? Thanks.

No Code, No Help! (NCNH :D)
It's not a conceptual problem, it's from your code, and as long as you don't provide us the code, we can not help you.

Good luck!

Ah sorry, did not realize there's a NCNH policy :) Well the program is pretty long. I'll try and post the relevant parts.

class WxMain(wx.App):
  def OnInit(self):
    self.window = wx.Frame(None)
    self.movieWindow1 = wx.Panel(self.window)
    self.player1 = self.CreateVideoPlayer("souphttpsrc location= ! jpegdec ! ffmpegcolorspace ! ximagesink", self.OnSyncMessage1)
    except AttributeError:

  def CreateVideoPlayer(self, stream, syncFunc):
       player = gst.parse_launch(stream) 
       bus = player.get_bus() 
       bus.connect('message', self.OnMessage) 
       bus.connect('sync-message::element', syncFunc)
       return player
       return False

    def OnMessage(self, bus, message): 
        type = message.type
        if ((type == gst.MESSAGE_EOS) or (type == gst.MESSAGE_ERROR)):
          except AttributeError:

    def OnSyncMessage1(self, bus, message):
        if message.structure is None: 
        messageName = message.structure.get_name() 
        if messageName == 'prepare-xwindow-id': 
            imageSink = message.src 
            imageSink.set_property('force-aspect-ratio', True) 

if __name__ == '__main__':
    app = WxMain()

Thanks in advance.

i too had the same problem.this command helped me out ...
execute this command export DISPLAY=:0 and then run your program.

This article has been dead for over six months. Start a new discussion instead.