2

For my project I need to place QtQuick.Scene3D within QtQuick.Component Scene is successfully created, but when I try to dispose component I get segfault at

0   Qt3D::QCamera::position() const 0xb7226e6b  
1   Qt3D::QCamera::translate(QVector3D const&, Qt3D::QCamera::CameraTranslationOption)  0xb7226fa4  

It seems that objects are deleted in wrong order. So, there is a question: should I implement whole object graph in C++, or there is a correct way to make Scene3D re-creatable?

There is my component qml file:

import Qt3D 2.0
import Qt3D.Renderer 2.0
import QtQuick.Scene3D 2.0
import QtQuick 2.0 as QQ2
import CeGui 1.0;
import VectorPlot 1.0;

QQ2.Component {
    QQ2.Item {
        Scene3D {
            anchors.fill: parent
            id: rootscene
            aspects: "input"

            Entity {
                id: sceneRoot

                Camera {
                    id: camera
                    projectionType: CameraLens.PerspectiveProjection
                    fieldOfView: 45
                    aspectRatio: 16/9
                    nearPlane : 0.1
                    farPlane : 1000.0
                    position: Qt.vector3d( 25.0, -25.0, 25.0 )
                    upVector: Qt.vector3d( 0.0, 0.0, 1.0 )
                    viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 )
                }

                Configuration  {
                    id: cfg
                    controlledCamera: camera
                }

                Viewport {
                    id: viewport
                    rect: Qt.rect(0.0, 0.0, 1.0, 1.0) // From Top Left
                    clearColor: Qt.rgba(0, 0.5, 1, 1)

                    CameraSelector {
                        id : cameraSelector
                        camera: camera
                        ClearBuffer {
                            buffers : ClearBuffer.ColorDepthBuffer
                        }
                    }
                }

                components: [
                    FrameGraph {
                        id: framgraph
                        activeFrameGraph: viewport
                    }
                ]

                BarChartScene {
                    id: bcs
                    model: GlobalViewModel.harmonicsEditModel
                }
            }
        }
    }
}

I use Qt 5.5 for 32-bit gcc in Linux

Sharihin
  • 140
  • 11

1 Answers1

3

It seems that it is known bug, which will be fixed in upcoming releases

Sharihin
  • 140
  • 11