mockingbirdnest / Principia

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

Apparent incompatibility with "GPP Secondary" mod #1652

Closed zenmetsu closed 6 years ago

zenmetsu commented 6 years ago

A new installation of KSP 1.3.1 was performed with Kopernicus, GPP, GPP textures and Principia 陈景润. The game loads and runs as expected. Upon adding "GPP Secondary" to create a second solar system, the game loads up just fine and gets to the menu screen, but it crashes when a new game is started. Removing the Principia folder resolves the crashing behavior. KSP is not generating crash logs. Is this a known limitation of Principia? If this is a new issue, how can I force a crash dump to aid in troubleshooting?

I tried with Chasles as well, and observed the same behavior.

zenmetsu commented 6 years ago

The problem actually appears to be with Sigma Binary. I didn't realize that it was getting installed via CKAN. After removing it, the game no longer crashes, however the resulting planetary system is unstable and Principia generates the following warning on screen in a window which I was unable to dismiss.

Error extending trajectory for Lili. Error trying to fit a smooth polynomial to the trajectory. The approximation error jumped from +1.00000000000000002e-03 m to +4.93942378895387083e+04 m at time +4.80000000000000000e+03 s. The last position is [+3.12919062731998438e+12 m, -2.45279969736655664e+12 m, -2.10791092384214783e+11 m] and the last velocity is [+8.00726265518865694e+03 m s^-1, -2.46313799172503013e+03 m s^-1, -2.74566529556075352e+02 m s^-1]. An apocalypse occurred and two celestials probably collided because your solar system is unstable.

Is there a way to dismiss this window and just play through as-is? I sped up time and none of the other planets/moons appear to escape. They may be unstable, but not within a timeframe that I'm expecting to play through. Alternatively, is there a simple way to remove a single celestial body if the window cannot be dismissed?

Thanks again for the amazing mod. 👍

zenmetsu commented 6 years ago

It looks like the new system will need to be made stable, and thus this is an issue with the GPP mod. I'll go ahead and close this ticket, however I would like to help the GPP mod author if possible to make the mod compatible with Principia. I know that the stock system was unstable with Principia and it had to be modified. Are there any tips or tools available to aid in making the system stable, or is it going to be a trial and error affair?

pleroy commented 6 years ago

FWIW there is no way to continue after the "apocalypse" window, as this windows tells you that the invariants assumed by Principia are violated and continuing would result in other errors, more mysterious and more severe.

The wiki has a section explaining the work that we did to stabilize the stock system. The GPP authors would have to do a similar analysis, they cannot just throw celestial with semi-random positions and velocities and hope for the best. Note however that this analysis is not for the faint-hearted.

zenmetsu commented 6 years ago

Fair enough. I'll close this issue then. I don't mind doing heavy number crunching, but before I go through re-inventing the wheel, did you folks come up with any tools for doing this calculation that can be shared with the public, or will I need to code something up myself?

pleroy commented 6 years ago

The mathematica folder has the files that we used for studying stability of the stock system: data is generated using retrobop_dynamical_stability.cpp and visualized using joolian_studies.

zenmetsu commented 6 years ago

Awesome, thanks!