1
0
Fork 0
Commit graph

15659 commits

Author SHA1 Message Date
James Turner
8618e55774 FGCom: attempt to avoid crashes seen by Sentry
This is a wild guess, but shouldn’t do any harm and might give some
data about what is going wrong.
2021-06-08 17:46:50 +01:00
James Turner
6a7de07fda ErrorReporter: fix a crash on exit found by ASan
If we exit without shutdown()-ing the error report, ensure the
error logging callback is cleaned up.
2021-06-08 17:46:05 +01:00
Julian Smith
81e12d7c2e test_suite/unit_tests/Scripting/testGC.cxx: Restore nasal state when closing down.
Need to restore global_nasalMinimalInit to false in NasalGCTests::tearDown(),
otherwise later run of NasalSysTests::testCommands fails.
2021-06-07 22:24:56 +01:00
Lars Toenning
8a8973fe15 AIManager: Explicitly take SGSharedPtr
Otherwise a SGSharedPtr is implicitly created on ai_list.push_back(model). It's not clear to the caller that FGAIManager takes care of the passed raw pointer.

Also fixes a bug for swift using the passed dangling pointer after the created SGSharedPtr of FGAIManager got out of scope and deleted the resource.

As this commit mainly addresses the swift crash (also for backport to LTS) it doesn't fix other calls to ::attach(..) which might also use the raw pointer afterwards.
2021-06-07 12:43:50 +01:00
James Turner
2895ea8b77 GroundNet: try to reduce crashes with bad routes
Throw an exception in the condition encountered in FLIGHTGEAR-NJN
2021-06-04 16:59:12 +01:00
James Turner
7935d5d97c NavData poly-lines: split out from main Octree
Use a transient index for the poly-lines. This avoids NavCache disk
contention when multiple copies of FG race after the rebuild completes.

