mockingbirdnest / Principia

𝑛-Body and Extended Body Gravitation for Kerbal Space Program
MIT License
769 stars 69 forks source link

Crash when separating a stage with many struts or when there is a lot of debris. #2866

Closed Aksijaha closed 3 years ago

Aksijaha commented 3 years ago

Hello. First let me say that I really, really love this mod and have been able to use it with no other issues, for the most part. However, whenever I separate a stage with multiple struts or a ship is destroyed and produces a lot of debris, KSP (v. 1.10.1) crashes and produces a fatal error; an example would the 7th stage of the stock Acapello rocket. I thought this might be an issue with RAM usage, but according to Task Manager RAM usage does not increase above normal levels during the crash. I am able replicate this crash every time I try. Not sure whether this is a bug or a performance issue with my machine (Intel Core i7-9750, RTX 2060 6GB GPU, 8GB RAM). I can repeat this crash on a fresh install of KSP with no mods other than Principia. I have provided the info.log and fatal.log files.

Many Thanks. FATAL.20210119-202801.2084.log INFO.20210119-202641.2084.log

pleroy commented 3 years ago

Note to self: a journal was given on the forum here.

pleroy commented 3 years ago

Well, that journal was interesting.

First, it confirms that the original crash is due to Diagonalize producing NaNs (for a matrix that is already diagonal, no less) and that the latest greatest code handles it properly. I am adding a test to the long list of ill-conditioned diagonalizations.

Perhaps more interestingly, it shows that journals generated by Germain don't replay (at least, not without open-heart surgery) because of bugs that were introduced in #2845: only the first character of the vessel GUID is recorded (TIL that you can assign a char to an std::string), and there is a missing sentinel in the replay code. I am fixing the generator.