[Bug 744816] New: VideoNode::setCurrentFrame() material assert fails after updating QStandardItemModel

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Feb 19 12:45:01 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=744816

            Bug ID: 744816
           Summary: VideoNode::setCurrentFrame() material assert fails
                    after updating QStandardItemModel
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: qt-gstreamer
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: randy.spruyt at christiedigital.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

void VideoNode::setCurrentFrame(GstBuffer* buffer)
{
    Q_ASSERT (m_materialType == MaterialTypeVideo);
}

fails after a QStandardItemModel::setData() is called on a role that should not
affect the surface. 

The QStandardModel is simple:

QHash<int,QByteArray> VideoSceneModel::roleNames() const
{
    QHash<int, QByteArray> retVal;
    retVal[VideoSceneModelRole_openGLsurface] =
"role_videoSceneModelOpenGLSurface";
    retVal[VideoSceneModelRole_X] = "role_videoSceneModelX";
}

I can set the x position manually in QML just fine. The video plays fine.
However when we bind the x position in XML to the model role, updating the x
position is triggering an event that causes the video node to be destroyed
somewhere. i.e.

// set X position from 0 to 500
QModelIndex modelIndex = index( 0, 0 );
if( modelIndex.isValid() )
{
    setData( modelIndex, 500, VideoSceneModelRole_X );
}

Which is emitting some sort of change signal that ends up in:

QSGNode* QtQuick2VideoSinkDelegate::updateNode(QSGNode *node, const QRectF &
targetArea)
GST_TRACE_OBJECT(m_sink, "updateNode called");
    bool sgnodeFormatChanged = false;

    VideoNode *vnode = dynamic_cast<VideoNode*>(node);
    if (!vnode) {
        GST_INFO_OBJECT(m_sink, "creating new VideoNode");
        vnode = new VideoNode;
    }



vnode is null, causing a new VideoNode to be created. This in turn sets a black
surface. Since the video is still playing, the next 

void VideoNode::setCurrentFrame(GstBuffer* buffer)
{
    Q_ASSERT (m_materialType == MaterialTypeVideo);
}

fails.

Interestingly, if you stick a breakpoint on 

g_signal_emitv(values, signal.id(), detail, &returnValue);

in signal.cpp, the call sometimes work fine. The video changex to x=500 and
everything keeps goign. this seems like it could be race condition/execution
order related

here is the assert failure on the material stack trace:
0    __GI_raise        56    0x7ffff4b42e37    
1    __GI_abort        89    0x7ffff4b44528    
2    QMessageLogger::fatal(char const*, ...) const   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff5486b76    
3    qt_assert(char const*, char const*, int)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff54817ab    
4    VideoNode::setCurrentFrame    videonode.cpp    49    0x7fffd3270791    
5    QtQuick2VideoSinkDelegate::updateNode    qtquick2videosinkdelegate.cpp   
98    0x7fffd3271c9f    
6    gst_qt_quick2_video_sink_update_node    gstqtquick2videosink.cpp    265   
0x7fffd3272a32    
7    g_cclosure_user_marshal_POINTER__POINTER_DOUBLE_DOUBLE_DOUBLE_DOUBLE   
gstqtvideosinkmarshal.c    221    0x7fffd326d5a2    
8    g_closure_invoke    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0       
0x7ffff432f285    
9    ??    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0        0x7ffff4340e62  
10    g_signal_emitv    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0       
0x7ffff4348541    
11    QGlib::Private::emit    signal.cpp    190    0x7ffff48ebac3    
12    QGlib::Private::EmitImpl<void* (void*, double, double, double,
double)>::emit(void*, char const*, QGlib::Quark, void* const&, double const&,
double const&, double const&, double const&)    emitimpl.h    78   
0x7ffff79a1ae9    
13    QGlib::emit<void*, void*, double, double, double, double>    emitimpl.h  
 113    0x7ffff79a1659    
