ppy / osu

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

Dropdowns do not always open after closing them #18918

Open Gabixel opened 2 years ago

Gabixel commented 2 years ago

Type

Game behaviour

Bug description

Over the past few weeks, I noticed that some dropdowns would not open 100% of the time I went to click on them. Today I managed to record the problem. I have no idea if the double-click logic has anything to do with it. The issue seems to happen more frequently on my android phone. I've tried running lazer on the PC in single-threaded mode, but it doesn't seem to help reproduce the problem. I also tried limiting the FPS with an external program, hoping it had something to do with the framerate, but nothing.

My general settings (also used in the videos below):

Screenshots or videos

Here's the Android recording. The framerate is not the best, but this seems to be the best of my phone at the moment:

https://user-images.githubusercontent.com/43073074/176148851-eb4c7127-41e0-43ec-a823-a484c6baf27b.mp4

When I tried with the collections dropdown, you can hear that the menu opens and then closes immediately.

I managed to record the issue on desktop (but it seems to happen very rarely):

https://user-images.githubusercontent.com/43073074/176149359-e62ea8c4-9e4b-48dd-bfbb-97f056f9c7ff.mp4

Version

2022.621.0-lazer

Logs

n/a

peppy commented 2 years ago

This sounds like the double clicking issue (https://github.com/ppy/osu-framework/pull/5268 / https://github.com/ppy/osu/issues/18838). If so, it should be resolved next release. Please reopen this if you can still reproduce after the release.

Gabixel commented 2 years ago

I updated to the latest version (with the double-click logic fix), but unfortunately, it still seems reproducible.

Gabixel commented 2 years ago

I would also like to point out that, compared to what I wrote in the original post, maybe the framerate has something to do with it. I'm not 100% sure, but I just tried manually locking the FPS to a low number (with an external tool) and it seemed to happen more frequently (in single-threaded mode).

Gabixel commented 2 years ago

The issue happens at a specific time after the drop-down menu is closed (the low framerate helps with that).

One thing I noticed in the "transform" section of the Draw Visualiser when the problem occurs is that the menu seems to transition from a height of 0... to a height of 0 (but I don't know where else to check for more information): image

peppy commented 2 years ago

I believe this is going to have something to do with focus changing logic (which also triggers a closeAll() menus).

I can reproduce quite easily with limited frame rate and mashing. Seems like it will require a framework-side fix.

diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs
index 57369419d2..b6e57d1a6e 100644
--- a/osu.Game/OsuGameBase.cs
+++ b/osu.Game/OsuGameBase.cs
@@ -395,6 +395,8 @@ protected override void LoadComplete()
         {
             base.LoadComplete();

+            Host.UpdateThread.ActiveHz = 30;
+
             // TODO: This is temporary until we reimplement the local FPS display.
             // It's just to allow end-users to access the framework FPS display without knowing the shortcut key.
             fpsDisplayVisible = LocalConfig.GetBindable<bool>(OsuSetting.ShowFpsDisplay);
frenzibyte commented 2 years ago

Tried to reproduce this with low frame rate and both single/multi-threads, but to no avail for some odd reason...

peppy commented 2 years ago

I did try a second time and couldn't repro, so not too sure either.