Hi,

could you file a JIRA with a test case please? Which version of Qt is this with?

Thanks,

Sean


On 07/03/2017 17:00, Kamil Zaripov wrote:
Hi,

I have entities that should be created and deleted at runtime. Entity have only material and mesh component. Material is QDiffuseMapMaterial with QTextureImage.

When entities begin to add and delete from scene, sometimes application crashes with this assert:

qt_assert: ASSERT: "img != nullptr" in file ../../include/Qt3DRender/5.8.0/Qt3DRender/private/../../../../../src/render/texture/apitexturemanager_p.h, line 286 <x-msg://4/src/render/texture/apitexturemanager_p.h,%20line%20286>

But unfortunately I can’t find why it happenes. I’m adding the entity this way:


QEntity*visibleObject=newQEntity();
QDiffuseMapMaterial*material=newQDiffuseMapMaterial();
QTextureImage*diffuseTextureImage=newQTextureImage();
diffuseTextureImage->setSource(QUrl("qrc:/resources/tile.png"));
material->diffuse()->addTextureImage(diffuseTextureImage);
material->setShininess(0.1);
visibleObject->addComponent(material);
//setmesh
QPlaneMesh*mesh=newQPlaneMesh();
mesh->setWidth(1.0/2);
mesh->setHeight(1.0/2);
visibleObject->addComponent(mesh);
visibleObject->setParent(_rootEntity);
 And delete just like this:
deletevisibleObject;
_rootEntity is root entity defined in cpp code. Scene defined in QML file using 
Scene3D:

Scene3D{
id:scene
anchors.fill:parent
aspects:["render","logic","input"]
entity:rootEntity
}
And _rootEntity passed like this:

context->setContextProperty("rootEntity",_rootEntity);
If it is necessary I can prepare simple example that reproduce issue.
Thanks.



_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to