[osg-users] DefaultFont crash issue

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Fri Jan 31 02:42:20 PST 2020


Hi Anna & Glenm,

On Thu, 30 Jan 2020 at 13:00, OpenSceneGraph Users <
osg-users at lists.openscenegraph.org> wrote:

> 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.
>

Thanks for the suggestion.  I've done a code review of the
Glyph/GlyphTexture/Font code and have added a mutex lock to the
Font::assignGlyphToGlyphTexture().  There are already mutex locks
elsewhere, but there may be a need to add more.  The change is checked into
the 3.6 branch and master:


https://github.com/openscenegraph/OpenSceneGraph/commit/2e0472ba7e05e680a9a7e0bc7676d4e5a12eefa5

I have tested by running all the OSG examples and running osgtext --mt, and
don't see any regressions.  I can't confirm that the change has fixed the
crashes that you both have seen as I haven't got any example that
reproduces it.  Could you test the 3.6 branch and let me know how you get
on.

This fix isn't in 3.6.5-rc3. but will be part of the final 3.6.5 stable
release.

Cheers,
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200131/e5b0aef2/attachment.html>


More information about the osg-users mailing list