Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

SIGSEGV when reloading a qml page with View3D component



  • I am developing a Qt application using Qt 5.15 on ubuntu 20.04.
    I have View3D component(QtQuick3D 1.15) in qml page1, which displays a 3d model from a .mesh file.
    // page1.qml view3d component

    View3D {
        id: view        
        camera: camera
        renderMode: View3D.Overlay
        PerspectiveCamera {
            id: camera
            position: Qt.vector3d(0, -450, 0)
            rotation: Quaternion.fromEulerAngles(90, 0, 0)
        }
        DirectionalLight {
            position: Qt.vector3d(0, -450, 0)
            rotation: Quaternion.fromEulerAngles(90, 0, 0)
        }
        Model {
            id: slice_child0
            source: "meshes/slice_child0.mesh"        
            materials: [
               PrincipledMaterial{
                   baseColor: blue
                   metalness: 0
               }
            ]
        }
    }
    

    For the first time, page1 loads and works fine and when I navigate from page1 to page2(any other page) and come back to page1 (using pageLoader) application crashes with the below stack trace

    1 QSSGBufferManager::loadMesh qssgrenderbuffermanager.cpp 584 0x7fff7ba6daec
    2 QSSGRenderModel::getModelBounds qssgrendermodel.cpp 49 0x7fff7ba2c26f
    3 QQuick3DSceneManager::updateBoundingBoxes qquick3dscenemanager.cpp 101 0x7fff7bdb90d1
    4 QQuick3DSceneRenderer::synchronize qquick3dscenerenderer.cpp 306 0x7fff7bdbb45d
    5 QQuick3DViewport::setupDirectRenderer qquick3dviewport.cpp 759 0x7fff7bdc0d98
    6 QQuick3DViewport::updatePaintNode qquick3dviewport.cpp 486 0x7fff7bdc1b9d
    7 QQuickWindowPrivate::updateDirtyNode qquickwindow.cpp 3736 0x7fffdb6df200
    8 QQuickWindowPrivate::updateDirtyNodes qquickwindow.cpp 3481 0x7fffdb6df83d
    9 QQuickWindowPrivate::syncSceneGraph qquickwindow.cpp 448 0x7fffdb6e0c40
    10 QSGRenderThread::sync qsgthreadedrenderloop.cpp 647 0x7fffdb6880b5
    11 QSGRenderThread::syncAndRender qsgthreadedrenderloop.cpp 778 0x7fffdb68a461
    12 QSGRenderThread::run qsgthreadedrenderloop.cpp 1043 0x7fffdb68dd8b
    13 QThreadPrivate::start qthread_unix.cpp 342 0x7ffff65db415
    14 start_thread pthread_create.c 477 0x7ffff6108609
    15 clone clone.S 95 0x7ffff6244103

    When I moved from page1 to page2, the page1 name is pushed to stack and page2 is set as pageLoader's source, and when coming back to page1, pageLoader loads the page1 from top of the stack.

    Is this a bug in Qt? or am I doing something wrong? your guidance is highly appreciated!

    Thanks,
    Venu