segfault when adding material to entity with EntityLoader
-
trying to add a phong material to Qt3d entities loaded with a material. This modified CuboidEntity.qml from the loader example in qt3d causes a segfault:
import Qt3D 2.0
import Qt3D.Renderer 2.0Entity {
components: [ mesh, material, transform ]CuboidMesh { id: mesh yzMeshResolution: Qt.size(2, 2) xzMeshResolution: Qt.size(2, 2) xyMeshResolution: Qt.size(2, 2) } PhongMaterial { id: material } Transform { id: transform Scale { scale: 3 } }
}
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7f2ed34 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::data (this=0x8)
at /home/user/qt5/qtbase/include/QtCore/../../src/corelib/tools/qscopedpointer.h:135
135 return d;
(gdb) bt
#0 0x00007ffff7f2ed34 in QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> >::data (this=0x8)
at /home/user/qt5/qtbase/include/QtCore/../../src/corelib/tools/qscopedpointer.h:135
#1 0x00007ffff7f40391 in qGetPtrHelper<QScopedPointer<QObjectData> > (p=...)
at /home/user/qt5/qtbase/include/QtCore/../../src/corelib/global/qglobal.h:983
#2 0x00007ffff7f40664 in Qt3D::QNode::d_func (this=0x0) at nodes/qnode.h:101
#3 0x00007ffff7f3f9e4 in Qt3D::QNode::id (this=0x0) at nodes/qnode.cpp:473
#4 0x00007ffff7f3fc81 in Qt3D::QNode::clone (node=0x0) at nodes/qnode.cpp:565
#5 0x00007ffff7c717d6 in Qt3D::QRenderPass::copy (this=0x55fc70, ref=0x554970)
at frontend/qrenderpass.cpp:65
#6 0x00007fffd05e2897 in Qt3D::QRenderPass::doClone (this=0x554970)
at /home/user/qt5/qtbase/include/Qt3DRenderer/../../../qt3d/src/render/frontend/qrenderpass.h:103
#7 0x00007ffff7f3fcbf in Qt3D::QNode::clone (node=0x554970)
at nodes/qnode.cpp:567
#8 0x00007ffff7c746d9 in Qt3D::QTechnique::copy (this=0x55fa20, ref=0x4509f0)
at frontend/qtechnique.cpp:90
#9 0x00007fffd05e2b8b in Qt3D::QTechnique::doClone (this=0x4509f0)
at /home/user/qt5/qtbase/include/Qt3DRenderer/../../../qt3d/src/render/frontend/qtechnique.h:84
#10 0x00007ffff7f3fcbf in Qt3D::QNode::clone (node=0x4509f0)