Closed DarthPointer closed 4 years ago
The "undock" crash looks a lot like #2490. If you know how to reproduce it, we'd like a journal. See the last comment in #2490 for instructions on how to produce one.
I'm very sorry to report, but I have no idea what has been wrong. I have had to use a backup from the second ship prelaunch. It has resulted into having a docked pair in orbit (I've broken the time ingame lol) and another copy of R-III at the launch facility.
I have had no idea about the broken time-space and launched the rocket. That resulted me into having the third ship rendevouzing the existing ones for free. Undocking for some reason has passed with no issues.
MB it is my fault: I've been using Frege before reinstalling and getting the recent release. Or just a random neutron has hit my RAM and made some principia-related ship data broken.
https://drive.google.com/open?id=1MhSMVQrvNQLhsSbIlzT9tp4CWAJr95By
That is output of principia from recent game session. No WRN, ERR, CRIT files though. Idk if you will find a need in opening it)
I can give it a couple of tries to reproduce with logging if you wish. Unfortunatelly, my KSP is heavy-modded, reloads take up to 10 minutes and sharing my gamedata is not a proper idea.
Stack for the "undock" crash. The stack is exactly the same as that of #2490, even though it's a different version of Principia (Frege vs. Frenet).
https://github.com/mockingbirdnest/Principia/blob/3c2d43ebf4c016b538264aa5c7d15762951f13e3/ksp_plugin/interface.cpp#L368-L373 https://github.com/mockingbirdnest/Principia/blob/3c2d43ebf4c016b538264aa5c7d15762951f13e3/ksp_plugin/plugin.cpp#L721-L748 https://github.com/mockingbirdnest/Principia/blob/3c2d43ebf4c016b538264aa5c7d15762951f13e3/ksp_plugin/vessel.cpp#L232-L242 https://github.com/mockingbirdnest/Principia/blob/3c2d43ebf4c016b538264aa5c7d15762951f13e3/ksp_plugin/vessel.cpp#L578-L617 https://github.com/mockingbirdnest/Principia/blob/3c2d43ebf4c016b538264aa5c7d15762951f13e3/physics/discrete_trajectory_body.hpp#L169-L170Stack for the "broken save" crash:
https://github.com/mockingbirdnest/Principia/blob/21e623384639abd4bdd277a9fb722e94ee9763e4/ksp_plugin/interface.cpp#L881-L885 https://github.com/mockingbirdnest/Principia/blob/21e623384639abd4bdd277a9fb722e94ee9763e4/ksp_plugin/plugin.cpp#L411-L420 https://github.com/mockingbirdnest/Principia/blob/21e623384639abd4bdd277a9fb722e94ee9763e4/ksp_plugin/plugin.cpp#L1550-L1556I'd like to warn you that I've came up to sending reoports after gettnig the latest principia. I guess I've explained it in a witty way in the beginning.
FWIW I am able to deserialize the save given in the first comment. So the bug is not with loading the save per se, but with trying to use the resulting Principia plugin. This is consistent with the stack above.
Your mention of "broken time-space" is interesting. My analysis of #2490 was that a part was somehow being inserted in the past. My hunch (which I cannot support with hard data) is that some mod is moving the time of KSP backwards by a few seconds, and Principia (which is very defensive) detects the anomaly and crashes. The problem is sufficiently infrequent that I would not blame KSP.
I use CRASH and KCT, they really like to configure time-space.
Is getting an old presistent.sfs from backup folder enough to get a full restore in a regular case?
Upd: and I'd mention kerbalism, coz of background calculations. I have no idea if it can be connected with the bug though.
Is logging on/off setting saved between saves? I mean, I can reproduce "broken save" and would like to get the journal, if it can be helpful.
Upd: logging flag seems to be defined per-save. Can I change it via savefiles to enable it for the broken save?
An idea out of the blue: principia disables stock "switch to" button accessed by clicking a conic. Kerbalism provides a vessel switching interface in flight. Can it be broken?
It has costed me 10 reloads coz my dumbness has missed the broken backup on the first cycle of checking them. But now I have a jornal from an undock-to-crash.
https://drive.google.com/open?id=1i733w6seSp2kbyt7V8mKSohZM9OAbrDx
Unfortunately, that journal replays fine for me. In other words, it doesn't exhibit a crash.
With what version of Principia was it produced? I have assumed Frobenius. (Note to self: we should really record the version in the journal.)
If you still have the INFO.*.log
file corresponding to this journal, it would be good to attach it to this issue.
The crash has been reproduced under Frobenius. Here is the info. I'm not any optimistic, as I have already sent it after undocking-to-crash with Frobenius, I do not expect it to be very different from that posted in the issue.
Good news: I have managed to reproduce the crash. (I was a bit too tired yesterday, apparently.)
I have spent a few hours debugging it, and I believe that I have a theory. The bug is very subtle and has probably been with us for years. Believe it or not, the thing that triggers the crash is the curvature of the trajectories at the time of the undock.
Thanks a lot for taking the time to give us a journal: it would have been impossible to debug without it.
Good luck with fixing it then!
I have docked two similar ships and undocked them after some time (KSP was closed and started again between docking and undocking). Undocking causes gamecrash. I've removed principia, undocked the ships. Got principia back and the game crashes on loading of the gamesave. Other saves work fine. The "broken" save works fine without principia.
KSP.log: KSP.log
INFO from glog/principia (undock button -> crash): INFO.20200326-204405.22416.log
INFO from glog/principia (loading a "broken" save): INFO.20200326-215121.18636.log
The save (those ships are R-III I and R-III II): https://drive.google.com/file/d/1AXfjbyWinKW5u1tGSdQVJzsLcKAbPvCS/view?usp=sharing