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

QtQuick3D.Xr crashes if the runtime doesn't support depth swapchains

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.1, 6.9.0 FF
    • 6.8.0
    • Quick: 3D
    • None
    • Windows
    • 262639786 (dev), 659320e32 (6.8)

    Description

      QQuick3DXrManagerPrivate::createSwapchains() crashes on line 1061 (see stack trace below), apparently trying to access the first element of empty m_depthSwapchains. Depth swapchain XR_KHR_composition_layer_depth is an optional feature and not required for a conformant OpenXR runtime (though most runtimes support it).

      Still it seems the Qt code tries to keep compatibility, earlier in the code depth swap chains code blocks are surrounded by 

      if (m_compositionLayerDepthSupported && m_depthSwapchainFormat > 0) { .. } 

      condition, but fail to make the respective check near the crash.

      Stack trace:

      Qt6Cored.dll!qt_message_fatal<QString &>(QtMsgType __formal, const QMessageLogContext & context, QString & message) Line 2107 (c:\Users\qt\work\qt\qtbase\src\corelib\global\qlogging.cpp:2107)
      Qt6Cored.dll!qt_message(QtMsgType msgType, const QMessageLogContext & context, const char * msg, char * ap) Line 382 (c:\Users\qt\work\qt\qtbase\src\corelib\global\qlogging.cpp:382)
      Qt6Cored.dll!QMessageLogger::fatal(const char * msg, ...) Line 885 (c:\Users\qt\work\qt\qtbase\src\corelib\global\qlogging.cpp:885)
      Qt6Cored.dll!qt_assert_x(const char * where, const char * what, const char * file, int line) Line 113 (c:\Users\qt\work\qt\qtbase\src\corelib\global\qassert.cpp:113)
      Qt6Quick3DXrd.dll!QList<QQuick3DXrManagerPrivate::Swapchain>::operator[](__int64 i) Line 457 (c:\Users\qt\work\install\include\QtCore\qlist.h:457)
      Qt6Quick3DXrd.dll!QQuick3DXrManagerPrivate::createSwapchains() Line 1061 (c:\Users\qt\work\qt\qtquick3d\src\xr\quick3dxr\openxr\qquick3dxrmanager_openxr.cpp:1061)
      Qt6Quick3DXrd.dll!QQuick3DXrManagerPrivate::initialize() Line 526 (c:\Users\qt\work\qt\qtquick3d\src\xr\quick3dxr\openxr\qquick3dxrmanager_openxr.cpp:526)
      Qt6Quick3DXrd.dll!QQuick3DXrManager::initialize() Line 67 (c:\Users\qt\work\qt\qtquick3d\src\xr\quick3dxr\qquick3dxrmanager.cpp:67)
      Qt6Quick3DXrd.dll!QQuick3DXrView::init() Line 289 (c:\Users\qt\work\qt\qtquick3d\src\xr\quick3dxr\qquick3dxrview.cpp:289)
      Qt6Quick3DXrd.dll!QQuick3DXrView::QQuick3DXrView() Line 32 (c:\Users\qt\work\qt\qtquick3d\src\xr\quick3dxr\qquick3dxrview.cpp:32)
      Qt6Quick3DXrd.dll!QQmlPrivate::QQmlElement<QQuick3DXrView>::QQmlElement<QQuick3DXrView>() (Unknown Source:0)
      Qt6Quick3DXrd.dll!QQmlPrivate::createInto<QQuick3DXrView>(void * memory, void * __formal) Line 174 (c:\Users\qt\work\install\include\QtQml\qqmlprivate.h:174)
      Qt6Qmld.dll!QQmlType::create(void * * memory, unsigned __int64 additionalMemory) Line 508 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmltype.cpp:508)
      Qt6Qmld.dll!QQmlType::createWithQQmlData() Line 521 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmltype.cpp:521)
      Qt6Qmld.dll!QQmlObjectCreator::createInstance(int index, QObject * parent, bool isContextObject) Line 1301 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmlobjectcreator.cpp:1301)
      Qt6Qmld.dll!QQmlObjectCreator::create(int subComponentIndex, QObject * parent, QQmlInstantiationInterrupt * interrupt, int flags) Line 201 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmlobjectcreator.cpp:201)
      Qt6Qmld.dll!QQmlComponentPrivate::beginCreate(QQmlRefPointer<QQmlContextData> context) Line 1095 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmlcomponent.cpp:1095)
      Qt6Qmld.dll!QQmlComponent::beginCreate(QQmlContext * context) Line 1024 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmlcomponent.cpp:1024)
      Qt6Qmld.dll!QQmlComponentPrivate::doBeginCreate(QQmlComponent * q, QQmlContext * context) Line 340 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmlcomponent.cpp:340)
      Qt6Qmld.dll!QQmlComponentPrivate::createWithProperties(QObject * parent, const QMap<QString,QVariant> & properties, QQmlContext * context, QQmlComponentPrivate::CreateBehavior behavior, bool createFromQml) Line 946 (c:\Users\qt\work\qt\qtdeclarative\src\qml\qml\qqmlcomponent.cpp:946)

      Attachments

        For Gerrit Dashboard: QTBUG-129990
        # Subject Branch Project Status CR V

        Activity

          People

            lagocs Laszlo Agocs
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes