osu icon indicating copy to clipboard operation
osu copied to clipboard

Can't complete beatmaps on mobile

Open KornienkoDev opened this issue 6 years ago • 6 comments

Version: 2020.228.0 https://i.imgur.com/zHcnm2X.jpg

After finishing beatmap there is no score screen, osu just freezes.

KornienkoDev avatar Feb 28 '20 16:02 KornienkoDev

What are your specs?

Squiddu avatar Feb 28 '20 17:02 Squiddu

What are your specs?

Honor 9X China, Kirin 810. 4GB RAM. Android 9, EMUI 9.1.1.

KornienkoDev avatar Feb 28 '20 17:02 KornienkoDev

Same for me (Huawei Mate 9) when the beatmap ends, the game freeze definitely. But i have no message that says the game isn't responding. And lag spikes still here.

MTGPROD avatar Feb 28 '20 17:02 MTGPROD

Expanding scope to cover both mobile platforms.

bdach avatar Feb 28 '20 18:02 bdach

happens on ios, game completely locks up (like with the render freezes) but doesnt crash

ThatStella7922 avatar Feb 28 '20 19:02 ThatStella7922

Root cause is a TPL-induced deadlock when trying to import score at the end of gameplay:

https://github.com/ppy/osu/blob/e85c76b52d2b2969e7e406d1979cf4944be47533/osu.Game/Screens/Play/Player.cs#L611-L612

Draw thread calls .Wait() therefore blocking on a monitor, the score import runs fine until the end, but at the end tries to continue execution from previous context which is impossible since the draw thread is still blocked on the monitor.

Both commenting the import or sprinkling .ConfigureAwait(false) at Player and ArchiveModelManager resolve the deadlock but they're both entirely invalid solutions so I won't bother even showing them. Propagating async upwards from scheduleGotoRanking isn't really viable either since it's called in a synchronous context from OnExiting.

If I were to guess what the proper solution is, it's probably finding a better place to import where async can be used freely, or failing that, providing a fully synchronous path (much much worse).

Requires single-threaded mode for reproduction. Runs fine multi-threaded (tested on Android).

bdach avatar Feb 28 '20 20:02 bdach