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 751770 - qtquick2videosink: Crash (sometimes) in VideoMaterialShader::updateState
qtquick2videosink: Crash (sometimes) in VideoMaterialShader::updateState
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: qt-gstreamer
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-07-01 08:14 UTC by Vincent Dehors
Modified: 2018-05-04 12:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch preventing the use of uninitialized textures for RGB formats in videomaterial.cpp (2.15 KB, patch)
2015-07-01 08:14 UTC, Vincent Dehors
none Details | Review

Description Vincent Dehors 2015-07-01 08:14:49 UTC
Created attachment 306470 [details] [review]
Patch preventing the use of uninitialized textures for RGB formats in videomaterial.cpp

Sometimes when my application starts, a crash appears. This is happening quite frequently if a QML animation is running at the same time.

The crash occurs in :

VideoMaterialShader::updateState()
    |_ VideoMaterial::bind()
        |_ VideoMaterial::bindTexture(int i, const quint8 *data)

I saw that there is one texture used when using RGB format and 3 with the Yuv420P. In the first case, we use only the first row of the arrays m_textureWidths[], m_textureHeigth[], m_textureOffsets[] even if the size is 3. To know how many row we are using, there is a counter : m_textureCount.

But in VideoMaterial::bind(), we are using the three row of these arrays, even in with the RGB format. In this case, the first row of these arrays is initialized but not the two others.

The attached patch correct my crashes.
Comment 1 George Kiagiadakis 2018-05-04 12:10:46 UTC
commit 49a030719452f44042d008b2018af246d120fb07
Author: Vincent Dehors <vincent.dehors@openwide.fr>
Date:   Fri May 4 15:08:47 2018 +0300

    videomaterial.cpp: Prevent the use of uninitialized textures for RGB formats
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751770