[osg-users] Deleting still referenced object

Richard Harrison rjh at zaretto.com
Thu Jan 10 17:19:01 PST 2019


Chris Hanson wrote:
> Ok. Is this a recent issue or do you know when it appeared? That's some delicate code in there...


Yeah I noticed that there's some complex code and thread sensitive (i.e. delicate) stuff; it's taken me a long time to figure out what it's doing and why it is being done; and I'm being very careful with the changes I've made as experience tells me that it's ever so easy to make multi-threaded code worse whilst trying to make it better. Sometimes a fix to shared data isn't a fix even if it makes the problem go away, and I want to avoid doing anything stupid by careful analysis, testing and peer review.

The deleting whilst still in use as been happening occasionally for the last few years; but recently the frequency of user reports has increased which I think is probably because we are now shipping more scenery (based on OSM) that makes more use of shared models. 

Currently FG ships with a slightly modified OSG 3.4.1 and I'm building my FlightGear against master (c934172432cad368f5731ae5d682d7d6ecab7f48) and the problem is present in both versions. I'm still fairly sure that the reason is as outlined in my first post and that the fix appears to be working as expected. 

Once I'm happy with the fix, and after taking into account any advice or comments from here; I'll make a pull request.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75441#75441







More information about the osg-users mailing list