We had some confusion between two error codes, meaning we would log an
error (and treat as a failure) a pure ocean 1x1 area, even though this
was entirely correct and expected behaviour.
Terrasync.cxx expected REPO_ERROR_NOT_FOUND, we need to convert the
file-level error to that, and avoid logging a warning.
Fix various cases where re-init could get things blocked. Remove the
duplicate storage of the active paths; now we always check the primary
data, and hence it can’t be out of sync.
Also remove the obsolete persistent cache code.
Fixes some of the issues discussed in:
https://sourceforge.net/p/flightgear/codetickets/2308/
Further improvements still to come, especially to retry on a better
schedule for intermittent connections.
The previous catch policy breaks unit-testing, since CppUnit relies
on a special Exception type.
This could be made conditional based on testing or not, but trying the
simple way initially.
It seems that clang++ headers #include <version>, which found simgear/version
because we need to put singear/ in include path for some code to compile.
This allows one to see what properties are being used to control moving objects
such as needles and dials in the cockpit, or external moving objects such as
bomb doors.
The system works by optionally creating new animations with type=pick for all
animated objects. A side affect of this is that yellow highlighting of controls
from Ctrl-C will also highlight instrument needles in the cockpit and external
animations such as flaps, rudder, gear etc.
src/Model/acmodel.cxx:simgear::SGModelLib::loadModel() takes new param bool
autoTooltipsMaster and int autoTooltipsMasterMax, which is added into the
SGReaderWriterOptions that is passed to loadFile(). autoTooltipsMasterMax
limits the maximum number of tooltips, which appears to be necessary on 777 -
more than 45 can cause fg to fail to make progress.
The auto-generated tooltips show the name of the object and also the names and
values of the properties that control the animation. For example the tooltip
for a fuel gauge might say 'consumables/fuel/tank[1]/level-gal_imp=0.23456789'.
simgear/props/props_test.cxx: test for self-unregister.
SGPropertyNode::removeChangeListener() used to modify the _listeners vector or
even delete it and set _listeners to NULL, if a listener was removed.
This could cause a SEGV if removeChangeListener() was called from
a listener, because listeners are called from methods such as
SGPropertyNode::fireValueChanged() which iterate through _listeners and don't
expect it to be changed to NULL.
The fix here is to keep a track of whether we are iterating through the
_listeners vector; if we are, SGPropertyNode::removeChangeListener() sets the
entry to NULL, instead of removing it.
We have a new internal function forEachListener() which takes
care of the iterating details - incrementing/decrementing the new
_listeners->_num_iterators count and skipping NULL entries. Before returning,
if _num_iterators is now zero it removes any NULL entries in the vector of
listeners.
The nListeners() member is no longer inline, because it needs to ignore NULL
entries in the vector. And _listeners now points to an internally-defined
struct which contains a new _num_iterators as well as the vector of listeners.
Added self-unregister test to simgear/props/props_test.cxx.