14    QGst::Quick::VideoItem::updatePaintNode    videoitem.cpp    113   
0x7ffff79a0c26    
15    QQuickWindowPrivate::updateDirtyNode(QQuickItem*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72ee3e6    
16    QQuickWindowPrivate::updateDirtyNodes()   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72ef7c3    
17    QQuickWindowPrivate::syncSceneGraph()   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72f0ba9    
18    ??    /home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72bedd5  
19    ??    /home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72bf4ad  
20    QApplicationPrivate::notify_helper(QObject*, QEvent*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Widgets.so.5        0x7ffff6a228f4    
21    QApplication::notify(QObject*, QEvent*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Widgets.so.5        0x7ffff6a26506    
22    QCoreApplication::notifyInternal(QObject*, QEvent*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff56ccc84    
23    QTimerInfoList::activateTimers()   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff57269c4    
24    ??    /home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff5726c6d   
25    g_main_context_dispatch    /lib/x86_64-linux-gnu/libglib-2.0.so.0       
0x7ffff4059ecd    
26    ??    /lib/x86_64-linux-gnu/libglib-2.0.so.0        0x7ffff405a1b0    
27    g_main_context_iteration    /lib/x86_64-linux-gnu/libglib-2.0.so.0       
0x7ffff405a25c    
28   
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff57275b3    
29    QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff56caeab    
30    QCoreApplication::exec()    /home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5  
     0x7ffff56cfdc5    
31    main    main.cpp    72    0x405230    


here is the stack trace that causes the material to be set to black after a new
vnode is created (which is likely more useful):
0    VideoNode::setMaterialTypeSolidBlack    videonode.cpp    40   
0x7fffd32706a8    
1    VideoNode::VideoNode    videonode.cpp    28    0x7fffd3270617    
2    QtQuick2VideoSinkDelegate::updateNode    qtquick2videosinkdelegate.cpp   
34    0x7fffd3271651    
3    gst_qt_quick2_video_sink_update_node    gstqtquick2videosink.cpp    265   
0x7fffd3272a32    
4    g_cclosure_user_marshal_POINTER__POINTER_DOUBLE_DOUBLE_DOUBLE_DOUBLE   
gstqtvideosinkmarshal.c    221    0x7fffd326d5a2    
5    g_closure_invoke    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0       
0x7ffff432f285    
6    ??    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0        0x7ffff4340e62  
7    g_signal_emitv    /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0       
0x7ffff4348541    
8    QGlib::Private::emit    signal.cpp    190    0x7ffff48ebac3    
9    QGlib::Private::EmitImpl<void* (void*, double, double, double,
double)>::emit(void*, char const*, QGlib::Quark, void* const&, double const&,
double const&, double const&, double const&)    emitimpl.h    78   
0x7ffff79a1ae9    
10    QGlib::emit<void*, void*, double, double, double, double>    emitimpl.h  
 113    0x7ffff79a1659    
11    QGst::Quick::VideoItem::updatePaintNode    videoitem.cpp    113   
0x7ffff79a0c26    
12    QQuickWindowPrivate::updateDirtyNode(QQuickItem*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72ee3e6    
13    QQuickWindowPrivate::updateDirtyNodes()   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72ef7c3    
14    QQuickWindowPrivate::syncSceneGraph()   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72f0ba9    
15    ??    /home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72bedd5  
16    ??    /home/dev/Qt/5.4/gcc_64/lib/libQt5Quick.so.5        0x7ffff72bf4ad  
17    QApplicationPrivate::notify_helper(QObject*, QEvent*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Widgets.so.5        0x7ffff6a228f4    
18    QApplication::notify(QObject*, QEvent*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Widgets.so.5        0x7ffff6a26506    
19    QCoreApplication::notifyInternal(QObject*, QEvent*)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff56ccc84    
20    QTimerInfoList::activateTimers()   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff57269c4    
21    ??    /home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff5726c6d   
22    g_main_context_dispatch    /lib/x86_64-linux-gnu/libglib-2.0.so.0       
0x7ffff4059ecd    
23    ??    /lib/x86_64-linux-gnu/libglib-2.0.so.0        0x7ffff405a1b0    
24    g_main_context_iteration    /lib/x86_64-linux-gnu/libglib-2.0.so.0       
0x7ffff405a25c    
25   
QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff57275b3    
26    QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)   
/home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5        0x7ffff56caeab    
27    QCoreApplication::exec()    /home/dev/Qt/5.4/gcc_64/lib/libQt5Core.so.5  
     0x7ffff56cfdc5    
28    main    main.cpp    72    0x405230

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list