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

A number of fixes related to #3332 #3338

Merged
merged 5 commits into from Mar 9, 2022
Merged

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Mar 9, 2022

  1. Change the C# regexp that parses our info logs to handle properly handle indic scripts.
  2. Change the consistency check that fires in #3332 to not cause undefined behaviour. Not severe in itself, but it would be good if the failure message didn't have junk float values.
  3. Make sure that, when we refuse to create a checkpoint because it would fall at the same time as a previous checkpoint, we leave the trajectory in a consistent state.

Consider what happens when we have the following collapsibility changes, all occurring at the same time t:

Segment #1 (NC) ⟶ Segment #2 (C) ⟶ Segment #3 (NC) ⟶ Segment #4 (C)

where NC indicates a non-collapsible segment and C a collapsible segment.

  • At the end of Segment #1, we create a checkpoint at time t containing all of Segment #1. We then create a new segment, Segment #2, which has initially one point.
  • Segment #2 ends immediately (remember that all the transitions are at time t), so it is left with a single point, and we create Segment #3, which has initially one point.

Then Segment #3 ends immediately and the story continues differently depending on the version of the code:

  • Before #3282, we try to create a checkpoint at time t and fail a CHECK in the Checkpointer class.
  • Before this PR, we don't create a second checkpoint at time t, but we create Segment #4. So Segment #3 is not collapsible, but it doesn't have a checkpoint either, and we are unable to reconstruct it. That's the crash observed in #3332.
  • After this PR, we don't create a second checkpoint at time t, we don't create Segment #4, and we destroy Segment #3, so that any future collapsible point gets appended to Segment #2. The hope is that this preserves the following invariants: (1) a collapsible segment always follows a checkpoint (2) segments alternate in collapsibility.

I believe that this fixes #3332 but I don't have a way to check for sure.

@eggrobin eggrobin added the LGTM label Mar 9, 2022
@pleroy pleroy merged commit 903411d into mockingbirdnest:master Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Game crashes when opening map view from vessels orbiting Minmus, or clicking on them in the tracking station
2 participants