1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 16:50:21 +08:00
Files
osu-lazer/osu.Game/Database
T
Bartłomiej Dach d4fc6693b4 Fix stable scores importing with a LegacyOnlineID of 0
Closes https://github.com/ppy/osu/issues/33435.

The root cause of the issue is that the user's database contained a
whole lot of scores with `LegacyOnlineID` of 0, which would trip up

	https://github.com/ppy/osu/blob/97e6187f0d7c3dbee896596a623e34627135bf0e/osu.Game/Extensions/ModelExtensions.cs#L128-L129

as that method would thus consider scores that are not the same as the
same because of the zero, which later trips up

	https://github.com/ppy/osu/blob/97e6187f0d7c3dbee896596a623e34627135bf0e/osu.Game/Screens/Ranking/SoloResultsScreen.cs#L79

which ends up inserting `Score` into the list several times, which
causes the crash.

You might remember that I tried to fix this once before in
https://github.com/ppy/osu/pull/24794. What I did not realise, however,
is that stable *can still produce replays* that have an online ID of
zero in them, because zero *is just `default(long)`*:

	https://github.com/peppy/osu-stable-reference/blob/7205341bb70000a87fa1bd54e7642772e2af85d7/osu!/GameplayElements/Scoring/Score.cs#L123
	https://github.com/peppy/osu-stable-reference/blob/7205341bb70000a87fa1bd54e7642772e2af85d7/osu!/GameplayElements/Scoring/Score.cs#L350

The alternative way of fixing this would be just to change
`MatchesOnlineID` to reject zeroes, but I think this is a saner overall
direction.
d4fc6693b4 · 2025-06-10 11:54:11 +02:00
History
..
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2022-06-17 16:37:17 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2023-06-24 01:00:03 +09:00
2022-06-17 16:37:17 +09:00
2023-06-24 01:00:03 +09:00
2024-04-30 21:47:03 +08:00
2024-07-03 00:19:04 +09:00