osu icon indicating copy to clipboard operation
osu copied to clipboard

Fix song select crashing on beatmap with two difficulties of same online ID

Open frenzibyte opened this issue 6 months ago • 2 comments

  • Closes https://github.com/ppy/osu/issues/33552

As per the thread above, this can be repro'd by using the editor's "external edit" feature and either have two difficulties with the same name but different online IDs, or two difficulties with the same online ID but different names (the case in the thread above).

I was going to add test coverage for this, but the scenarios are weird enough that perhaps this should be properly fixed in a post-process that is fired after the user finishes editing beatmaps externally. But until that happens, I'm not sure if the relevant code in carousel should be as strict as it is. I've left a TODO comment at least.

frenzibyte avatar Jun 08 '25 06:06 frenzibyte

but the scenarios are weird enough that perhaps this should be properly fixed in a post-process that is fired after the user finishes editing beatmaps externally

I'm not sure how this invalidates the need for a test.

peppy avatar Jun 09 '25 03:06 peppy

To reiterate, this change is more of a workaround for a very edge case that doesn't even make sense to test for, but since you find it better, I'll push the test.

frenzibyte avatar Jun 09 '25 05:06 frenzibyte

Where are we with this PR? There are still duplicates streaming in of this exact crash trace. Latest being https://github.com/ppy/osu/issues/34655.

bdach avatar Aug 14 '25 07:08 bdach

I'm hoping to get @peppy's response on whether it's OK to remove this TODO comment as you suggested in https://github.com/ppy/osu/pull/33558#discussion_r2174634284. I don't have any opinion on that myself because I'm not well-versed in this area. The fix/workaround is ready to go otherwise.

frenzibyte avatar Aug 14 '25 09:08 frenzibyte

If you two can agree on a forward path here then I'm fine with that. Just make sure it's documented.

peppy avatar Aug 14 '25 09:08 peppy

compile failures

bdach avatar Aug 14 '25 11:08 bdach