Starwaster / DeadlyReentry

Heat and force damage for KSP
Other
31 stars 19 forks source link

Hard reentries in certain configurations crash the game [RO] #61

Closed Noiredd closed 9 months ago

Noiredd commented 11 months ago

In RO/RSS, a very fast reentry (~11km/s) on a LEO-rated heatshield should result in the vehicle spectacularly exploding. However, in certain vehicle configurations, hard reentry explodes the entire game, crashing it on the spot (Unity Crash Handler pops up for a split second). After a few days of tracking the source of my crashes, I found DR to be the culprit - without it, the vehicle undergoes a typical fiery RUD.

This started to happen when I was experimenting with aerocapture probes in a heat shell made of a heat shield and a procedural fairing (screenshot attached). Interestingly, I was unable to reproduce it on a "typical" build such as a Mk2 Pod + heat shield. Reproducing it might therefore be a bit inconvenient, as one has to build something like this (instructions below, I promise I've made it as bare-bones as possible).

Environment:

To build the vehicle (screenshot below for a rough reference):

To reproduce the crash, launch this vehicle, and use the cheat menu to set orbit to:

This should result in a very hard reentry (11km/s at 69km perigee). Orient the craft correctly, decouple the service section to expose the heat shield, and at around 70-80km your game should crash. It crashes so violently in fact, that the log isn't even being flushed to disk (and so it doesn't contain anything around the time of the crash).

I suspect this is due to heating becoming so intense that the equations throw a NaN or an Inf somewhere (due to the finite and rather coarse time step of the simulation). To support this hypothesis: I experimented with one particular vehicle, trying higher and higher orbits, and found that the crashes started to occur after a certain point (e.g. sma=13 500 000, ecc=0.524 would be a normal reentry, but at sma=13 700 000, ecc=0.53095 the game would crash).

DRcrashvehicle This is roughly how the test vehicle should look like, one half of the fairing is removed to show the interior.

Starwaster commented 10 months ago

Be sure to check the player.log file in %localappdata%low\Squad\Kerbal Space Program

There is also a Crashes folder in there as well. Reproduce the problem then grab the player.log file and the relevant crash folder from inside Crashes and add those files to this issue.

(deleted part about output_log.txt)

Starwaster commented 9 months ago

I am currently unable to reproduce this issue. I suspect interaction with another mod. My first suspect would be FAR followed by Procedural Fairing since these are not mods I usually run with. However, installing those did not help me reproduce the issue.

I likewise do not use RSS or RO, but I do use a scaled up 10x Kerbol System so reproducing a reentry of the parameters you specify is trivial; I do it all the time and have never experienced the issue you describe. (this also means that your suspicions as to cause are extremely unlikely. 'intense heating' doesn't cause math errors)

Your description as to timing of the crash seem to indicate that it is happening either when the shield runs out of ablator or when the part is being destroyed.

Absent any logs of the event, I don't see this being resolved any time soon.