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 758286 - qtitem: GstQSGTexture leaks in updatePaintNode
qtitem: GstQSGTexture leaks in updatePaintNode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.6.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 758700 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-11-18 14:41 UTC by Roman Nowicki
Modified: 2016-01-15 03:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
qtitem: use existing GstQSGTexture (1.14 KB, patch)
2015-11-18 14:41 UTC, Roman Nowicki
committed Details | Review
qtitem: Mark material dirty (805 bytes, patch)
2016-01-08 19:25 UTC, Sergey Borovkov
none Details | Review

Description Roman Nowicki 2015-11-18 14:41:07 UTC
Created attachment 315829 [details] [review]
qtitem: use existing GstQSGTexture

There is a massive leak caused by creating GstQSGTexture in every updatePaintNode call.

Example:
1. run qt/qml/play example included in gst-plugins-bad repository

I'm attaching basic patch where existing GstQSGTexture is reused.
Comment 1 Matthew Waters (ystreet00) 2015-11-20 00:30:03 UTC
Thanks!

commit 21348cf772e240956b5857ad4e69e9635683d372
Author: Roman Nowicki <rnowicki@sims.pl>
Date:   Fri Nov 20 11:18:43 2015 +1100

    qml: reuse existing GstQSGTexture
    
    Fixes a memory leak leaking the texture objects.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758286

and 1.6 c3762420f708399b41628bf65f6ffd0d1f2d8a3a
Comment 2 Mathias Hasselmann (IRC: tbf) 2015-11-27 07:21:03 UTC
*** Bug 758700 has been marked as a duplicate of this bug. ***
Comment 3 Sergey Borovkov 2016-01-08 19:25:26 UTC
Created attachment 318538 [details] [review]
qtitem: Mark material dirty

After this fix Qt might not redraw the scene graph at least on some systems. Material needs to be marked as dirty so that Qt know that texture has changed.
Comment 4 Matthew Waters (ystreet00) 2016-01-15 03:18:34 UTC
Thanks!

commit 155f0acfab8bbe0e30258e4a8726ea2adb2b073c
Author: Sergey Borovkov <serge.borovkov@gmail.com>
Date:   Fri Jan 8 22:19:06 2016 +0300

    qml: Mark material dirty when texture buffer is updated
    
    Qt might not redraw the scene otherwise.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758286

and 1.6 caee1d0446122f2afdf74fec9db2846c687d998a