[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] Fix Xlib accessor race condition with gtk >= 2.18

From: Reginald Kennedy
Subject: [Linphone-developers] Fix Xlib accessor race condition with gtk >= 2.18
Date: Fri, 11 Aug 2017 14:58:53 +0800
User-agent: Mutt/1.8.3 (2017-05-23)

When the video window is created in a video call, sometimes the window
is completely black and the following X11 error appears in the debug

[error  ] 2017-08-10 13:59:28:998 X11 error reported.

I have experienced this issue for years and thought it was some bug in
the Intel video drivers (seemed to work fine on systems with other
drivers). It usually works after reconnecting the call a few times.

When debugging the X11 error, I found a race condition.

In gtk/videowindow.c, get_native_handle() sometimes returns a window id
of 0 causing linphone_core_set_native_video_window_id() to bail.  This is
because the underlying Xlib calls are made in a separate thread and
the window id may not yet exist when GDK_WINDOW_XID() is called.
( See )

To resolve this race condition, gdk_display_sync() can be called to
ensure any pending Xlib calls are made prior to calling GDK_WINDOW_XID().

Bugfix attached.

Attachment: gtkracefix.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]