ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.33k stars 2.28k forks source link

Beatmap import fails when spamming the download button on a specific map #27812

Open hrfarmer opened 6 months ago

hrfarmer commented 6 months ago

Type

Game behaviour

Bug description

On this beatmap, whenever I open the map through osu direct and spam the download button, there is a good chance that the import will fail, like something is being interrupted. I tried some other maps and am not able to replicate the issue, so it could be an issue with this specific map though.

Screenshots or videos

https://github.com/ppy/osu/assets/58487401/9f806f31-c322-4550-878e-b4c3f40316db

Version

2024.312.1-lazer

Logs

compressed-logs.zip

64ArthurAraujo commented 6 months ago

I think that's intended since queueing up the same beatmap import 20 times would be unnecessary.

hrfarmer commented 6 months ago

Yeah that's true, my point is that I don't think spamming the button should start any more processes in the first place, I don't see how that would be intended

64ArthurAraujo commented 6 months ago

Yeah that's true, my point is that I don't think spamming the button should start any more processes in the first place, I don't see how that would be intended

I see now. Agreed. Maybe you can try this on a Marathon map that is certain to take a little while to import i think that may be it.

Rekunan commented 6 months ago

Logs also seem to not have anything for the failures, only the successes. I think not allowing processes after the first download is a good idea. @ppy/team-client

smoogipoo commented 6 months ago

I can't repro. The game also should already be deduping downloads:

https://github.com/ppy/osu/blob/15d286e57d8acc9d3967b63857c2cb0bfa283230/osu.Game/Database/ModelDownloader.cs#L52

https://github.com/ppy/osu/blob/15d286e57d8acc9d3967b63857c2cb0bfa283230/osu.Game/Database/ModelDownloader.cs#L125

https://github.com/ppy/osu/blob/15d286e57d8acc9d3967b63857c2cb0bfa283230/osu.Game/Beatmaps/BeatmapModelDownloader.cs#L15-L16