You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our multi-threaded application, we have a thread that renders osg, and
another one that displays a GUI. That GUI changes ocean properties, such as
refraction.
When enabling/disabling refraction, a null-pointer is dereferenced in
OceanScene::ViewData::cull()
I do not know the exact sequence that causes this, but I simply added a check
for null-pointers and the problem went away.
Here's a patch file of my modifications in OceanScene.cpp.
Any idea why this might happen?
Original issue reported on code.google.com by [email protected] on 13 Feb 2012 at 8:51
Hi Francis,
Thanks for pointing this out. I'm quite surprised this happens when you
enable/disable refractions - all those functions do is set a flag for
OceanScene to apply the setting on the next update traversal. I'll have a look
at the code and see if anything jumps out at me. Although I have to confess
I've not tested osgOcean in a multi-threaded application.
In the mean time I've applied your patch.
Cheers,
Kim.
I've tried to figure out what was going on, but could not find out the exact
sequence. The lead I was following before I gave up and wrote this patch is as
follows:
OceanScene::ViewData::init() will create the "osgOcean_EnableRefractions"
variable with the current value from the OceanScene. Then it will look again at
the value from the scene and create cameras. The value might have changed in
the meanwhile.
Hope this helps.
Thank you very much Kim, for the fast response time. It's really appreciated.
Regards,
Francis
Original issue reported on code.google.com by
[email protected]
on 13 Feb 2012 at 8:51Attachments:
The text was updated successfully, but these errors were encountered: