Skip to content
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

Crash when clicking on rebase #4025

Closed
kwattt opened this issue Jun 9, 2024 · 13 comments
Closed

Crash when clicking on rebase #4025

kwattt opened this issue Jun 9, 2024 · 13 comments
Milestone

Comments

@kwattt
Copy link

kwattt commented Jun 9, 2024

INFO.20240609-164451.17344.log
ERROR.20240609-164451.17344.log
FATAL.20240609-170324.17344.log

This happened when planning a second maneouver on a moon flyby, I clicked rebase and crashed without any alert box on screen.

@pleroy
Copy link
Member

pleroy commented Jun 10, 2024

Thanks for reporting. Is this something that you know how to reproduce? If so could you give us a journal? I could paper over the bug, but I'd like to understand how we end up in this state.

@kwattt
Copy link
Author

kwattt commented Jun 11, 2024

Hello, I managed to get a journal with the crash. I noticed a really high RAM spike before the crash, but never ran out of it.
This time I got the crash just by planning the first maneouver, again on the moon.

INFO.20240610-195416.2432.log
ERROR.20240610-195416.2432.log
FATAL.20240610-200338.2432.log

Here is the zipped journal, uncompressed has a size of about 1.1gb
https://drive.google.com/file/d/1RLH4E0QaIuvUPp_kcOmWL-SBEoJU-IA7/view?usp=sharing

@kwattt
Copy link
Author

kwattt commented Jun 28, 2024

Same issue again, this time when I changed the reference to MCMF reference, i took a screenshot before the game closed if its worth, I also do have another journal, please let me know if you also need it and will upload it.
ERROR.20240628-095242.22284.log
FATAL.20240628-111934.22284.log
INFO.20240628-095242.22284.log
WARNING.20240628-095242.22284.log

KSP_x64_3IxBkzNHBe

@pleroy
Copy link
Member

pleroy commented Jun 28, 2024

The latest log is more interesting as it points towards a singularity in the integrator. If you could upload the latest journal that would be great.

@kwattt
Copy link
Author

kwattt commented Jun 28, 2024

@pleroy
Copy link
Member

pleroy commented Jun 29, 2024

Decoded stack track:

