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 crash on attempting to edit particular beatmaps #29534

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

bdach
Copy link
Collaborator

@bdach bdach commented Aug 20, 2024

Fix crash on attempting to edit particular beatmaps

Closes #29492.

I'm not immediately sure why this happened, but some old locally modified beatmaps in my local realm database have a BeatDivisor of 0 stored, which is then passed to BindableBeatDivisor.SetArbitraryDivisor(), which then blows up.

To stop this from happening, just refuse to use values outside of a sane range.

Clamp beat divisor to sane range when decoding

In my view this is a nice change, but do note that on its own it does nothing to fix #29492, because of BeatmapInfo reference management foibles when opening the editor. See also: #20883 (comment), #28473.

Closes ppy#29492.

I'm not immediately sure why this happened, but some old locally
modified beatmaps in my local realm database have a `BeatDivisor` of 0
stored, which is then passed to
`BindableBeatDivisor.SetArbitraryDivisor()`, which then blows up.

To stop this from happening, just refuse to use values outside of a sane
range.
In my view this is a nice change, but do note that on its own it does
nothing to fix ppy#29492, because of
`BeatmapInfo` reference management foibles when opening the editor. See
also: ppy#20883 (comment),
ppy#28473.
@bdach bdach added area:beatmap-parsing .osu file format parsing area:editor labels Aug 20, 2024
@smoogipoo smoogipoo merged commit 5bb9400 into ppy:master Aug 20, 2024
9 of 13 checks passed
@bdach bdach deleted the fix-divisor-crash branch August 20, 2024 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Playable beatmap can no longer be opened in the editor
2 participants