Erik Hofman
f2a96eaa6c
Stabilize the forces and moments, clean up the code some more
2020-09-10 11:41:06 +02:00
James Turner
4fc0948dbf
Fix Windows compilation
2020-09-08 21:51:57 +01:00
James Turner
e26a2ecab0
Crash:harden against malformed menu bar entries
...
If a menu-bar item is missing a <name>, we can end up building a string
from nullptr, which is a SEGV.
Reported as Sentry issue FLIGHTGEAR-1D
Will back-port to LTS once verified.
2020-09-08 14:01:39 +01:00
James Turner
830a890eff
Tests: skeleton ViewManager/Views tests
2020-09-08 12:31:42 +01:00
James Turner
1fe82206a0
Make view subscripting more robust
...
Trying to fix a crash raised by Sentry
2020-09-08 11:23:14 +01:00
James Turner
395a3e70e9
Logging: use new MANDATORY_INFO level.
...
Requires corresponding SG commit.
2020-09-08 10:59:29 +01:00
Erik Hofman
abb8ce0120
AISim: Implement a JSON configuration file reader, fix gear positions and engine thrust calculation.
2020-09-07 11:48:38 +02:00
James Turner
e46c6f587b
AIFlightPlan: remove ‘erase’ option from Decrement
...
Thankfully, the erase option to DecrementWaypoint was never used, so
remove it, since it’s … mental.
2020-09-05 11:16:36 +01:00
James Turner
f802e09c57
ASan: QtMessageContext doesn’t copy file names
...
Use the ‘file name copying’ version of log(), to avoid an ASan use-
after-free. Note this requires SG change
908496d43dd7c3a7ca1de42b0e0c21aa0498c7df
to work correctly.
2020-09-05 10:44:43 +01:00
Slawek Mikula
c9d1d58146
[Launcher] #2316 - fixed sorting in the aircraft grid/listview.
...
When there are installed the same aircrafts from different sources
(fgdata + fgaddon + git) with identical descriptions, use the URI to
provide stable sorting.
2020-09-05 10:44:43 +01:00
James Turner
f5b5828bd0
AIFlightPlan: add test for XML parsing
...
This meant some slight refactoring to expose some easier APIs for
testing, but the normal methods should be unaffected.
2020-09-05 10:44:43 +01:00
James Turner
3a3ff07883
Start testing FGAIFlightPlan
2020-09-05 10:44:43 +01:00
Erik Hofman
0272a4fa3f
Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next
2020-09-04 16:03:39 +02:00
Erik Hofman
a95aaab0f4
use in-place declarations and clean up the code a bit
2020-09-04 16:03:04 +02:00
James Turner
2147eb8da9
Missed fixes from previous Yasim commit.
2020-09-04 13:05:11 +01:00
James Turner
d2fb16e071
Fix mismatched new/strdup/delete[] froub by ASan
...
See: https://sourceforge.net/p/flightgear/codetickets/2367/ for the
issue. Switch to using std::string instead of char*, and hence any
need to manually free the memory.
2020-09-04 12:41:56 +01:00
James Turner
4402d7b81d
NavCache: only remove if the file exists.
...
Otherwise we block trying to re-create the cache, which is dumb. This
showed up as Sentry issue:
https://sentry.io/organizations/flightgear/issues/1875854826
Will back-port to 2020.2 once verified.
2020-09-04 12:29:45 +01:00
James Turner
1fd5502e9b
Nasal removecommand: use a return value
...
Change removecommand() to indicate success or failure via a return
value: 1 for success, 0 for failure.
2020-09-04 10:56:41 +01:00
Erik Hofman
c6cb845f90
Merge branch 'next' of ssh://git.code.sf.net/p/flightgear/flightgear into next
2020-09-04 11:45:33 +02:00
Erik Hofman
6bd87586b0
Fix stability: CL and CD must be negative
2020-09-04 11:44:37 +02:00
Erik Hofman
e8fe8345bf
Start using or own types for vectors and matrices for sharter and more readable code. Fix some sign issues
2020-09-04 10:58:18 +02:00
James Turner
9090d91be3
Fix a missed pu.h rename.
2020-09-03 20:25:14 +01:00
James Turner
61c6cfb050
AIAircraft: fix type of non-Swift aircraft
2020-09-03 17:51:40 +01:00
James Turner
d1fc4b58cb
Start creating tests of AIModel code
...
First test just creates the manager, and ensures the user aircraft
updates in sync with the real aircraft.
2020-09-03 17:51:40 +01:00
Erik Hofman
ce1e85f656
Get the AISim FDM in a semi-flyable state
2020-09-03 14:39:38 +02:00
Erik Hofman
bdc66d5535
Rename our own version of pu.h to FlightGear_pu.h per James advice. Remove inclusion of pu.h where it isn't requirted.
2020-09-03 12:56:01 +02:00
Erik Hofman
0451816a82
Add our own version of pu.h and use it to prevent bug #2362 on all systems. This can be done since pu.h is to be considered in code freeze forever anyhow.
2020-09-01 10:12:42 +02:00
Scott Giese
ad2bf3cd09
Revert "Resolve Deprecation Warnings"
...
This reverts commit 8cede3f065
.
2020-08-30 17:58:36 -05:00
Scott Giese
7b914bc5fb
Removed unreachable code
2020-08-29 11:20:40 -05:00
Scott Giese
a87d9ca76f
BezierNode: logic error in initialization
2020-08-29 11:03:31 -05:00
Scott Giese
532d879f72
Dead code removal
2020-08-29 11:00:55 -05:00
Scott Giese
e079f0d1eb
Resolve warnings: comparison between unsigned and signed types
2020-08-29 10:15:02 -05:00
Scott Giese
8cede3f065
Resolve Deprecation Warnings
2020-08-29 10:12:35 -05:00
James Turner
37d820120d
Unit-testing: tests for Nasal SGCommand API
...
Test adding/removing/invoking commands, and error handles when
duplicate adding and removing a command name.
2020-08-26 17:20:58 +01:00
James Turner
66f938be8e
Sentry: fix naming clash.
2020-08-26 15:29:55 +01:00
James Turner
a882b75c9b
Sentry: fix fatal-error event type.
2020-08-26 13:57:44 +01:00
James Turner
5dbab6e90e
CMake: overhaul how we find 3rd-party files
...
Handle the standard windows-3rd-party setup (used by fgmeta) with no
extra options, and also handle the slightly odd setup we use on Jenkins.
Try to tolerate all permutations of setting MSVC_3RDPARTY_ROOT to
different places in the hierarchy.
We no longer try to guess Boost_INCLUDEDIR by looking at parent dirs of
MSVC_3RDPARTY_ROOT, since this seemed kind of bad to me. Let’s try
it and see.
2020-08-26 13:57:24 +01:00
Automatic Release Builder
9d775cdfe7
Fix duplicate init of Sentry on reset
2020-08-26 09:52:16 +01:00
Automatic Release Builder
73b4c3839d
Sentry: more breadcrumbs
2020-08-26 09:52:09 +01:00
Automatic Release Builder
d9b7435dab
Sentry logging of exceptions, fatal errors
2020-08-26 09:52:02 +01:00
Automatic Release Builder
bade1ec4c6
Attempt to fix ref-ptr crash on exit
...
Fixing Sentry issue FLIGHTGEAR-9
2020-08-26 09:51:55 +01:00
James Turner
06b026a218
GUI/knob animation: fire release binding over PUI
...
Fire the release bindings for active pick callbacks, even for a ‘handled’
mouse release. This means knobs, etc will fire their release binding
if the mouse is over a PUI dialog.
https://sourceforge.net/p/flightgear/codetickets/2347/
2020-08-25 20:48:29 +01:00
James Turner
8a1109160b
Fix Nasal ‘removecommand’ so it actually works.
2020-08-25 19:23:43 +01:00
James Turner
cf424e4344
Rename buildId header file
...
Avoid the very common name ‘build.h’ in favour of something clearer
and FlightGear specific.
2020-08-24 15:05:16 +01:00
James Turner
178d1beb80
Cmake: Remove version.h machinery
...
Merge this file into config.h, this means we can save an include path
everywhere.
2020-08-24 15:04:24 +01:00
James Turner
6dfbda9bd1
Cmake: ifx abuse of OBJECT libraries
...
Use STATIC intermeidate libs for these pieces, to keep older CMake
versions happy.
2020-08-24 13:19:57 +01:00
James Turner
11932bac4e
Trying to fix EnvironmentManager shutdown crash.
...
Not sure this will fix it, but it’s the only scenario I can spot so far,
so let’s try anwyay.
Reported at Sentry as: FLIGHTGEAR-8
2020-08-24 10:25:09 +01:00
James Turner
4fe8a118cc
Traffic: Improve iterator robustness
...
Attempting to fix Sentry crash FLIGHTGEAR-B, crash on shutdown. Not
sure this is quite right, but the logic is clearer and we handle
invalid iterators better.
2020-08-24 10:23:50 +01:00
James Turner
95fd692af1
CMake: move install() rule for compatability
...
Older CMake versions can’t install(TARGET…) from a different directory.
2020-08-23 21:50:36 +01:00
James Turner
476b9eb3d1
Ensure OSG headers are founding building the UI
2020-08-23 21:10:56 +01:00
James Turner
f7dc02d009
Fix Swift build with CMake
2020-08-23 11:31:37 +01:00
James Turner
218df89b29
Embedded resources: better cmake command
...
Use add_custom_command and an intermediate OBJECT library to avoid
rerunning fgrcc unless the XML input file has actually changed.
2020-08-23 11:31:37 +01:00
James Turner
47ff3e9f67
Improve CMake strucutre
2020-08-23 11:31:37 +01:00
Scott Giese
63d3dd4cbd
REVIEW: Memory Leak - FLITEVoiceSynthesizer ctor
...
1,696 bytes in 4 blocks are definitely lost in loss record 6,145 of 6,440
2020-08-23 00:21:11 -05:00
Scott Giese
0ce2fdf190
REVIEW: Memory Leak - PositionedOctree.cxx
...
1,728 bytes in 36 blocks are still reachable
1,280 bytes in 8 blocks are still reachable
480 bytes in 3 blocks are still reachable
2020-08-23 00:15:42 -05:00
Scott Giese
dc1519bfe8
REVIEW: Memory Leak - screensaver_control
...
2,056 bytes in 1 blocks are still reachable
352 bytes in 1 blocks are indirectly lost
320 bytes in 1 blocks are still reachable
2020-08-22 22:59:33 -05:00
Scott Giese
f84a522f12
REVIEW: Memory Leak - FGPUIMenuBar::add_enabled_listener()
...
3,920 (3,136 direct, 784 indirect) bytes in 98 blocks are definitely lost
2020-08-22 22:22:47 -05:00
Scott Giese
9d6239031f
REVIEW: Memory Leak - wxRadarBg::init()
...
4,096 bytes in 1 blocks are indirectly lost
2020-08-22 21:48:52 -05:00
Scott Giese
6c14eaa6e8
REVIEW: Memory Leak - FGLinuxEventInput::postinit()
...
4,995 (40 direct, 4,955 indirect) bytes in 1 blocks are definitely lost
2020-08-22 21:26:03 -05:00
Scott Giese
8e9e16bac6
REVIEW: Memory Leak - Branch::childAtIndex
...
9,152 bytes in 52 blocks are still reachable
2020-08-22 18:01:15 -05:00
Scott Giese
f21eb3a484
REVIEW: Memory Leak - Options ctor
...
15,768 bytes in 219 blocks are still reachable
2020-08-22 17:23:55 -05:00
Scott Giese
14b28d4f72
REVIEW: Memory Leak - FGLinuxEventInput::posinit()
...
55,004 (40 direct, 54,964 indirect) bytes in 1 blocks are definitely lost
2020-08-22 17:05:35 -05:00
Scott Giese
91f8b4dbef
REVIEW: Memory Leak - ClipboardX11 ctor
...
55,397 (104 direct, 55,293 indirect) bytes in 1 blocks are definitely lost
2020-08-22 17:00:24 -05:00
Scott Giese
9d4a940bc0
REVIEW: Memory Leak - wxRadarBg::init()
...
277,296 (16 direct, 277,280 indirect) bytes in 1 blocks are definitely lost
2020-08-22 16:53:10 -05:00
James Turner
94ff2f8ee4
Load APT1000 comm frequencies correctly.
...
See discussion in:
https://sourceforge.net/p/flightgear/codetickets/2336/
2020-08-19 11:48:50 +01:00
James Turner
5b3cdb49c5
Sentry: add breadcrumb on scenery reload
2020-08-19 11:47:34 +01:00
Automatic Release Builder
bbce95b5ea
Updates for sentry.io 0.4.0 API
2020-08-18 16:51:27 +01:00
Automatic Release Builder
439c5bf4f4
Adjust how we enable/disable Sentry.io
...
This allows for crash-reporting in the launcher,
but still disabling via default.xml or the command line.
2020-08-18 16:51:21 +01:00
James Turner
a297c89144
Flightplans: add clearAll, rename clear -> clearLegs
...
Improve naming of clear() methods, and expose the new ones to Nasal.
this will allow RouteManager dialog ‘clear’ button to clear all, soon.
See ticket:
https://sourceforge.net/p/flightgear/codetickets/2064/
2020-08-17 16:11:10 +01:00
James Turner
06a14b4b27
Fix a use-after-free ASan spotted.
2020-08-17 16:05:20 +01:00
James Turner
09067eecda
Protocols: additional Hz rate validation
...
Patch by Huntley Palmer, to warn when passing Hz=0 for the protocol
args, which does not work so well.
2020-08-17 12:15:40 +01:00
James Turner
86f6b94300
Use new thread-safe particles manager.
...
Requires corresponding SG commit
2020-08-17 10:00:42 +01:00
James Turner
2295e82a0f
Fix a use-after-free found by ASan.
2020-08-17 10:00:42 +01:00
Stuart Buchanan
51173f32ff
Additional AI Aircraft properties for animation
...
Add a number of properties set by both AI Traffic and Swift aircraft:
gear/gear[0..5]/position-norm
surface-positions/flap-pos-norm
surface-positions/spoiler-pos-norm
surface-positions/speedbrake-pos-norm
controls/lighting/beacon
controls/lighting/cabin-lights
controls/lighting/landing-lights
controls/lighting/nav-lights
controls/lighting/strobe
controls/lighting/taxi-lights
Also improve take-off behaviour
2020-08-16 14:49:33 +01:00
James Turner
06e6883396
Call new simgear clearSharedTreeGeometry
...
Should remove the Final Effect (TM) and fix one source of memory
corruption on reset.
2020-08-14 16:47:02 +01:00
James Turner
095be63be4
Reset: Add some missing prop clears on unbind
2020-08-12 16:38:10 +01:00
James Turner
977bfb06bf
Reset: ensure mobile tacan drop its AI references
...
Add a slightly ugly hook, to force mobile nav records to drop their
refs into the property tree on reset.
2020-08-12 16:37:52 +01:00
James Turner
51bb8ed5ce
GUI: clean PUI junk on GUI shutdown
2020-08-12 16:36:22 +01:00
James Turner
5d2bb87601
On shutdown, the renderer might already be gone.
...
Check for this when trying to remove the event handler.
2020-08-12 15:33:20 +01:00
James Turner
16ae171333
Fix a read of freed-data when closing props channels
...
Ensure we close all channels, before the NetPoller is destroyed, to
avoid a use-after-free.
2020-08-12 15:32:52 +01:00
James Turner
a05e5075b2
FGCom: explicit init some member variables
...
Fix various places Valgrind identified as read-of-un-inited. Also
fix use of frequencies are integers: always use a double type explicitly,
which will make MSVC happier.
2020-08-12 15:32:02 +01:00
James Turner
d6a0dadf45
Windows build fixes
...
std::for_each needs <algorithm>
2020-08-11 19:20:32 +01:00
James Turner
56089b9dd9
Fix clean up of the PUI event handler on reset
2020-08-11 18:44:41 +01:00
James Turner
c913b752fc
Improve reset main-loop interaction.
...
Actually remove our main-loop properties, and clear them from the
EventHandler, so we don’t report them as leaked properties.
2020-08-11 18:44:29 +01:00
James Turner
3b5721d77e
Fix leaking of dynamics/AI traffic
...
Use a weak-ref for ParkingAssignment to refer to its owning dynamics,
to avoid a circular dependency.
2020-08-11 18:43:24 +01:00
James Turner
fa76d5b158
Fix errors with missing runways at KORD
...
This likely relates to stale runway preferences data.
2020-08-11 18:43:20 +01:00
James Turner
21629402ce
ATCManagers: Use modern subsystem retrieval
2020-08-11 18:43:14 +01:00
James Turner
250669f75a
Fix circular ownership in FGFX
...
FGFX isA SGSampleGroup, but owns some SGXmlSounds, which also take an
owning ref to their sample group. Clear out the XMLSounds on unbind(),
to break the circular reference.
2020-08-11 14:06:15 +01:00
James Turner
f8fcc8ff5d
Default (XML) electrical system: fix leaks
...
Ensure shutdown of the electrical system actually cleans up components.
Fixes some leaks and dangling properties on reset.
2020-08-11 14:05:10 +01:00
James Turner
b4df97beb6
Fix a crash with clicks on reset
2020-08-11 14:03:55 +01:00
James Turner
fff2fa1718
Raw-pointer -> smarter pointer in TileMgr
...
Not fixing any leaks, just making ownership more explicit.
2020-08-11 11:44:29 +01:00
James Turner
e2e5223784
Fix leak of FGTerrain on shutdown
...
This fixes us leaking all STG objects on shutdown, due to an errant
raw pointer in the scenery layer.
2020-08-11 11:16:30 +01:00
Hans Kunkell
4743ede3b3
generates io channel names and adds to property tree
2020-08-10 10:49:09 +01:00
Hans Kunkell
2992e1b100
implements reinit of IO channels
2020-08-10 10:27:51 +01:00
Scott Giese
04a5c37a55
Memory Leak - Fixed
...
60,200,752 (59,468,656 direct, 732,096 indirect) bytes in 285,907 blocks are definitely lost in loss record 15,499 of 15,501
2020-08-07 12:28:15 -05:00
Richard Harrison
ab1ecb0a31
Directional point light (triangle) changes
...
Ensure that there are listeners on the properties as the scene features needs to be kept up to date with the properties.
2020-08-07 12:05:57 +02:00
Scott Giese
75e28368ea
Memory Leak: 57 MB
...
60,200,752 (59,468,656 direct, 732,096 indirect) bytes in 285,907 blocks are definitely lost in loss record 15,499 of 15,501
2020-08-06 22:01:15 -05:00
James Turner
b04a0d74f6
Use new-style sub-system lookup
2020-08-05 15:15:17 +01:00
James Turner
379748fc6b
Remove obsolete terraSync code
2020-08-03 17:57:59 +01:00
James Turner
f40c6187fb
Launcher: omit some setup for in-sim mode
...
Unfortunately this doesn’t fix the weirdness reported in:
https://sourceforge.net/p/flightgear/codetickets/2180/
.. but will keep trying.
2020-07-30 12:30:23 +01:00