auto const result = task(callback_.ToStdFunction());
return plugin->ComputeAndRenderFirstCollision(celestial_index,
Angle const& longitude)> const& radius) const {
auto const& celestial = FindOrDie(celestials_, celestial_index);
auto const& celestial_body = *celestial->body();
auto const& celestial_trajectory = celestial->trajectory();
// TODO(phl): We should cache the apsides.
DiscreteTrajectory<Barycentric> apoapsides_trajectory;
DiscreteTrajectory<Barycentric> periapsides_trajectory;
ComputeApsides(celestial_trajectory,
trajectory,
begin,
end,
max_points,
apoapsides_trajectory,
periapsides_trajectory);
const auto intervals = ComputeCollisionIntervals(celestial_body,
celestial_trajectory,
trajectory,
apoapsides_trajectory,
periapsides_trajectory);
VLOG(1) << "Found " << intervals.size() << " collision intervals";
for (auto const& interval : intervals) {
VLOG(1) << "Collision interval: " << interval;
auto const maybe_collision = ComputeFirstCollision(celestial_body,
StreamingAdaptiveЧебышёвPolynomialInterpolant<max_чебышёв_degree>(
StreamingAdaptiveЧебышёвPolynomialInterpolantImplementation<max_degree>(
Difference<Value<Argument, Function>>* const error_estimate) {
// Try to build an interpolation over the entire interval.
Difference<Value<Argument, Function>> full_error_estimate;
auto full_interpolant = ЧебышёвPolynomialInterpolant<max_degree>(
f, lower_bound, upper_bound, max_error, &full_error_estimate);
if (full_error_estimate <= max_error ||
MayHaveRealRootsOrDie(Value const error_estimate) const {
if constexpr (convertible_to_quantity<Value>) {
CHECK_LE(Value{}, error_estimate);

@pleroy
Copy link
Member

pleroy commented Jun 29, 2024

Interesting bit of the journal:

E0630 09:21:57.489698 30228 player.cpp:107] index: 58888953
[principia.journal.serialization.CollisionNewFlightPlanExecutor.extension] { in { plugin: 1719027084128 
celestial_index: 9 sun_world_position { x: 47003878981.001343 y: -2723705084.7652864 z: -141254979389.99554 } 
vessel_guid: "bae30dc4-c136-48e2-af6d-d33eb01b18ab" max_points: 64 } }
[principia.journal.serialization.CollisionNewFlightPlanExecutor.extension] { return { result: 1746217032704 } }
E0630 09:21:57.489698 30228 player.cpp:107] index: 58888954
[principia.journal.serialization.CollisionGetLatitudeLongitude.extension] { in { executor: 1746217032704 } }
[principia.journal.serialization.CollisionGetLatitudeLongitude.extension] { out { latitude_in_degrees: 
-38.866553115290941 longitude_in_degrees: -72.801754301775276 } return { result: true } }
E0630 09:21:57.489698 30228 player.cpp:107] index: 58888955
[principia.journal.serialization.CollisionSetRadius.extension] { in { executor: 1746217032704 radius: nan } }
[principia.journal.serialization.CollisionSetRadius.extension] { }
E0630 09:21:57.489698 30228 player.cpp:107] index: 58888956
[principia.journal.serialization.CollisionGetLatitudeLongitude.extension] { in { executor: 1746217032704 } }
[principia.journal.serialization.CollisionGetLatitudeLongitude.extension] { out { latitude_in_degrees: 
-49.273857134070475 longitude_in_degrees: -93.984193263656508 } return { result: true } }
E0630 09:21:57.489698 30228 player.cpp:107] index: 58889021
[principia.journal.serialization.CollisionSetRadius.extension] { in { executor: 1746217032704 radius: nan } }
[principia.journal.serialization.CollisionSetRadius.extension] { }
E0630 09:21:57.489698 30228 player.cpp:107] index: 58889023
[principia.journal.serialization.CollisionGetLatitudeLongitude.extension] { in { executor: 1746217032704 } }
[principia.journal.serialization.CollisionGetLatitudeLongitude.extension] { out { latitude_in_degrees: 
-45.734189037157428 longitude_in_degrees: -82.364727278886278 } return { result: true } }
E0630 09:21:57.489698 30228 player.cpp:107] index: 58889025
[principia.journal.serialization.CollisionSetRadius.extension] { in { executor: 1746217032704 radius: nan } }
[principia.journal.serialization.CollisionSetRadius.extension] { }

@pleroy
Copy link
Member

pleroy commented Jun 30, 2024

What's happening is that the computation of the altitude of the terrain of the Moon at multiple pairs (latitude, longitude) returns NaN. This should not happen (obviously) and we couldn't reproduce it. It's also worth noting that no-one has reported anything similar.

Are you by any chance using a mod that changes the terrain of the Moon?

@linecrafter
Copy link

Hello, I encountered the same issue when plotting an impact course with MCMF
Here are the journals, logs and a video recording of what I was doing:
https://drive.google.com/drive/u/2/folders/1pwulWOwjQF9JMsmfNdAhsQkYRNXRdAFY

While researching I also found a similar closed issue: #3872

Are you by any chance using a mod that changes the terrain of the Moon?

Personally i have Parallax mod installed as part of RSS-Reborn pack. If anything else is necessary for a report, please let me know.

Thank you.

@pleroy
Copy link
Member

pleroy commented Jul 20, 2024

Interesting to hear that you are using RSS-Reborn, it could be part of the problem as it touches the PQS.

Could you please give us complete information about the installation options that you picked for RSS-Reborn, including texture resolution and other options? We'll need that to try to reproduce the bug.

@linecrafter
Copy link

Hi, i'm using Luna 32k from here https://docs.google.com/document/d/1BfiIZ8_ZEh0lrx0nsIa27Lm7O2R4e2fKPli94XHga0Q
the rest are also from document and in the screenshot.
image

I also have parallax configs from github https://github.com/RSS-Reborn/RSS-Reborn/wiki/Installation

@pleroy
Copy link
Member

pleroy commented Jul 21, 2024

I was finally able to install RSS-Reborn (had some trouble, the installer was not working perfectly) but I could not reproduce the problem.

I am adding a check early in the game to detect the case where the terrain system returns NaN. If that happens, it would be easier to figure out which mod is causing trouble.

@pleroy pleroy closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants