[osg-users] DefaultFont crash issue
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Thu Jan 30 05:00:15 PST 2020
I too have seen thread-related issues when creating Text from multiple
threads. I was never able to find the time to debug it to conclusion; but I
suspect that a shared Font object that needs to create new Glyph textures
isn't doing so in a thread-safe manner. For example,
Font::assignGlyphToGlyphTexture() modifies some structures without Mutex
protection. Just something to check.
Glenn Waldron / osgEarth
On Thu, Jan 30, 2020 at 4:36 AM OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:
> Hi Anna,
>
> On Wed, 29 Jan 2020 at 22:38, OpenSceneGraph Users <
> osg-users at lists.openscenegraph.org> wrote:
>
>> In relation to the DefaultFont crash issue, I noticed that my code would
>> occasionally crash on creation of osgText::Text.
>> Most of my osgText::Text is not created on the main thread.
>> In order to avoid the DefaultFont crash, I created a
>> osg::ref_ptr<osgText::Font> necessaryFont =
>> osgText::Font::getDefaultFont();
>> which sticks around from the beginning of the program to the end and
>> doesn't get used by anything.
>> After I did this, my code no longer crashed on osgText::Text creation.
>> The OpenSceneGraph version used is 3.6.4 and on both Windows (7 64-bit)
>> and Linux (Ubuntu 16.04).
>> Also when I was previously using OpenSceneGraph version 3.6.2,
>> osgText::Text creation never crashed.
>>
>
> This sounds like a bug somewhere in the initialization of the Font, to
> investigate I'll need to reproduce the problem on my system.
>
> Does the multi-theaded test code path in osgtext fail for you as well:
>
> osgtext --mt
>
> I have just tried this on my Kubunutu 18.04 system with the 3.6 branch and
> it works fine.
>
> Could you create a small test program that illustrates what you are doing?
>
> Cheers,
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200130/745bc968/attachment.html>
More information about the osg-users
mailing list