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

Fix multiplayer not correctly pausing the track on initialisation #25079

Merged
merged 5 commits into from Oct 10, 2023

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Oct 10, 2023

This resolves crashes experience in the last release (before the hotfix):

https://sentry.ppy.sh/share/issue/34bf79ed73c043b58b09369f45835cd7/
https://sentry.ppy.sh/share/issue/8b4161417ef8438b984c6577b031195e/
https://sentry.ppy.sh/share/issue/506cd43cd7f646ea95ceb3a79eff6c33/

The title says this only affects multiplayer, but it also does have a small chance of affecting solo play (resolved by f0bd975).

Please see individual commit messages for further notes.

Closes #25048.

…ner`

This call is responsible for ensuring the clock is in a stopped state.
….Stop`

The reasoning is explained in the inline comment, but basically this was
getting blocked by `isPaused` being in an initial `true` state (as it is
on construction), while the source clock was still `IsRunning`.

There's no real guarantee of sync between the source and the `isPaused`
bindable right now. Maybe there should be in the future, but to restore
sanity, let's ensure that a call to `Reset` can at least stop the track
as we expect.
@bdach
Copy link
Collaborator

bdach commented Oct 10, 2023

My main - and rhetorical - question here is how did any of multiplayer work given these omissions?

I'm not gonna spend time digging into the answer to that. The fixes look good and generally harmless. I'll take this as a sign that the clock stuff is progressing in the correct direction in general.

@peppy
Copy link
Sponsor Member Author

peppy commented Oct 10, 2023

My main - and rhetorical - question here is how did any of multiplayer work given these omissions?

DecoupleableInterpolatingFramedClock used to stop the source implicitly. I believe on ChangeSource calls.

@bdach
Copy link
Collaborator

bdach commented Oct 10, 2023

DecoupleableInterpolatingFramedClock used to stop the source implicitly

💀 good riddance

Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
@bdach bdach enabled auto-merge October 10, 2023 14:07
@bdach bdach merged commit 0c64fe7 into ppy:master Oct 10, 2023
10 of 11 checks passed
@peppy peppy deleted the fix-player-startup-stop branch October 11, 2023 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some unhandled error occurs when the beatmap starts/loads in multiplayer.
2 participants