James Turner [Thu, 13 Feb 2014 18:49:16 +0000 (18:49 +0000)]
Revise SGBucket::get_width_m
- remove the 0.5 degree offset away from the equator, which was
causing wrap-around at the poles
- add a new helper to get the highest latitude of a tile (which may
be +/- 90 for the polar cap tiles), and use this to compute radius
- special case the polar-caps and return a fixed, small width so
the tile-manager loads all tiles.
James Turner [Thu, 13 Feb 2014 12:36:06 +0000 (12:36 +0000)]
Revised set_bucket implementation.
- sink some inline methods into the .cxx file
- add isValid test to SGBucket
- sgGetBuckets won't return invalid buckets near the poles
- additional unit tests
Thomas Geymayer [Sat, 8 Feb 2014 18:10:26 +0000 (19:10 +0100)]
Put unused attributes in the property tree while parsing.
Store unhandled xml attributes in a subnode named _attr_ for each
node on parsing propertylist files. This allows retrieving them at
a later stage where there is no access to the source xml file any
more.
James Turner [Wed, 15 Jan 2014 21:56:16 +0000 (21:56 +0000)]
Support a 'clear' operation on SGBinding.
Needed to bug-fix a problem with the menubar on Mac - post-3.0 I will
change the behaviour of SGBinding's destructor to avoid the property
copies in other use-cases.
Thomas Geymayer [Mon, 6 Jan 2014 11:10:39 +0000 (12:10 +0100)]
Socket: do not crash on writing to broken pipe.
Writing to a closed socket on all Unix/Linux systems raises
a SIGPIPE signal which immediately closes the program. Disabling
raising of SIGPIPE allows proper error handling by checking the
return values of send/sendto and getting the EPIPE in errno.
James Turner [Mon, 6 Jan 2014 08:26:42 +0000 (08:26 +0000)]
Crash fix: use cache to find materials.
Add a thread-safe cache of the currently valid materials, to avoid
the osgDB thread making repeated SGCondition evaluations in conflict
with the main thread.
James Turner [Fri, 3 Jan 2014 19:51:58 +0000 (19:51 +0000)]
Bugs 1207, 1301
Only apply the fix for time-zone offsetting on Windows, since Unix
is handling mktime differently. (Arguably we should also apply a
conversion for Unix systems, but the previous logic worked)
James Turner [Thu, 19 Dec 2013 17:20:06 +0000 (17:20 +0000)]
Bugfix: remove SGSky minimum distance check.
Without this, various sky rendering modes exhibit artefacts in low-
visibility conditions. The cost of always rendering the dome is
negligible. (And Rembrandt already had to work this way)
Rebecca Palmer [Tue, 17 Dec 2013 17:40:33 +0000 (17:40 +0000)]
Fix buffer overflow CVE-2012-2091 (thanks to Saikrishna Arcot)
https://bugs.launchpad.net/ubuntu/+source/simgear/+bug/1077624
(discussed in comments 65-78)
(This is already fixed in 2.12 but appears to have been forgotten in 2.99;
the other vulnerabilities described there are already fixed.)
James Turner [Tue, 10 Dec 2013 17:37:37 +0000 (17:37 +0000)]
Reset: alternate property copying strategy.
Search the tree for leaves / sub-trees with a particular attribute set.
This permits both sparse selection as well as selection by sub-tree.
(This is needed for PRESERVE attribute, and once new reset is switched
on, will enable 'normal' copyProperties to revert to ignoring
attributes completely)
James Turner [Fri, 6 Dec 2013 18:14:48 +0000 (18:14 +0000)]
Canvas: clear elements in shutdown()
- without this change, elements aren't un-ref-ed and hence destroyed
until the actual dtor runs, which is too late (other systems may be
destroyed already)
Thomas Geymayer [Sun, 1 Dec 2013 00:18:13 +0000 (01:18 +0100)]
cppbind: make ghost_type static to keep same pointer on reset.
Using a static naGhostType ensures that always the same
address is used for the same ghost and prevents ghost_types
from getting invalid (eg. on reset).
bcoconni [Sun, 24 Nov 2013 11:20:26 +0000 (12:20 +0100)]
Added more explicit error messages to the property lists parser.
More specifically, each time an error or a warning is issued the location of the corresponding XML tag (file name an line number) is reported.
bcoconni [Mon, 11 Nov 2013 18:06:44 +0000 (19:06 +0100)]
Removed the 'using::std' instructions from the headers as per James Turner request.
Also took this opportunity to add a check in XMLVisitor::savePosition() against a null pointer.