<div dir="ltr"><br><br>On Wednesday, January 29, 2020 at 11:02:48 AM UTC+1, Robert Osfield wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi Fabian,<br><br>On Wednesday, 29 January 2020 00:24:35 UTC, Fabian Roth  wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Chris,</div><div>I am using the latest openmw master with the compatibility patch from the pull request cherry picked, my build changes and minor other tweaks.<br></div><div>I use the osg rc with a only a cmake version change.</div><div>The branches are here:</div><div><a href="https://github.com/Eli2/openmw/tree/eli2-openmw-static" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FEli2%2Fopenmw%2Ftree%2Feli2-openmw-static\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGetoI2E02suxNNO_1YXAP3WKE33A';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FEli2%2Fopenmw%2Ftree%2Feli2-openmw-static\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGetoI2E02suxNNO_1YXAP3WKE33A';return true;">https://github.com/Eli2/<wbr>openmw/tree/eli2-openmw-static</a><br></div><div><a href="https://github.com/Eli2/OpenSceneGraph/tree/eli2-openmw-static" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FEli2%2FOpenSceneGraph%2Ftree%2Feli2-openmw-static\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEf_l2_Hek_00jweJuvhcS25Vmdfw';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FEli2%2FOpenSceneGraph%2Ftree%2Feli2-openmw-static\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEf_l2_Hek_00jweJuvhcS25Vmdfw';return true;">https://github.com/Eli2/<wbr>OpenSceneGraph/tree/eli2-<wbr>openmw-static</a></div><div><br></div><div>By now i strongly suspect i run into the "Static Initialization Order Fiasco", as described here:</div><div><a href="https://cryptopp.com/wiki/Static_Initialization_Order_Fiasco" rel="nofollow" target="_blank" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fcryptopp.com%2Fwiki%2FStatic_Initialization_Order_Fiasco\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEns8n2h7EWXkKoxvgNYj4sg5OUoQ';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fcryptopp.com%2Fwiki%2FStatic_Initialization_Order_Fiasco\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEns8n2h7EWXkKoxvgNYj4sg5OUoQ';return true;">https://cryptopp.com/wiki/<wbr>Static_Initialization_Order_<wbr>Fiasco</a></div><div><br></div><div>I am currently looking into why my build uses the default font.<br></div></div></blockquote><div><br></div><div>The way that the singleton methods are done is an attempt to resolve the construction order issue, but l don't recall a focus on the destruction side.  It could well be an issue.</div><div><br></div><div>One workaround might be to add a mutex directly to the Font objects that are being destructed rather than using the global one.  Or, to explicitly clear the ObjectCache on destruction rather than leaving it to static clean up.  The later would be my preferred approach.</div><div><br></div><div>A call to:</div><div><br></div><div>   osgDB::Registry::instance()-><wbr>getObjectCache()->clear();</div><div><br></div><div>In application clean up should be sufficient, or force the destruction of the Registry singleton:</div><div><br></div><div>   osgDB::Registry::instance(<wbr>true);   // passing in true forces the destruction, yes a bit hacky... the OSG has a long history so can't recall the circumstances of that addition...<br></div><div><br></div><div>I will hold the 3.6.5 release back till we have some conclusion on this issue, in case we need to make changes to the core OSG.<br></div><div><br></div><div>Cheers,<br></div><div>Robert.<br></div></div></blockquote><div> </div><div>Hi Robert,</div><div>Thank you for the help.</div><div>Manually clearing the registry fixed my crash on exit.</div><div>I will continue testing the next rc, so far so good.</div><div><br></div><div>Greetings,</div><div>Fabian<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/9062cb33-09fa-496a-8852-c7ffc1e826ac%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/9062cb33-09fa-496a-8852-c7ffc1e826ac%40googlegroups.com</a>.<br />