ppy / osu-stable-issues

Report critical osu-stable issues here
59 stars 11 forks source link

Difficulty calculation stucks after editing a map #1226

Closed cihe13375 closed 3 months ago

cihe13375 commented 3 months ago

Sometimes the difficulty calculation stucks forever after editing a map. I don't know the exact procedure of reproducing this, it just happens sometimes. Once it happens, the SR of the edited map would stuck at 0* until restarting the game. In runtime.log there are multiple lines of "difficulty calculation timed out".

See the video below. Note that the SR becomes 0* after 1:11 and is never updated again.

https://github.com/ppy/osu-stable-issues/assets/33959010/423c81c4-5ae8-4172-ab7c-75bbeb99a14f

The map in video is https://osu.ppy.sh/beatmapsets/1558304#osu/3183167, though I have encountered the issue on several different maps.

tilda commented 3 months ago

can vouch for this issue. one way to fix without restarting the game is to go into test mode for a sec to force a calculation, but this is per difficulty so especially on larger mapsets it isn't ideal

peppy commented 3 months ago

@tsunyoku can you take a look into this one?

tsunyoku commented 3 months ago

I can't seem to reproduce this one at all, tried with the same beatmap deleting objects in various places and each time I'm consistently getting correct star rating.

Using the video attached, it does look like the issue specifically here is that calculations can be slower than expected - the times it appear as 0 it looks like you are only sitting in song select for up to 1 second while the times it does* work is at least 2 or 3.

If I analyse the first ~50 seconds of the video (these timings might not be perfect but they're good enough to show a trend):

This could just be an unfortunate coincidence and obviously it isn't ideal that it isn't fast enough to calculate in all of these cases, but this video is the only thing I have to work with when I can't seem to reproduce it locally.

Even in the cases it does work, you can notice it displays 0 initially* so on first glance I think this is an issue with calculations being slower than expected rather than timing out or not working.

@cihe13375 could I get your runtime.log from a time you've re-produced this so I can figure out if the timeouts you mentioned are due to you editing this beatmap, or if it's due to other beatmaps you have imported?

cihe13375 commented 3 months ago

Using the video attached, it does look like the issue specifically here is that calculations can be slower than expected - the times it appear as 0* it looks like you are only sitting in song select for up to 1 second while the times it does work is at least 2 or 3.

If I analyse the first ~50 seconds of the video (these timings might not be perfect but they're good enough to show a trend):

No, I'm not complaining that the SR calculation is slow. The bug appears after 1:11 - when the SR is never updated again, no matter how long I wait. In the first 1 min of video I'm just trying to trigger this bug.

What I'm doing in the video is basically: 1) enter a map 2) edit the map, then exit 3) before the SR calculation completes, enter the map again 4) repeat 2) and 3). After like every 2 repeats, stay at song select for a while to see if the bug appears

I'm doing this because it's rumored that the issue is related to SR calculation get interrupted or something, though I'm not sure. Anyway, I can consistently reproduce this after trying for a sufficiently long time (like in the video).

@cihe13375 could I get your runtime.log from a time you've re-produced this so I can figure out if the timeouts you mentioned are due to you editing this beatmap, or if it's due to other beatmaps you have imported?

runtime.log (I replaced actual usernames with placeholders; other parts are untouched)

tsunyoku commented 3 months ago

Thanks for clarification and for the attached log. Log confirms that the timeout is happening on this beatmap so there's definitely something going wrong here. I have some ideas on what might be causing this to happen - give me a day or 2 to investigate and I'll update here with my findings.

tsunyoku commented 3 months ago

I've pushed some changes which are targeted at fixing this problem. Please wait for the next cutting edge release and let me know if the issue is resolved.

peppy commented 3 months ago

A build is now on cutting edge with this change, please test it out. I'll close this issue for now, but feel free to comment if you still run into it.