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

Quick create and remove QuickItem cause QSG threads crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.2.0
    • Fix Version/s: 6.2.1, 6.3
    • Component/s: Quick: SceneGraph
    • Labels:
      None
    • Environment:
      window10 or macOS
    • Platform/s:
      macOS, Windows

      Description

      The ThreadedRenderLoop is enabled by default. If QuickItem is created quickly and removed frequently, the Qt Scene Graph rendering thread will trigger crash when using the texture object.
      The QD3D11Texture(0x0000024B62B268C0) object is freed during the QuickItem destructor, but is still used in the standalone rendering thread.

      ********  QD3D11Texture Delete:  0x5D60, 0x0000024b62b268c0 {tex=0x0000024b03a32278 <d3d11.dll 的符号文件中无可用的类型信息> tex3D=0x0000000000000000 <NULL> ...}  	Qt6Guid.dll!QD3D11Texture::~QD3D11Texture
      	Qt6Guid.dll!QD3D11Texture::`scalar deleting destructor'
      	Qt6Quickd.dll!QSGRhiLayer::releaseResources
      	Qt6Quickd.dll!QSGRhiLayer::setItem
      	Qt6Quickd.dll!QQuickShaderEffectSource::sourceItemParentChanged
      	Qt6Quickd.dll!QQuickShaderEffectSource::qt_static_metacall
      	Qt6Cored.dll!doActivate<0>
      	Qt6Cored.dll!QMetaObject::activate
      	Qt6Quickd.dll!QQuickItem::parentChanged
      	Qt6Quickd.dll!QQuickItem::setParentItem
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQuickImplicitSizeItem::~QQuickImplicitSizeItem
      	Qt6Quickd.dll!QQuickLoader::~QQuickLoader
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement<QQuickLoader>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickLoader>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Quickd.dll!QQuickItemLayer::~QQuickItemLayer
      	Qt6Quickd.dll!QQuickItemLayer::`vector deleting destructor'
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!qDeleteInEventHandler
      	Qt6Cored.dll!QObject::event
      	Qt6Quickd.dll!QQuickItem::event
      	Qt6Widgetsd.dll!QApplicationPrivate::notify_helper
      	Qt6Widgetsd.dll!QApplication::notify
      	VECreator.dll!EMGuiApplication::notify
      	Qt6Cored.dll!QCoreApplication::notifyInternal2
      	Qt6Cored.dll!QCoreApplication::sendEvent
      	Qt6Cored.dll!QCoreApplicationPrivate::sendPostedEvents
      	Qt6Cored.dll!QEventDispatcherWin32::sendPostedEvents
      	Qt6Guid.dll!QWindowsGuiEventDispatcher::sendPostedEvents
      	Qt6Cored.dll!QEventDispatcherWin32::processEvents
      	Qt6Guid.dll!QWindowsGuiEventDispatcher::processEvents
      	Qt6Cored.dll!QEventLoop::processEvents
      	Qt6Cored.dll!QEventLoop::exec
      	Qt6Cored.dll!QCoreApplication::exec
      	Qt6Guid.dll!QGuiApplication::exec
      	Qt6Widgetsd.dll!QApplication::exec
      	VECreator.dll!entryPoint
      	JianyingPro.exe!VELauncher::exec
      	JianyingPro.exe!appexec
      	JianyingPro.exe!wmain
      	JianyingPro.exe!invoke_main
      	JianyingPro.exe!__scrt_common_main_seh
      	JianyingPro.exe!__scrt_common_main
      	JianyingPro.exe!wmainCRTStartup
      	kernel32.dll!BaseThreadInitThunk
      	ntdll.dll!RtlUserThreadStart
      	
      ********  QD3D11Texture Delete:  0x5D60, 0x0000024b62b26780 {tex=0x0000024b03a32fb8 <d3d11.dll 的符号文件中无可用的类型信息> tex3D=0x0000000000000000 <NULL> ...}  	Qt6Guid.dll!QD3D11Texture::~QD3D11Texture
      	Qt6Guid.dll!QD3D11Texture::`scalar deleting destructor'
      	Qt6Quickd.dll!QSGRhiLayer::releaseResources
      	Qt6Quickd.dll!QSGRhiLayer::setItem
      	Qt6Quickd.dll!QQuickShaderEffectSource::sourceItemParentChanged
      	Qt6Quickd.dll!QQuickShaderEffectSource::qt_static_metacall
      	Qt6Cored.dll!doActivate<0>
      	Qt6Cored.dll!QMetaObject::activate
      	Qt6Quickd.dll!QQuickItem::parentChanged
      	Qt6Quickd.dll!QQuickItem::setParentItem
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQuickImplicitSizeItem::~QQuickImplicitSizeItem
      	Qt6Quickd.dll!QQuickLoader::~QQuickLoader
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickLoader>::~QQmlElement<QQuickLoader>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickLoader>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Quickd.dll!QQuickItemLayer::~QQuickItemLayer
      	Qt6Quickd.dll!QQuickItemLayer::`vector deleting destructor'
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!QObjectPrivate::deleteChildren
      	Qt6Cored.dll!QObject::~QObject
      	Qt6Quickd.dll!QQuickItem::~QQuickItem
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::~QQmlElement<QQuickItem>
      	Qt6Quickd.dll!QQmlPrivate::QQmlElement<QQuickItem>::`scalar deleting destructor'
      	Qt6Cored.dll!qDeleteInEventHandler
      	Qt6Cored.dll!QObject::event
      	Qt6Quickd.dll!QQuickItem::event
      	Qt6Widgetsd.dll!QApplicationPrivate::notify_helper
      	Qt6Widgetsd.dll!QApplication::notify
      	VECreator.dll!EMGuiApplication::notify
      	Qt6Cored.dll!QCoreApplication::notifyInternal2
      	Qt6Cored.dll!QCoreApplication::sendEvent
      	Qt6Cored.dll!QCoreApplicationPrivate::sendPostedEvents
      	Qt6Cored.dll!QEventDispatcherWin32::sendPostedEvents
      	Qt6Guid.dll!QWindowsGuiEventDispatcher::sendPostedEvents
      	Qt6Cored.dll!QEventDispatcherWin32::processEvents
      	Qt6Guid.dll!QWindowsGuiEventDispatcher::processEvents
      	Qt6Cored.dll!QEventLoop::processEvents
      	Qt6Cored.dll!QEventLoop::exec
      	Qt6Cored.dll!QCoreApplication::exec
      	Qt6Guid.dll!QGuiApplication::exec
      	Qt6Widgetsd.dll!QApplication::exec
      	VECreator.dll!entryPoint
      	JianyingPro.exe!VELauncher::exec
      	JianyingPro.exe!appexec
      	JianyingPro.exe!wmain
      	JianyingPro.exe!invoke_main
      	JianyingPro.exe!__scrt_common_main_seh
      	JianyingPro.exe!__scrt_common_main
      	JianyingPro.exe!wmainCRTStartup
      	kernel32.dll!BaseThreadInitThunk
      	ntdll.dll!RtlUserThreadStart
      	
      ######### texD->srv: tid(0x630C)   texD(0x0000024b62b268c0 {tex=0xdddddddddddddddd {...} tex3D=0xdddddddddddddddd {...} owns=true (0xdd) ...})   srv(0xdddddddddddddddd {...})
      

      You can find the attached 1.png/2.png in windows, and 3.png, 4.png in macOS, while it can't be produced in Qt5.15.
      Just run the demo project attached, a quick scroll up and down will pop up this error.

        Attachments

        1. 1.png
          1.png
          114 kB
        2. 3.png
          3.png
          247 kB
        3. 2.png
          2.png
          532 kB
        4. 4.png
          4.png
          1.25 MB
        5. LayerEffectTest.zip
          5 kB

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              lagocs Laszlo Agocs
              Reporter:
              kenny.zhang kenny zhang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes