Skip to content
  • Matthew Waters's avatar
    glwindow: don't use g_thread_join() to join the navigation thread · 126ee924
    Matthew Waters authored and Tim-Philipp Müller's avatar Tim-Philipp Müller committed
    Using g_thread_join() in _finalize() handlers may result in a deadlock
    joining the current thread when the last reference is held by a signal
    handler.
    
    e.g.:
    
    error 'Resource deadlock avoided' during 'pthread_join (pt->system_thread, NULL)'
    
    The backtrace looks like this:
    [...]
    g_thread_join ()
    gst_gl_window_finalize ()
    gst_gl_window_x11_finalize ()
    g_object_unref ()
    g_value_unset ()
    g_signal_emit_valist ()
    g_signal_emit ()
    gst_gl_window_send_mouse_event ()
    gst_gl_window_mouse_event_cb ()
    g_main_dispatch ()
    [..]
    g_main_loop_run ()
    gst_gl_window_navigation_thread ()
    g_thread_proxy ()
    start_thread ()
    clone ()
    126ee924