Should reduce locking errors early in startup.
2021-06-04 16:59:12 +01:00
Julian Smith
ef07f26023 src/Scripting/nasal-props.cxx:f_getAttribute(): added VALUE_CHANGED_UP and VALUE_CHANGED_DOWN. 2021-06-02 19:06:58 +01:00
Julian Smith
a5de1cc33f src/Main/main.cxx: updated call to SGPropertyLockControl().
We now allow restoration of previous value-changed property callback behaviour.
2021-06-02 19:06:58 +01:00
Julian Smith
23b3c21669 src/Main/main.cxx: workaround for ui callbacks without default parent callbacks.
We now set VALUE_CHANGED_DOWN on /sim, otherwise popup text does not appear.
2021-06-02 19:06:57 +01:00
Julian Smith
07b676a6c8 src/Main/main.cxx: moved property-locking control into /sim/property-locking/. 2021-06-02 19:06:57 +01:00
Bertrand Coconnier
d310b84bdf Avoid propeller spinning in the wind (issue #2581)
Some propellers could start windmilling very easily under mild wind conditions (11 kts). And in stronger wind the propeller could even generate some power and torque strong enough to turn the aircraft upside down.

This was due to the combination of:
- Propellers generating power (wind turbine) for advance ratio higher than 1.0 (is it plausible !?!)
- Powers and torques computed with ludicrously small RPMs.

So this commit basically filters out extremely small RPMs in order to avoid huge numbers resulting from division by small values.
2021-05-29 15:59:56 +02:00
James Turner
3bef9e7747 Move some ALERTS to MANDATORY_INFO 2021-05-28 11:59:10 +01:00
James Turner
9297f62d2f Fix some missed renames for sg_random.hxx
Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2595/
2021-05-28 11:58:57 +01:00
James Turner
cc60472d26 Ground-net errors: use a tag for the ICAO 2021-05-26 11:10:21 +01:00
James Turner
118c2095b6 Launcher: remove a log message 2021-05-26 10:24:36 +01:00
James Turner
180ad8d2d8 NavCache: avoid spurious message on rebuild 2021-05-26 10:22:59 +01:00
James Turner
34b8fbc58e Precomputed random numbers API
Use updated pre-compute API for random numbers

By Marc Eberhard
2021-05-25 12:57:07 +01:00
James Turner
695d41a1eb Raise minimum OSG version to 3.6 2021-05-24 16:47:32 +01:00
James Turner
4370d3d1f7 Fix another Qt forwards/backwards compat point 2021-05-24 16:45:35 +01:00
James Turner
a702fd7b27 Controls: ensure engine index is valid
Some spacecraft send out-of-range engine numbers from the JSBsim side.
Should probably be fixed in JSBsim itself but let’s check here to
keep compat with existing FDMs.
2021-05-24 15:54:17 +01:00
James Turner
bc4a2b3ab7 If-def for Qt compat forwards and backwards. 2021-05-24 15:44:19 +01:00
James Turner
f009c54773 Qt deprecation fixes 2021-05-23 20:14:19 +01:00
Julian Smith
f7704a0339 Fix some warnings about constructor initialisation order. 2021-05-23 08:18:52 +01:00
Julian Smith
837a200811 src/GUI/LauncherArgumentTokenizer.hxx: fix compile failure on recent devuan.
Avoids: error: invalid use of incomplete type 'class QVariant'.
with gcc version 10.2.1 20210110 (Debian 10.2.1-6).
2021-05-23 08:18:52 +01:00
Julian Smith
90625848de src/Main/main.cxx: support for properties locking control.
Define properties that are passed to new SGPropertyLockControl() function in
order to allow runtime control of whether we use property locking.
2021-05-23 08:18:52 +01:00
Julian Smith
2e030218ea src/Viewer/splash.cxx: show message if we are a debug build. 2021-05-23 08:18:52 +01:00
Bertrand Coconnier
d4f31c3507 Filters out negative powers when the propeller is not rotating. 2021-05-22 12:41:50 +02:00
James Turner
d3956a4af7 Add bi-directional support to the generic protocol
Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/1191/
2021-05-19 15:11:55 +01:00
James Turner
d5789b5f74 Fix an error with new OSG compilation
Ensure we include <QOpenGLContext> before any OSG headers
2021-05-19 15:10:17 +01:00
jano
804f689da8 made the --multiplay option only set sim/multiplay/tx-rate-hz for the
out command, in option curently overwrite the rate given by the out option
eg: --multiplay=out,20,localhost,5000 --multiplay=in,,,5003 end with a tx
rate of "0" and this end with the default value 10 later
2021-05-17 09:27:18 +01:00
Bertrand Coconnier
773a44c072 Tentative fix for the issue #2581 (propeller spinning indefinitely after aborting crank). 2021-05-08 18:50:34 +02:00
James Turner
2614945b8f Ground-net loading: collect which nets have problems
Log problem airports so we can fix them case-by-case.
2021-05-04 12:03:27 +01:00
James Turner
cf75ba1fe9 Fix crash in tower selection logic in empty areas.
When starting a long way from any carrier, don’t crash because no
carrier was found. Thanks to Fahim Dalvi for finding thing.
2021-05-02 16:48:55 +01:00
James Turner
4e432b3f8e Error reporter: tweak enable, is-critical logic
Disable error-reports in ‘developer-mode’, and only consider aircraft
errors critical if they happen before postinit(). 

Add logic to show the correct report when a popup is clicked.
2021-04-30 13:46:10 +01:00
James Turner
e04c179767 Environment manager: reduce log message levels 2021-04-30 13:46:10 +01:00
Bertrand Coconnier
01dd0a987d Sync'ed with JSBSim v1.1.5
- Lower the allowable minimum propeller inertia from 1e-3 to 1e-6
- Account for the vehicle angular rates in the computation of propellers local velocities.
- Apply the engine torque to the vehicle (The aerodynamic torque was applied until now but it is the engine generated torque that the aircraft is actually submitted to)
- Prevent FGPiston from sending negative powers to thrusters
- Fixed FGMagnetometer : no need to update the magnetic field every time step.
- FGMassBalance: remove a direct reference to FGGroundReactions
2021-04-30 12:15:59 +02:00
Fernando García Liñán
558a498850 Fix hotspots being shown for a single frame after startup
FGRenderer::update() happens after the CameraGroup is updated, which causes the
Compositor to use the previous frame cull mask. Setting the cull masks
explicitly during FGRenderer::update() fixes the issue.
2021-04-29 12:18:50 +02:00
James Turner
94c202375c Fix a warning spotted by Fahim Dalvi. 2021-04-28 12:09:32 +01:00
James Turner
1b4ae1e46b Launcher: detect command line scenery/acft paths 2021-04-28 11:25:49 +01:00
Stuart Buchanan
6529234abe Fix compiler warnings 2021-04-26 21:01:49 +01:00
James Turner
8085d1fa2c Clear ATC on the user aircraft as well
Avoids an assert/crash on exit, in some ATC configurations.
2021-04-26 11:14:06 +01:00
James Turner
a458d46349 FGCom: don’t crash if properties change before postinit
Check the _initialized flag inside the listener, to avoid a crash
if Nasal sets fgcom properties during its startup, which happens
before FGCom runs its own postinit()

Ticket: https://sourceforge.net/p/flightgear/codetickets/2574/
2021-04-26 10:18:47 +01:00
James Turner
8a33f86e46 Error-reporting: improve UI/display behaviour
Assess how critical the error is, and based on this, show a popup
instead of the dialog in some cases. Add commands to allow delayed
display of the main dialog, and stepping through multiple error
reports in the dialog.

Also add a new error category for shader errors, since these are
always emitted from the render thread and we can’t easily attribute
them to an aircraft, scenery or core feature.
2021-04-25 19:18:56 +01:00
James Turner
e8952b6c0f Update tests for revised Subsystem API 2021-04-25 19:18:56 +01:00
James Turner
e6307b1494 Fix dumb inverted logic commit 2021-04-25 19:18:56 +01:00
James Turner
6e42b9ae02 Attempting to fix AIAircraft/controller crash
Add an assertion that controller has been cleared before the AIAircraft
destructor is run. If it’s not, then we are too late, don’t try to
sign off since the controller is probably gone.

Sentry-Id: FLIGHTGEAR-15
2021-04-25 19:18:56 +01:00
James Turner
14d01ccffe Panel/cockpit loading: report errors 2021-04-25 19:18:56 +01:00
Richard Harrison
ba783ccce9 AI Carriers: tidy and resolve ctor order
Tidying up:

* change to use direct initializtion
* put all of member variables in alpha order
* adjust init spacing to make init values clear.
* change all member variables to start with an underscore. The reason for this isn't clear but some had an underscore and some didn't; so although I don't know what the convention was intended for this seems to be the appropriate changes.
2021-04-25 17:30:21 +02:00
James Turner
a47d126ba5 Autosave loading: suppress XML errors 2021-04-21 21:57:55 +01:00
James Turner
e1a9d27ca6 Generic protocols: suppress XML errors 2021-04-21 21:57:10 +01:00