Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53308

Crash in RenderStateNode when material is deleted and recreated

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.7.0 RC
    • 5.7.0 RC
    • Qt3D
    • None
    • Windows 7 64bit
    • d3131c34b421530e29825230ca4392a56c651ef6

    Description

      The crash can be reproduced with attached program, which creates and deletes a sphere in a timer loop. The material is owned by the sphere entity, so it also gets deleted. The attached application needs to be in examples folder of qt3d to work, as it is a modified example.

      The end cause for the crash is the null RenderStateNodes inside the collection parameter given to addToRenderStateSet(). RenderStateCollection::removeRenderState() is never called for destroyed materials, so the states for deleted nodes are retained.

      Qt3D SHA: faf56f50608f9391d2a73ed7c61bfdd9c2afab78

      Same crash can be also seen in scene editor e.g. when resetting the scene (File/New). Scene editor SHA: 8342887bba58cf3e43d70441ba5435c3a76e9aca

      The call stack:

      1	Qt3DRender::Render::RenderStateNode::impl	renderstatenode_p.h	69	0x7fee9fc2c5a	
      2	Qt3DRender::Render::addToRenderStateSet	renderviewjobutils.cpp	400	0x7feea17e1e2	
      3	Qt3DRender::Render::RenderView::buildDrawRenderCommands	renderview.cpp	574	0x7feea033605	
      4	Qt3DRender::Render::RenderView::buildRenderCommands	renderview.cpp	535	0x7feea0332fc	
      5	Qt3DRender::Render::RenderViewJob::run	renderviewjob.cpp	137	0x7feea17ca4a	
      6	Qt3DCore::AspectTaskRunnable::run	task.cpp	91	0x7feec2b5785	
      7	QThreadPoolThread::run	qthreadpool.cpp	99	0x66b8eaeb	
      8	QThreadPrivate::start	qthread_win.cpp	393	0x66b97ab8	
      9	_callthreadstartex	threadex.c	376	0x7feead8a105	
      10	_threadstartex	threadex.c	359	0x7feead8a357	
      11	BaseThreadInitThunk	kernel32		0x76f559bd	
      12	RtlUserThreadStart	ntdll		0x7718a2e1	
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0150566 Janne Koskinen
            e0348803 Miikka Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes