ppy / osu

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

Long delay on game exit with Alt+F4 #8160

Open AlanKiri opened 4 years ago

AlanKiri commented 4 years ago

When you use alt+f4 when the game says "See you next time" the music continues to play and osu is open. And after waiting 30 secs the game turns off.

https://www.youtube.com/watch?v=2Bj4ANg5FKw

2020.306.0

Logs: performance.log runtime.log updater.log database.log network.log

bdach commented 4 years ago

Not sure what this is about. Logs look clean, but I notice the timestamps don't match the time depicted on video - is the video from the same game run as the logs?

The high CPU usage is also curious.

AlanKiri commented 4 years ago

possibly my logs are wrong because I got them after shutting osu down. But you can try it yourself and get logs, this will work because my friends have same problem.

bdach commented 4 years ago

Nope, I can't reproduce with any screen mode. Logo fades to black fine, audio fades fine, process exits as soon as the window closes.

AlanKiri commented 4 years ago

You did alt+f4 when there was "see you next time" ?

bdach commented 4 years ago

Doing Alt+F4 while the "see you next time" sample is playing causes an instant exit here.

AlanKiri commented 4 years ago

Tommorow I'll send right logs and more videos, ok?

peppy commented 4 years ago

Does the same thing happen when exiting without using alt-f4?

Could you "create dump file" from the right click menu in task manager and send a link to download it (will be quite big). Please note it may contain osu! credentials so I would recommend against sharing it in this thread, or logout before you do so if you do. If you wish to send privately, pe@ppy.sh works.

huoyaoyuan commented 4 years ago

Does the same thing happen when exiting without using alt-f4?

I'm also hitting this by exiting with Esc and select Yes.

Call stack shown when I break it in IDE:

Waiting lock hold by thread 12216
... many CompositeDrawable.Dispose()
OsuFocusedOverlayContainer.Dispose()
... many CompositeDrawable.Dispose()
DatabasedKeyBindingContainer<GlobalAction>.Dispose()
... many CompositeDrawable.Dispose()
OsuGameBase.Dispose()
...
huoyaoyuan commented 4 years ago

Thread 12216 is executing textures.Get($@"https://a.ppy.sh/{user.Id}");, and blocked by lock of thread 8204. Thread 8204 is also acquiring user avatar, and is waiting for osu.Framework.IO.Network.WebRequest.Perform().

huoyaoyuan commented 4 years ago

Quick analysis: DrawableAvatar calls TextureStore.Get(), which locks a stores member and executes synchronized web request.