Commit Graph

4035 Commits

Author SHA1 Message Date
James Turner
3b5ed81216 Crash-fix: make mat-lib reference counted.
Make SGReaderWriterOptions own the material lib it's passing to
loader code, so it cannot be freed unexpectedly.
2014-01-19 16:45:01 +00:00
Torsten Dreyer
12d0d4140e Version 3.1.0 2014-01-17 21:59:58 +01:00
Torsten Dreyer
d6c8008978 No double-zero for the version number :-/ 2014-01-17 21:49:13 +01:00
James Turner
488ca0fcc5 Remove a noisy log message from the Terrasync code. 2014-01-17 17:46:46 +00:00
James Turner
dfd15cadab Bug-fix - short-circuit path validation.
When an SGPath is empty, don't bother stat()-ing. This avoids
an uninitialized-memory read inside the C-runtime on Windows.
2014-01-17 17:26:29 +00:00
James Turner
1613257bdc Ensure type tag of contextId binding is set.
(Otherwise defaults to DOUBLE).
2014-01-17 16:27:54 +00:00
Torsten Dreyer
1061580118 Version 3.0.0 2014-01-16 21:47:13 +01:00
James Turner
7184828a58 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.
2014-01-15 21:56:26 +00:00
Thomas Geymayer
0428adff03 CanvasMap: Expose property screen-range.
Only allowing a hardcoded screen range of 200 units
is not very flexible...
2014-01-09 19:36:38 +01:00
James Turner
04246f0a63 HTTP: tweak response parsing.
Signal a parse failure via an exception, instead of via a status
code, since this is hard to disambiguate from a valid server-side
status code.
2014-01-07 16:22:10 +00:00
James Turner
61df58d651 Terrasync: update fixes.
- Fix a nasty issue when updating existing repositories, which could
cause repository corruption and hence repeated re-syncs.
2014-01-07 14:24:01 +00:00
James Turner
1bd9a440e8 HTTP: tweak for malformed header handling. 2014-01-07 14:24:01 +00:00
Thomas Geymayer
d82c8eb945 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.
2014-01-06 12:17:59 +01:00
James Turner
becbad7ea4 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.

(Requires an accompanying FG change)
2014-01-06 08:26:48 +00:00
Thomas Geymayer
2335796a28 Fix track-to animation basic tracking without slave object 2014-01-05 19:38:03 +01:00
James Turner
c6330b64f6 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)
2014-01-03 19:51:58 +00:00
James Turner
df57a23512 #1207: Add helper to get Unix time in GMT
On Windows, time() is returning a value which if offset by the
selected time-zone. Provide a variant which is always in GMT.
2014-01-01 21:03:24 +00:00
Thomas Geymayer
aea71cf0af HTTPFileRequest: only save file if status == 200 2013-12-30 01:31:47 +01:00
James Turner
fb54386f8d 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)
2013-12-19 17:20:06 +00:00
Rebecca Palmer
4d931b6109 Fix test failure on char-unsigned-by-default architectures (eg. ARM)
(from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722115 )
2013-12-19 15:02:07 +00:00
Rebecca Palmer
407c7a10f5 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.)
2013-12-19 15:02:07 +00:00
James Turner
16fa4d1d17 Security: fix 0777 directory permissions to 0755. 2013-12-19 14:56:23 +00:00
James Turner
1ecccd43d4 Fix a typo breaking Mac build. 2013-12-15 20:55:02 +00:00
James Turner
2edbb1cf8b Reset: clear some property references. 2013-12-15 20:48:30 +00:00
Thomas Geymayer
8dccbe8029 SGPath: some tweaks/fixes/typo on permission checker. 2013-12-12 21:27:27 +01:00
Thomas Geymayer
031c833e4d SGPath: add support for custom PermissionChecker
Allow to add permission checks (read/write-access) for
eg. limiting access based on IORules.
2013-12-12 21:04:26 +01:00
James Turner
890cc46825 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)
2013-12-10 17:37:37 +00:00
James Turner
6b0f7e8512 Quiet a message. 2013-12-09 23:28:52 +00:00
Thomas Geymayer
7a220921f0 Canvas: one global SystemAdapter is enough.
This also fixes elements requiring a SystemAdapter without
being assigned to a Canvas (eg. because they are desktop
elements).
2013-12-09 23:07:17 +01:00
Thomas Geymayer
7ef9acda5d Add ListDiff helper (for fast array differences). 2013-12-08 18:48:57 +01:00
Thomas Geymayer
2a6d62e6f7 Fix some unused/uninitialized variables. 2013-12-07 13:43:17 +01:00
Thomas Geymayer
42b50bd7f7 SGPropertyNode: add removeAllChildren() method 2013-12-07 13:42:15 +01:00
Thomas Geymayer
2c3f44ae11 Canvas: ensure all canvasses are destroyed
- For shutdown/reset make sure all properties describing a canvas
   are removed and also not restored after the reset.
2013-12-07 13:40:22 +01:00
Stuart Buchanan
b7662f16e5 Work around apparent OSG 3.2.0 normal binding bug. 2013-12-06 22:12:52 +00:00
Stuart Buchanan
5bc535a8d2 PagedLOD for random trees, buildings and objects. 2013-12-06 20:20:46 +00:00
James Turner
3ec9c7ae6e 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)
2013-12-06 18:14:48 +00:00
James Turner
e326d0c756 Work around a clang/libc++ issue. 2013-12-06 18:03:35 +00:00
Thomas Geymayer
7c5434a99f cppbind: don't leak nasal references for Ghost methods. 2013-12-04 11:15:11 +01:00
James Turner
26d9256ee9 Reset: hook to clear the effects cache. 2013-12-04 09:12:51 +00:00
James Turner
053e761d8f Reset: don't leak EffectPropertyListener.
Track and free listeners from effect expressions.
2013-12-03 21:36:18 +00:00
Clément de l'Hamaide
5861b52cff Implement UTF-8 to Latin1 converter 2013-12-01 18:48:05 +01:00
Thomas Geymayer
66193d7283 cppbind: Fix detecting derived Ghosts 2013-12-01 12:35:02 +01:00
Thomas Geymayer
dfb07f359e 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).
2013-12-01 01:18:13 +01:00
Thomas Geymayer
6fe1433497 Canvas: allow removing placement factories. 2013-11-24 15:39:03 +01:00
bcoconni
01ace109ba Fixed a crash: the singleton needs to be instantiated the first time SGCommandMgr::instance() is called 2013-11-24 14:50:11 +01:00
bcoconni
8e01acaa12 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.
2013-11-24 12:20:26 +01:00
James Turner
7bbec8dbcb Reset: allow re-init of Nasal Ghosts.
After discussion with Thomas, reset needs the scenario this assert
was designed to guard against, so removing it for now.
2013-11-23 20:06:47 +00:00
James Turner
10375086ed Allow Command-manager singleton to be deleted.
(Shutdown can delete commands in an orderly way)
2013-11-23 20:00:23 +00:00
James Turner
dd367daac9 Fix another SVN crash on failure. 2013-11-19 21:33:50 +00:00
Martin Spott
27063d0c32 Repository name preferred 2013-11-16 10:44:17 -08:00