On Tue, Apr 24, 2012 at 10:06 AM, James Turner <[email protected]> wrote:
> It's probably a reference counting issue. FGAirport is a FGPositioned and
> hence reference counted. The Nasal Ghost is supposed to deal with this -
> when we create a ghost around the airport, we take a reference
> (SGReferenced::get) and when Nasal garbage-collects the ghost, the
> reference count is decremented. (SGReferenced::put)
>
> If the reference count hits zero, the airport will be freed, leading to
> the issue you see. But that would imply there's nothing else holding a
> reference to the airport, and that's not the case, because the the spatial
> index (the octree) in positioned.cxx holds a reference to everything at the
> moment.
>
> If I'd screwed up the ref-counting logic completely, I'd expect it to be
> crashing for me exactly the same, and it's not. Very weird.
>
> So likely I have made a subtle screw-up that only affects Linux. You could
> test this by commenting out the call to
>
> SGreferencd::put()
>
> in sgrefGhostDestroy - references will be leaked, but if it stops the
> crash then we can be sure it's a ref-counting bug.
Hi James,
Based on two runs with out crashing, that seems to prevent the crash ...
Curt.
--
Curtis Olson:
http://www.atiak.com - http://aem.umn.edu/~uav/
http://www.flightgear.org - http://gallinazo.flightgear.org
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel