Hi Bjorn,

You need to set the DataVariance to DYNAMIC on the Drawable that you
are modifying, setting the DataVariance on the Geode won't affect the
management of threads as it's only the Drawable and StateSet leaves
that make it into the rendering backend.

Robert.

On 2 June 2014 10:26, Björn Blissing <[email protected]> wrote:
> Hi,
>
> We recently got a strange crash behavior in our software. We were fixing a 
> piece of code that caused GL_ERRORS on some platforms. When we had fixed 
> this, a new bug surfaced in a completely different part of the code base. It 
> was code that had worked for years, but suddenly it started to make our 
> software crash. I was able to solve the problem, but I had problem 
> understanding why it started to crash all out of a sudden. So I tried to 
> reduce the bug to a smaller working set.
>
> The crash results from a null pointer exception in operator() inside 
> TemplateAttributeDispatch in ArrayDispachers.cpp.
>
> See attached example for code that crashes when the variable:
> useCrashProneWayOfSettingVertexColor is set to TRUE.
>
> At first I though the problem was that we had multiple geometry sharing the 
> same vertex color array. But that was not the problem. The problem was the 
> way we changed the colors in the array. The old (and previously working) way 
> of doing it was to use a node callback on the geode and in that callback 
> clear and then fill the array with new values. (But this is the version that 
> started to crash). So we changed the callback to iterate over the color array 
> and changing the values instead.
>
> But I still have a bit of a problem with understanding why the first 
> alternative would not work? Clearing and refilling the color array inside a 
> node callback should be safe, but apparently not?
>
> /Björn
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=59617#59617
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to