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

Never set waitingOnFrames if a replay is not attached #27504

Merged
merged 2 commits into from Mar 6, 2024

Conversation

peppy
Copy link
Sponsor Member

@peppy peppy commented Mar 5, 2024

For next release to see if it helps with the seeking backwards issue. Or gives us more clues.

@peppy peppy added the next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! label Mar 6, 2024
@peppy peppy requested a review from a team March 6, 2024 04:42
@bdach
Copy link
Collaborator

bdach commented Mar 6, 2024

Well I attempted to exercise this by doing a crude

diff --git a/osu.Game/Rulesets/UI/FrameStabilityContainer.cs b/osu.Game/Rulesets/UI/FrameStabilityContainer.cs
index b49924762e..a291cc014c 100644
--- a/osu.Game/Rulesets/UI/FrameStabilityContainer.cs
+++ b/osu.Game/Rulesets/UI/FrameStabilityContainer.cs
@@ -31,6 +31,7 @@ public sealed partial class FrameStabilityContainer : Container, IHasReplayHandl
 
         public bool AllowBackwardsSeeks { get; set; }
         private double? lastBackwardsSeekLogTime;
+        private bool weDidALittleTrolling;
 
         /// <summary>
         /// The number of CPU milliseconds to spend at most during seek catch-up.
@@ -127,6 +128,13 @@ public override bool UpdateSubTree()
 
         private void updateClock()
         {
+            if (!weDidALittleTrolling && Time.Current >= 5000)
+            {
+                Logger.Log("TROLLING HAS OCCURRED");
+                waitingOnFrames.Value = true;
+                weDidALittleTrolling = true;
+            }
+
             if (waitingOnFrames.Value)
             {
                 // if waiting on frames, run one update loop to determine if frames have arrived.

and I didn't get a 12-second seek back, but I did get a 1-frame pause:

[runtime] 2024-03-06 08:34:13 [verbose]: TROLLING HAS OCCURRED
[runtime] 2024-03-06 08:34:13 [verbose]: GameplayClockContainer stopped via call to StopGameplayClock
[runtime] 2024-03-06 08:34:13 [verbose]: GameplayClockContainer started via call to StartGameplayClock

So I'd give this a 50-50 chance of doing something to fix the issue (or fix most of it but not fix it completely)...

@bdach bdach merged commit b740481 into ppy:master Mar 6, 2024
15 of 17 checks passed
@peppy peppy deleted the replay-state-sanity-1 branch March 7, 2024 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:gameplay next release Pull requests which are almost there. We'll aim to get them in the next release, but no guarantees! size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants