-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 imported osu!stable scores being scaled by the classic scoring mode #23817
Conversation
osu.Game/Database/RealmAccess.cs
Outdated
if (replayFilename == null) | ||
continue; | ||
|
||
using (var stream = files.Store.GetStream(replayFilename)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should probably be under the try-catch too, to catch cases like possible missing files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have expanded the scope slightly. Apart from that, I think this is okay to go with. As I mentioned on discord, I don't think it's going to be a huge issue that this takes some time to run. It should be in the realm of seconds, and the startup time is already pretty long so I think users will be willing to wait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't that return the null
stream? If not this function isn't properly documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what kind of documentation you're expecting, but the underlying NativeStorage
doesn't do much apart from pass through stream functions from .NET, so best to play it safe:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to document that it both may return null
if the path doesn't exist (also needs to be nullable annotated but that's a given), which is the case that @bdach was mentioning, and also use <exception>
tags to describe that it also throws via the native calls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay well I may have used a bad example. Non-existent files may not be an issue with this method but after seeing the number of dumb errors on sentry that are related to people's weird and corrupt storages I just feel like it's way safer to guard everything defensively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's see how this pans out
Temporary fix for #23782 / #23756, preventing stable scores going into the billions when using the classic scoring mode.
It does NOT fix old lazer scores (which likely won't/can't be fixed), and does NOT convert SV1 to SV2 yet.