Open Blast545 opened 2 years ago
Hunch: The fixes that are claimed to introduce the crash merely fixed improper shutdown (i.e. memory leaks) in gz-rendering.
A common cause of bugs is having live shared_ptrs when its manager got shutdown, like the following example:
Ogre::MaterialPtr material = ...;
Ogre::Root::getSingleton().shutdown( ... );
material.reset(); // Ooops
This can also happen if the MaterialPtr (or any other shared_ptr) is part of a class:
class Foo
{
Ogre::MaterialPtr material;
};
void myFunction()
{
Foo foo;
foo.material = ...;
Ogre::Root::getSingleton().shutdown( ... );
// Ooops at the end of myFunction foo.~Foo() will be called which calls material.reset();
}
This may be silently working fine in one RenderSystem but happens to cause trouble with Metal RenderSystem (or perhaps Metal is shutdown too early).
A callstack would help diagnosing the crash cause.
Environment
Description
Steps to reproduce
Output
Reference failures: First time appearing in the buildfarm: https://build.osrfoundation.org/job/ignition_rendering-ci-ign-rendering6-homebrew-amd64/50/ Most recent: https://build.osrfoundation.org/job/ignition_rendering-ci-ign-rendering6-homebrew-amd64/59/
This is totally related to the changes introduced with #617 and #623, can I ask you to take a look? @iche033
I think this test regression that is appearing on gz-sensors it's also related to this issue: https://build.osrfoundation.org/job/ignition_sensors-ci-ign-sensors6-homebrew-amd64/23/console