dkavolis / Ferram-Aerospace-Research

Aerodynamics model for Kerbal Space Program
Other
77 stars 32 forks source link

FAR not giving stability derivatives and doing weird physics #124

Open Eamon999 opened 2 years ago

Eamon999 commented 2 years ago

KSP 1.10.1 +RO/RP-1 + Principia FAR Version 3:0.16.0.3

Unable to access stability derivatives because the button is greyed out. image

Col stops working after doing one simulation/launch. Ive tried reinstalling FAR and all RO mods and creating a new save neither worked. Only way to get it to work again is by launching the game again and even then it only works for the first simulation/launch.

image image

Col didnt move ^

When in flight (made by using the kct airlaunch) the control surfaces move but the aircraft is entirely unresponsive

dkavolis commented 2 years ago

Please provide KSP.log, and I might need a mod list (easiest to save from CKAN) and the craft file as well.

chippydip commented 11 months ago

Running into this as well (CoL not moving, rockets behaving as if they are flying through molasses, analysis tools broken/disabled) . Took a look at the logs and there log spam multiple times per second of:

[FAR v0.16.1.2]: Updating vessel voxel for <ship name>

with nothing else (or just "Updating in the VAB). Right before the spam starts in the log there's a

[FAR v0.16.1.2]: Voxel waiting for chunks to be released

so perhaps there's a leak somewhere? This tends to happen when I'm doing a lot of editing/simming/reverting and can only be fixed by a full game restart. Mods are RP-1 express install + kOS.

Full log: KSP - Copy.zip

chippydip commented 11 months ago

Just had this happen immediately after restarting the game, so I tried to see if I could reliably reproduce the issue. I wasn't able to just by launching the same vessel again, but I made a small change that caused the rocket to blow up and reproduced the issue at that point. First, here's a snippet from the log at that point:

[LOG 14:56:40.491] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:40.541] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:40.541] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:40.578] [FAR v0.16.1.2]: Voxel waiting for chunks to be released
[LOG 14:56:40.578] [FAR v0.16.1.2]: Voxel waiting for chunks to be released
[LOG 14:56:40.609] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:40.629] [FAR v0.16.1.2]: Voxel waiting for chunks to be released
[LOG 14:56:40.895] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2
[LOG 14:56:40.914] [FAR v0.16.1.2]: Voxel waiting for chunks to be released
[LOG 14:56:41.046] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:41.067] [FAR v0.16.1.2]: Voxel waiting for chunks to be released
[LOG 14:56:41.147] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:41.147] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:41.167] [FAR v0.16.1.2]: Voxel waiting for chunks to be released
[LOG 14:56:41.167] [FAR v0.16.1.2]: Voxel waiting for chunks to be released
[LOG 14:56:41.180] [FAR v0.16.1.2]: Updating vessel voxel for SR-0 Karman 2 Debris
[LOG 14:56:41.455] 8/11/2023 2:56:41 PM,TestFlightCore,Setting HideUI = False
[LOG 14:56:41.455] Game Paused!
[LOG 14:56:41.455] [UIMasterController]: ShowUI
[LOG 14:56:41.455] [FlightGlobals]: Active Vessel is in atmosphere. Cannot save.
[LOG 14:56:43.111] [FlightDriver]: Flight State Reverted to Prelaunch.

I looked at the code briefly before the first report and noticed the cleanup code to release voxel is contained in an if check which requires debug voxels to be off and the current scene to still be the flight scene. When my rocket started to blow up I immediately hit ESC and reverted to the VAB. Based on the logs and my understanding of the code, I suspect what may be happening is that the breakup queues up a bunch of new voxelization computations for all the debris and the remaining craft, but if those calculations don't complete before the flight scene reverts then the scene check will fail and the voxels won't be freed. Not sure what happens to the actual voxel resources, but the count of "in use voxels" ends up stuck above the MAX and can never get fixed without a full game restart.

For now, a work-around may be to just make sure not to revert in the middle of the craft breaking up.