Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-54504

QML Video Deadlock when deleted imidiately after created

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.6.2
    • 5.6.1
    • Multimedia
    • None
    • Windows
    • 7fb7f278fff2c407f8c0fe8165c60a934f95cd91

    Description

      There seems to be a deadlock when QML Video element is destroyed right after play starts. See attached example for reproducing the issue. Beware build insource.

      Following thread backtraces are seen:

      Main Thread:
       	ntdll.dll!_ZwWaitForSingleObject@12()  + 0xc bytes	
       	KernelBase.dll!_WaitForSingleObjectEx@12()  + 0x91 bytes	
       	KernelBase.dll!_WaitForSingleObject@8()  + 0x12 bytes	
      >	Qt5Cored.dll!QMutexPrivate::wait(int timeout=-1)  Line 67 + 0x26 bytes	C++
       	Qt5Cored.dll!QBasicMutex::lockInternal(int timeout=-1)  Line 500 + 0xc bytes	C++
       	Qt5Cored.dll!QBasicMutex::lockInternal()  Line 417	C++
       	Qt5Cored.dll!QMutex::lock()  Line 226	C++
       	dsengined.dll!DirectShowEventLoop::wait(QMutex * mutex=0x030a223c)  Line 91	C++
       	dsengined.dll!DirectShowPlayerService::setVideoOutput(IBaseFilter * filter=0x00000000)  Line 1097	C++
       	dsengined.dll!DirectShowPlayerService::videoOutputChanged()  Line 1220	C++
       	dsengined.dll!DirectShowPlayerService::qt_static_metacall(QObject * _o=0x030a21a8, QMetaObject::Call _c=InvokeMetaMethod, int _id=0, void * * _a=0x00efd0a8)  Line 73	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender=0x03ca6ec0, int signalOffset=3, int local_signal_index=0, void * * argv=0x00000000)  Line 3680 + 0x2e bytes	C++
       	Qt5Cored.dll!QMetaObject::activate(QObject * sender=0x03ca6ec0, const QMetaObject * m=0x0f342c0c, int local_signal_index=0, void * * argv=0x00000000)  Line 3546 + 0x1e bytes	C++
       	dsengined.dll!DirectShowVideoRendererControl::filterChanged()  Line 123 + 0x13 bytes	C++
       	dsengined.dll!DirectShowVideoRendererControl::setSurface(QAbstractVideoSurface * surface=0x00000000)  Line 93	C++
       	Qt5MultimediaQuick_pd.dll!QDeclarativeVideoRendererBackend::releaseControl()  Line 123	C++
       	Qt5MultimediaQuick_pd.dll!QDeclarativeVideoRendererBackend::~QDeclarativeVideoRendererBackend()  Line 82	C++
       	Qt5MultimediaQuick_pd.dll!QDeclarativeVideoRendererBackend::`scalar deleting destructor'()  + 0xf bytes	C++
       	Qt5MultimediaQuick_pd.dll!QScopedPointerDeleter<QDeclarativeVideoBackend>::cleanup(QDeclarativeVideoBackend * pointer=0x03ccfb30)  Line 62 + 0x20 bytes	C++
       	Qt5MultimediaQuick_pd.dll!QScopedPointer<QDeclarativeVideoBackend,QScopedPointerDeleter<QDeclarativeVideoBackend> >::reset(QDeclarativeVideoBackend * other=0x00000000)  Line 157 + 0x9 bytes	C++
       	Qt5MultimediaQuick_pd.dll!QDeclarativeVideoOutput::~QDeclarativeVideoOutput()  Line 146	C++
       	declarative_multimediad.dll!QQmlPrivate::QQmlElement<QDeclarativeVideoOutput>::~QQmlElement<QDeclarativeVideoOutput>()  Line 106 + 0x9 bytes	C++
       	declarative_multimediad.dll!QQmlPrivate::QQmlElement<QDeclarativeVideoOutput>::`scalar deleting destructor'()  + 0xf bytes	C++
       	Qt5Cored.dll!QObjectPrivate::deleteChildren()  Line 1935 + 0x24 bytes	C++
       	Qt5Cored.dll!QObject::~QObject()  Line 1030	C++
       	Qt5Quickd.dll!QQuickItem::~QQuickItem()  Line 2120 + 0x15 bytes	C++
       	Qt5Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>()  Line 106 + 0x8 bytes	C++
       	Qt5Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'()  + 0xf bytes	C++
       	Qt5Cored.dll!qDeleteInEventHandler(QObject * o=0x03cd5b90)  Line 4345 + 0x21 bytes	C++
       	Qt5Cored.dll!QObject::event(QEvent * e=0x03cd6390)  Line 1232 + 0xc bytes	C++
       	Qt5Quickd.dll!QQuickItem::event(QEvent * ev=0x03cd6390)  Line 7118 + 0xd bytes	C++
       	Qt5Cored.dll!QCoreApplicationPrivate::notify_helper(QObject * receiver=0x03cd5b90, QEvent * event=0x03cd6390)  Line 1053	C++
       	Qt5Cored.dll!QCoreApplication::notify(QObject * receiver=0x03cd5b90, QEvent * event=0x03cd6390)  Line 997 + 0x25 bytes	C++
       	Qt5Guid.dll!QGuiApplication::notify(QObject * object=0x03cd5b90, QEvent * event=0x03cd6390)  Line 1472	C++
       	Qt5Cored.dll!QCoreApplication::notifyInternal(QObject * receiver=0x03cd5b90, QEvent * event=0x03cd6390)  Line 935 + 0x15 bytes	C++
       	Qt5Cored.dll!QCoreApplication::sendEvent(QObject * receiver=0x03cd5b90, QEvent * event=0x03cd6390)  Line 237 + 0x39 bytes	C++
       	Qt5Cored.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0, QThreadData * data=0x0120a438)  Line 1539 + 0xd bytes	C++
       	Qt5Cored.dll!QCoreApplication::sendPostedEvents(QObject * receiver=0x00000000, int event_type=0)  Line 1397 + 0x11 bytes	C++
       	qwindowsd.dll!QWindowsGuiEventDispatcher::sendPostedEvents()  Line 88 + 0xa bytes	C++
       	Qt5Cored.dll!qt_internal_proc(HWND__ * hwnd=0x002e0924, unsigned int message=1025, unsigned int wp=0, long lp=0)  Line 423	C++
       	user32.dll!__InternalCallWinProc@20()  + 0x2b bytes	
       	user32.dll!UserCallWinProcCheckWow()  + 0x1f0 bytes	
       	user32.dll!DispatchMessageWorker()  + 0x231 bytes	
       	user32.dll!_DispatchMessageW@4()  + 0x10 bytes	
       	Qt5Cored.dll!QEventDispatcherWin32::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...})  Line 757	C++
       	qwindowsd.dll!QWindowsGuiEventDispatcher::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...})  Line 80 + 0xd bytes	C++
       	Qt5Cored.dll!QEventLoop::processEvents(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...})  Line 137	C++
       	Qt5Cored.dll!QEventLoop::exec(QFlags<enum QEventLoop::ProcessEventsFlag> flags={...})  Line 212 + 0x26 bytes	C++
       	Qt5Cored.dll!QCoreApplication::exec()  Line 1188 + 0x15 bytes	C++
       	Qt5Guid.dll!QGuiApplication::exec()  Line 1451	C++
       	videodeadlock.exe!main(int argc=1, char * * argv=0x0120b5f8)  Line 11 + 0x6 bytes	C++
       	videodeadlock.exe!WinMain(HINSTANCE__ * instance=0x01070000, HINSTANCE__ * prevInstance=0x00000000, char * __formal=0x01415fbd, int cmdShow=10)  Line 131 + 0x12 bytes	C++
       	videodeadlock.exe!__tmainCRTStartup()  Line 578 + 0x35 bytes	C
       	videodeadlock.exe!WinMainCRTStartup()  Line 403	C
       	kernel32.dll!@BaseThreadInitThunk@12()  + 0x24 bytes	
       	ntdll.dll!__RtlUserThreadStart()  + 0x2f bytes	
       	ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes	
      
      Other Thread:
       	ntdll.dll!_ZwWaitForSingleObject@12()  + 0xc bytes	
       	KernelBase.dll!_WaitForSingleObjectEx@12()  + 0x91 bytes	
       	KernelBase.dll!_WaitForSingleObject@8()  + 0x12 bytes	
      >	Qt5Cored.dll!QWaitConditionPrivate::wait(QWaitConditionEvent * wce=0x03cbdcd0, unsigned long time=4294967295)  Line 121 + 0x11 bytes	C++
       	Qt5Cored.dll!QWaitCondition::wait(QMutex * mutex=0x03c81844, unsigned long time=4294967295)  Line 186 + 0x12 bytes	C++
       	dsengined.dll!VideoSurfaceFilter::Disconnect()  Line 339	C++
       	quartz.dll!CFilterGraph::RemoveAllConnections2()  + 0x12a bytes	
       	quartz.dll!CDownStreamFilterList::RemoveFromFilterGraph()  + 0x31 bytes	
       	quartz.dll!CFilterChain::RemoveChain()  + 0x61 bytes	
       	dsengined.dll!DirectShowPlayerService::doReleaseVideoOutput(QMutexLocker * locker=0x0446fae0)  Line 1152	C++
       	dsengined.dll!DirectShowPlayerService::run()  Line 1409 + 0xc bytes	C++
       	dsengined.dll!DirectShowPlayerServiceThread::run()  Line 84 + 0x12 bytes	C++
       	Qt5Cored.dll!QThreadPrivate::start(void * arg=0x03cc1620)  Line 409	C++
       	msvcr90d.dll!_callthreadstartex()  Line 348 + 0xf bytes	C
       	msvcr90d.dll!_threadstartex(void * ptd=0x03c814c8)  Line 331	C
       	kernel32.dll!@BaseThreadInitThunk@12()  + 0x24 bytes	
       	ntdll.dll!__RtlUserThreadStart()  + 0x2f bytes	
       	ntdll.dll!__RtlUserThreadStart@8()  + 0x1b bytes	
      

      Attachments

        1. videodeadlock.zip
          529 kB
          Andreas Holzammer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ylopes Yoann Lopes
            aholza Andreas Holzammer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes