fix(ui): re-layouting during render may crash
Description
When something modify the layout when a 3D scene is being rendered, an exception may occur.
desc: Compositor VolumeEntries1 does not declare texture VolumeEntries1texture
src: Ogre::SceneManager::_setPass
This re-layouting is often linked to progress bar that can appear with asynchronous job.
An example of stacktrace:
KernelBase.dll!00007ffc5d3e5b0c() (Source inconnue:0)
vcruntime140d.dll!00007ffc23febbf1() (Source inconnue:0)
OgreMain_d.dll!Ogre::ExceptionFactory::_throwException(Ogre::Exception::ExceptionCodes code, int number, const std::string & desc, const std::string & src, const char * file, long line) Line 264 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\include\OgreException.h:264)
OgreMain_d.dll!Ogre::ExceptionFactory::throwException(Ogre::Exception::ExceptionCodes code, const std::string & desc, const std::string & src, const char * file, long line) Line 281 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\include\OgreException.h:281)
OgreMain_d.dll!Ogre::SceneManager::_setPass(const Ogre::Pass * pass, bool shadowDerivation) Line 877 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreSceneManager.cpp:877)
OgreMain_d.dll!Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::visit(const Ogre::Pass * p, std::vector<Ogre::Renderable *,std::allocator<Ogre::Renderable *>> & rs) Line 1343 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreSceneManager.cpp:1343)
OgreMain_d.dll!Ogre::QueuedRenderableCollection::acceptVisitorGrouped(Ogre::QueuedRenderableVisitor * visitor) Line 432 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreRenderQueueSortingGrouping.cpp:432)
OgreMain_d.dll!Ogre::QueuedRenderableCollection::acceptVisitor(Ogre::QueuedRenderableVisitor * visitor, Ogre::QueuedRenderableCollection::OrganisationMode om) Line 412 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreRenderQueueSortingGrouping.cpp:412)
OgreMain_d.dll!Ogre::SceneManager::SceneMgrQueuedRenderableVisitor::renderObjects(const Ogre::QueuedRenderableCollection & objs, Ogre::QueuedRenderableCollection::OrganisationMode om, bool lightScissoringClipping, bool doLightIteration, const std::vector<Ogre::Light *,std::allocator<Ogre::Light *>> * _manualLightList, bool _transparentShadowCastersMode) Line 1428 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreSceneManager.cpp:1428)
OgreMain_d.dll!Ogre::SceneManager::renderBasicQueueGroupObjects(Ogre::RenderQueueGroup * pGroup, Ogre::QueuedRenderableCollection::OrganisationMode om) Line 1538 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreSceneManager.cpp:1538)
OgreMain_d.dll!Ogre::SceneManager::_renderQueueGroupObjects(Ogre::RenderQueueGroup * pGroup, Ogre::QueuedRenderableCollection::OrganisationMode om) Line 1520 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreSceneManager.cpp:1520)
OgreMain_d.dll!Ogre::SceneManager::renderVisibleObjectsDefaultSequence() Line 1319 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreSceneManager.cpp:1319)
OgreMain_d.dll!Ogre::SceneManager::_renderVisibleObjects() Line 1771 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\include\OgreSceneManager.h:1771)
OgreMain_d.dll!Ogre::SceneManager::_renderScene(Ogre::Camera * camera, Ogre::Viewport * vp, bool includeOverlays) Line 1117 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreSceneManager.cpp:1117)
OgreMain_d.dll!Ogre::Camera::_renderScene(Ogre::Viewport * vp) Line 498 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreCamera.cpp:498)
OgreMain_d.dll!Ogre::Viewport::update() Line 145 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreViewport.cpp:145)
OgreMain_d.dll!Ogre::RenderTarget::_updateViewport(Ogre::Viewport * viewport, bool updateStatistics) Line 196 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreRenderTarget.cpp:196)
OgreMain_d.dll!Ogre::RenderTarget::_updateAutoUpdatedViewports(bool updateStatistics) Line 176 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreRenderTarget.cpp:176)
OgreMain_d.dll!Ogre::RenderTarget::updateImpl() Line 153 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreRenderTarget.cpp:153)
OgreMain_d.dll!Ogre::RenderTarget::update(bool swap) Line 537 (d:\gitlab-builds\dWUVzT6w\0\sight\sight-vcpkg\vcpkg\buildtrees\ogre\src\v14.0.1-e1473b508d.clean\OgreMain\src\OgreRenderTarget.cpp:537)
Optionally, you may give directions about how to address the issue.
Switch severity to minor if the bug is not crash or a major malfunction.
Steps to reproduce
How one can reproduce the issue - this is very important. If the bug depends on a particular environment or platform, please give all relevant details. Paste any relevant logs. Please use code blocks (```) to format these.
Functional specifications
If there is any change to the workflow, UX/UI design, screenshots, etc..., please describe it here.
Technical specifications
Details of the implementation of the fix.
Test plan
Describe how you will verify that the bug is fixed.