Open smoogipoo opened 1 year ago
Can't repro. No idea how to. Would appreciate some kind of repro instructions.
As i said, there is no such. I happens randomly. Both in single/multithread, at all limiters, etc. It takes for me 2-3 BMS switches via left/right keys to trigger this. In actions below i use latest master
branch.
I have tried to log some info from the container with Logger.Log($"{(ReferenceEquals(timingPoint, lastTimingPoint) ? @"Points eq" : @"Not eq")}, {(beatIndex == lastBeat ? "ret" : "Fire")}, bi={beatIndex}, li={lastBeat}, ctt={Math.Round(currentTrackTime)}, tpt={timingPoint.Time}, diff={Math.Round(currentTrackTime - timingPoint.Time)} bl={beatLength}")
.
Output of this when this bug occurs:
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58768, tpt=1561, diff=57207 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58768, tpt=1561, diff=57207 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58708, tpt=1561, diff=57147 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58768, tpt=1561, diff=57207 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58768, tpt=1561, diff=57207 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58708, tpt=1561, diff=57147 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58768, tpt=1561, diff=57207 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58768, tpt=1561, diff=57207 bl=384,615384615385
[runtime] 2022-11-02 10:00:18 [verbose]: Points eq, ret, bi=148, li=148, ctt=58708, tpt=1561, diff=57147 bl=384,615384615385
TL;DR track time does not really change, just jumps back-forward on 60ms.
When i tried to log BeatSyncSource.Clock.CurrentTime
in if (IsBeatSyncedWithTrack)
, it really gives me equal values (there are probably logs from several containers, but time did not change for ~20 seconds):
[runtime] 2022-11-02 10:08:26 [verbose]: CTT from BSS: 59595,510204081635
[runtime] 2022-11-02 10:08:26 [verbose]: CTT from BSS: 59595,510204081635
[runtime] 2022-11-02 10:08:26 [verbose]: CTT from BSS: 59595,510204081635
[runtime] 2022-11-02 10:08:27 [verbose]: CTT from BSS: 59595,510204081635
[runtime] 2022-11-02 10:08:27 [verbose]: CTT from BSS: 59595,510204081635
My suspicion here is that IBeatSyncProvider
somehow gives the container an old track as clock after changing BMSes. In song select, IBeatSyncProvider
is OsuGameDesktop
.
Any hints what i can investigate further?
Thanks for the extra investigation. You're definitely on the right path, but I'm also not sure how this could happen yet. It's likely something to do with the local FramedBeatmapClock
thought.
My suspicion here is that
IBeatSyncProvider
somehow gives the container an old track as clock after changing BMSes. In song select,IBeatSyncProvider
isOsuGameDesktop
.
It's actually OsuGameBase
to be more specific:
You could try dropping a breakpoint on line 660 here and checking what state this local clock is in.
Or more specifically, check on this condition, which is 99% going to be where things are going wrong:
Discussed in https://github.com/ppy/osu/discussions/21062