-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game stutters when vessel change state from landed to in flight or vice versa #3033
Comments
Reproduced with a jumping Kerbal; journal attached. |
That journal is a bit annoying to replay (it is recorded at Gröbner, which uses an older setup of the dependencies), so the following traces are from a new journal at 412e338 (again simply jumping on the runway). Note that the long method detector is firing. More later. Excerpt from the replay logs:
|
Now with more traces (emphasis added). The culprit is the call to Principia/ksp_plugin/orbit_analyser.cpp Lines 35 to 39 in 412e338
This is reminiscent of #2957. E0703 15:43:29.688395 16940 player.cpp:84] Long method (1031 ms): [principia.journal.serialization.FreeVesselsAndPartsAndCollectPileUps.extension] { in { plugin: 1773956949968 delta_t: 0.02 } } I0703 15:43:29.691414 16940 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:29.692415 16940 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:29.692415 16940 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 15:43:29.693382 16940 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 15:43:29.694376 16940 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700033417185283e+09 s I0703 15:43:29.694376 16940 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:29.695376 16940 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:29.696373 16940 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 15:43:29.703353 16940 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 15:43:29.811066 16940 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) E0703 15:43:29.811066 16940 ksp_plugin_adapter.cs:1139] Unpacked part kerbalEVA (Wehrwell Kerman) (E157195E) appeared between BetterLateThanNever and WaitForFixedUpdate. Linearly extrapolating its position at the previous frame. I0703 15:43:29.816051 16940 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:29.818048 16940 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700033357185292e+09 s I0703 15:43:29.818048 16940 pile_up.cpp:81] Constructing pile up at 000001DD73D6C830 I0703 15:43:29.819049 16940 part.cpp:219] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to the pile up at 000001DD73D6C830 I0703 15:43:29.880951 16940 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 15:43:29.881876 16940 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 15:43:29.884868 16940 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:29.885866 16940 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:29.886862 16940 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 15:43:30.945065 16940 orbit_analyser.cpp:41] ~OrbitAnalyser: Interrupt(); 1058 ms I0703 15:43:30.946030 16940 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 15:43:30.951018 16940 pile_up.cpp:106] Destroying pile up at 000001DD73D6C830 E0703 15:43:30.952015 16940 player.cpp:84] Long method (1066 ms): [principia.journal.serialization.FreeVesselsAndPartsAndCollectPileUps.extension] { in { plugin: 1773956949968 delta_t: 0.02 } } I0703 15:43:30.955006 16940 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:30.955006 16940 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:30.956017 16940 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 15:43:30.957002 16940 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 15:43:30.957002 16940 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700033329185295e+09 s I0703 15:43:30.958000 16940 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:30.958000 16940 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:30.958997 16940 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 15:43:30.959996 16940 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 15:43:31.073719 16940 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) E0703 15:43:31.073719 16940 ksp_plugin_adapter.cs:1139] Unpacked part kerbalEVA (Wehrwell Kerman) (E157195E) appeared between BetterLateThanNever and WaitForFixedUpdate. Linearly extrapolating its position at the previous frame. I0703 15:43:31.077709 16940 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:31.077709 16940 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700033269185305e+09 s I0703 15:43:31.078706 16940 pile_up.cpp:81] Constructing pile up at 000001DD73D6C830 I0703 15:43:31.079576 16940 part.cpp:219] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to the pile up at 000001DD73D6C830 I0703 15:43:31.131044 16940 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 15:43:31.131044 16940 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 15:43:31.135007 16940 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:31.135998 16940 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 15:43:31.136997 16940 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 15:43:32.117506 16940 orbit_analyser.cpp:41] ~OrbitAnalyser: Interrupt(); 980 ms I0703 15:43:32.117506 16940 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 15:43:32.122464 16940 pile_up.cpp:106] Destroying pile up at 000001DD73D6C830 E0703 15:43:32.123453 16940 player.cpp:84] Long method (987 ms): [principia.journal.serialization.FreeVesselsAndPartsAndCollectPileUps.extension] { in { plugin: 1773956949968 delta_t: 0.02 } } |
From breaking the replay under the debugger during this long Principia/ksp_plugin/orbit_analyser.cpp Lines 123 to 126 in 412e338
Principia/physics/ephemeris_body.hpp Lines 562 to 574 in 412e338
Principia/integrators/symmetric_linear_multistep_integrator_body.hpp Lines 25 to 148 in 412e338
Principia/physics/ephemeris_body.hpp Lines 1075 to 1085 in 412e338
Principia/physics/discrete_trajectory_body.hpp Lines 183 to 225 in 412e338
Note that the computation of It is however not clear why we end up stuck for an entire second here, since there is a |
More traces. The time is spent in a single call to E0703 18:12:04.888756 11224 player.cpp:84] Long method (878 ms): [principia.journal.serialization.FreeVesselsAndPartsAndCollectPileUps.extension] { in { plugin: 1773956949968 delta_t: 0.02 } } I0703 18:12:04.891295 11224 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:04.892396 11224 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:04.892563 11224 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 18:12:04.892745 11224 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 18:12:04.892745 11224 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700033149185300e+09 s I0703 18:12:04.892745 11224 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:04.892745 11224 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:04.892745 11224 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 18:12:04.892745 11224 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 18:12:05.002799 11224 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) E0703 18:12:05.002799 11224 ksp_plugin_adapter.cs:1139] Unpacked part kerbalEVA (Wehrwell Kerman) (E157195E) appeared between BetterLateThanNever and WaitForFixedUpdate. Linearly extrapolating its position at the previous frame. I0703 18:12:05.005759 11224 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:05.005759 11224 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700033077185297e+09 s I0703 18:12:05.006768 11224 pile_up.cpp:81] Constructing pile up at 0000018930AFCCF0 I0703 18:12:05.006948 11224 part.cpp:219] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to the pile up at 0000018930AFCCF0 I0703 18:12:05.053092 11224 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 18:12:05.053092 11224 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 18:12:05.056083 11224 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:05.056083 11224 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:05.057112 11224 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 18:12:05.921766 20788 discrete_trajectory_body.hpp:228] Append: FitHermiteSpline 879 ms from 10001 dense iterators to 9934 right endpoints I0703 18:12:05.923226 11224 orbit_analyser.cpp:41] ~OrbitAnalyser: Interrupt(); 866 ms I0703 18:12:05.925190 11224 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 18:12:05.925442 11224 pile_up.cpp:106] Destroying pile up at 0000018930AFCCF0 E0703 18:12:05.925442 11224 player.cpp:84] Long method (868 ms): [principia.journal.serialization.FreeVesselsAndPartsAndCollectPileUps.extension] { in { plugin: 1773956949968 delta_t: 0.02 } } I0703 18:12:05.928437 11224 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:05.929435 11224 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:05.929435 11224 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 18:12:05.929435 11224 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 18:12:05.929435 11224 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700033049185300e+09 s I0703 18:12:05.929435 11224 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:05.929435 11224 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:05.929435 11224 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 18:12:05.929435 11224 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 18:12:06.215755 11224 plugin.cpp:402] Inserted loaded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) E0703 18:12:06.215755 11224 ksp_plugin_adapter.cs:1139] Unpacked part kerbalEVA (Wehrwell Kerman) (E157195E) appeared between BetterLateThanNever and WaitForFixedUpdate. Linearly extrapolating its position at the previous frame. I0703 18:12:06.218750 11224 vessel.cpp:115] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:06.218750 11224 vessel.cpp:167] Preparing history of vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) at -1.51700032857185316e+09 s I0703 18:12:06.219614 11224 pile_up.cpp:81] Constructing pile up at 0000018930AFCCF0 I0703 18:12:06.219779 11224 part.cpp:219] Adding part kerbalEVA (Wehrwell Kerman) (5E1957E1) to the pile up at 0000018930AFCCF0 I0703 18:12:06.268133 11224 ksp_plugin_adapter.cs:1280] Reporting collision with local scenery runway_collider I0703 18:12:06.269100 11224 plugin.cpp:543] Collision between kerbalEVA (Wehrwell Kerman) (5E1957E1) and the ground. I0703 18:12:06.272091 11224 plugin.cpp:623] Removing grounded vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:06.272091 11224 vessel.cpp:77] Destroying vessel Wehrwell Kerman (a62fa545-68ae-4651-b753-47a8600440c8) I0703 18:12:06.272091 11224 vessel.cpp:81] ~Vessel: StopPrognosticator(); 0 ms I0703 18:12:07.149072 22496 discrete_trajectory_body.hpp:228] Append: FitHermiteSpline 894 ms from 10001 dense iterators to 9934 right endpoints I0703 18:12:07.151060 11224 orbit_analyser.cpp:41] ~OrbitAnalyser: Interrupt(); 878 ms I0703 18:12:07.152773 11224 part.cpp:67] Destroying part kerbalEVA (Wehrwell Kerman) (5E1957E1) I0703 18:12:07.152927 11224 pile_up.cpp:106] Destroying pile up at 0000018930AFCCF0 E0703 18:12:07.152999 11224 player.cpp:84] Long method (881 ms): [principia.journal.serialization.FreeVesselsAndPartsAndCollectPileUps.extension] { in { plugin: 1773956949968 delta_t: 0.02 } } |
When a vessel hits the ground or takes off there is a noticeable stutter as Principia takes or releases control of the vessel.
This can easily be seen by bouncing a vessel against the floor repeatedly (Physx will often do this for you).
There will be a noticeable pause on each bounce; switching hack gravity on will result in smooth frame rates suggesting that it is Principia causing the issue.
The text was updated successfully, but these errors were encountered: