After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758820 - glwindow: Fix memory leak of navigation thread
glwindow: Fix memory leak of navigation thread
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-11-30 03:02 UTC by Haihua Hu
Modified: 2015-12-21 10:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glwindow: Fix memory leak of navigation thread (987 bytes, patch)
2015-11-30 03:02 UTC, Haihua Hu
committed Details | Review

Description Haihua Hu 2015-11-30 03:02:00 UTC
Created attachment 316493 [details] [review]
glwindow: Fix memory leak of navigation thread

When application free glwindow object, glwindow will end the navigation thread in gst_gl_window_finalize(), but the thread resource hold by it hasn't been released yet.
Need call g_thread_join() to release the resource hold by navigation thread to avoid memory leak.

The patch add g_thread_join() after navigation thread exited.
Comment 1 Haihua Hu 2015-12-21 06:11:41 UTC
Any update for this issue?
Comment 2 Sebastian Dröge (slomo) 2015-12-21 10:30:17 UTC
commit d81eea5de12077345fed67a344dc8ce8b97c52eb
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Dec 21 11:27:09 2015 +0100

    glwindow: Hide navigation specific internal API and add API to asynchronously send navigation events
    
    Exposing the navigation thread's main context, GSourceFuncs and structs called
    key_event and mouse_event is exposing a bit too much of the internals. Let's
    just go with two functions to asynchronously send navigation events on the
    window with the same API as the synchronous ones.

commit 0952b3f986fc40d81390052292714176eb6650de
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Mon Dec 21 10:46:52 2015 +0100

    glwindow: Use g_thread_join() instead of a custom condition variable for waiting for the navigation thread to finish
    
    Also hide some internal functions and fields while we're at it and fix
    a race condition with the startup condition variable.

commit 62d79ae3266f6876a2c79ede52900e3c4d5dadcf
Author: Haihua Hu <b55597@freescale.com>
Date:   Mon Nov 30 09:36:09 2015 +0800

    glwindow: Fix memory leak of navigation thread
    
    When stopping the navigation thread, call g_thread_join() to release
    the resources hold by it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758820