Hi, On Friday 17 June 2016 12:11:56 Xavier Bigand wrote: > I finally found a work around to fix my crash when loading models > after few unload. > > I simply release myself all children of the delete entity with the > following recursive method : > > > void releaseModel(Qt3DCore::QNode& model) > > { > > QEntity* entity = dynamic_cast<QEntity*>(&model); > > > if (entity) > > { > > QComponentVector components = entity->components(); > > > foreach (QComponent* component, components) > > { > > entity->removeComponent(component); > > delete component; > > } > > } > > > QNodeVector nodes = model.childNodes(); > > > foreach (QNode* node, nodes) > > { > > releaseModel(*node); > > delete node; > > } > > } > > > > I don't know why I haven't the same behavior when letting Qt doing it. > > > > Need I fill a bug?
Yes, please file a JIRA. Ideally with a test case. Also for any leaks you suspect. Thanks, Sean > > > > It seems that Qt3D have a lot of memory leaks, after changing a few > projects our application use more than 1Go when with our actual 3D engine > it's always lower than 200Mo. > > 2016-06-16 23:03 GMT+02:00 Xavier Bigand <flamaros.xav...@gmail.com>: > > Thank for the report. > > > > I was not sure if it wasn't me doing something wrong. > > > > But it might be the case, because the assert seems to come from a bad > > ressources management. > > When I switch projects I simply delete entities that attached to the root > > one, but doing this leads to the assert at a certain time and memory leaks > > apparently. > > > > My scenes are composed of objects that I load from a custom file format, > > it's for an architecture software. > > > > I can load 2 projects in a row, and on the third I get the assert. > > > > It seems that I can debug when using Visual instead of QtCreator. And it > > surprise me because the release of ressources seems to be done later than > > when I call the delete of entities. > > > > 2016-06-16 21:14 GMT+02:00 Harald Vistnes <harald.vist...@gmail.com>: > >> I get the same QMetaProperty::read warning. I just filed a Jira for it. > >> https://bugreports.qt.io/browse/QTBUG-54159?filter=17174 > >> > >> Annoying and it came recently, but not critical as you can continue > >> running the debugger. > >> > >> Harald > >> > >> 2016-06-16 17:53 GMT+02:00 Xavier Bigand <flamaros.xav...@gmail.com>: > >>> Sometimes when it doesn't crash on the first scene switch I can get this > >>> assert : > >>> ASSERT: "m_entries[index].m_counter == handle.counter()" in file > >>> c:/Users/qt/work/qt/qt3d/src/core/resources/qhandlemanager_p.h, line 170 > >>> > >>> Sadly it seems that I am not able to debug it with source code. > >>> > >>> 2016-06-16 17:35 GMT+02:00 Xavier Bigand <flamaros.xav...@gmail.com>: > >>>> I am getting the following message when I unload a scene. I am simply > >>>> deleting the entities I don't have to display anymore. > >>>> > >>>> QMetaProperty::read: Unable to handle unregistered datatype > >>>> 'Qt3DRender::QBuffer*' for property 'Qt3DRender::QAttribute::buffer' > >>>> > >>>> What is the proper way to unload meshes in c++? Need I also delete all > >>>> attached components (QGeometryRenderer, QBuffer, ...)? > >>>> > >>>> -- > >>>> Xavier > >>> > >>> -- > >>> Xavier > >>> > >>> _______________________________________________ > >>> Interest mailing list > >>> Interest@qt-project.org > >>> http://lists.qt-project.org/mailman/listinfo/interest > > > > -- > > Xavier -- Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK Klarälvdalens Datakonsult AB, a KDAB Group company Tel. UK +44 (0)1625 809908, Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-independent software solutions _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest