[Interest] Some crash when adding and removing entities in Qt3D.

Kamil Zaripov kamil at zaripov.net
Fri Mar 10 16:44:50 CET 2017


Hi,

Finally I could prepare example that crashed almost in the same place.
Here is the link to the issue: https://bugreports.qt.io/browse/QTBUG-59418 <https://bugreports.qt.io/browse/QTBUG-59418>.

Kamil.

> On Mar 8, 2017, at 12:02 PM, Sean Harmer <sean.harmer at kdab.com> wrote:
> 
> 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 at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170310/15fb2624/attachment.html>


More information about the Interest mailing list