question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gameplay deadlocks at map start after retry

See original GitHub issue

Describe the bug: Was playing maps, decided to retry the map and ended up stuck at the start without any indication of it trying to start. Pause menu didn’t function, etc. however alt+f4 brought me back to the start with an unhandled exception in the code block below

2020-12-09 21:05:14 [verbose]: working beatmap updated to UNDEAD CORPORATION - Frozen (Daycore) [Everything Will Freeze]
2020-12-09 21:05:19 [verbose]: Screen changed → PlayerLoader
2020-12-09 21:05:24 [verbose]: Screen changed → Player
2020-12-09 21:05:41 [verbose]: Screen changed ← PlayerLoader
2020-12-09 21:05:41 [verbose]: Screen changed → Player
2020-12-09 21:05:41 [verbose]: Unhandled exception has been allowed with 0 more allowable exceptions .
2020-12-09 21:05:41 [error]: An unhandled error has occurred.
2020-12-09 21:05:41 [error]: System.InvalidOperationException: A screen should not be loaded before being pushed.
2020-12-09 21:05:41 [error]: at osu.Framework.Screens.ScreenStack.Push(IScreen source, IScreen newScreen)
2020-12-09 21:05:41 [error]: at osu.Framework.Screens.ScreenExtensions.Push(IScreen screen, IScreen newScreen)
2020-12-09 21:05:41 [error]: at osu.Game.Screens.Play.PlayerLoader.<pushWhenLoaded>b__61_1() in /repos/osu/osu.Game/Screens/Play/PlayerLoader.cs:line 369
2020-12-09 21:05:41 [error]: at osu.Framework.Threading.ScheduledDelegate.RunTaskInternal()
2020-12-09 21:05:41 [error]: at osu.Framework.Threading.Scheduler.Update()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Drawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Graphics.Containers.CompositeDrawable.UpdateSubTree()
2020-12-09 21:05:41 [error]: at osu.Framework.Platform.GameHost.UpdateFrame()
2020-12-09 21:05:41 [error]: at osu.Framework.Threading.GameThread.ProcessFrame()

Screenshots or videos showing encountered issue: https://streamable.com/dgnds9 https://streamable.com/r2i34c

osu!lazer version: Local release build @ 231c3414d7c7fc623f41810b4269fe3f6dea06d0

Logs:

database.log network.log performance.log runtime.log

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Joehuucommented, Dec 10, 2020

I can reproduce 100% of the time (if you are patient enough of getting second step right):

  • load same map ^, or any epilepsy map
  • when map is done loading, hover visual settings until it goes to gameplay
  • when in player, press quick retry

kzN4xX0XQk

1reaction
peppycommented, Dec 10, 2020

@bdach seems your suspicion is almost on the mark (although figuring out what was actually going on was made a bit more difficult due to https://github.com/ppy/osu-framework/pull/4084 - meaning the logs show that Player is pushed a final time, but this never actually occurs).

We don’t want to schedule an extra pushWhenLoaded when the operation succeeds. Currently due to it being in finally, it is doing this, running one extra time, which can result in two scenarios:

  • The second run happens on returning to the screen, at which point it’s fine (will early return at readyForPush because the player instance is in a Loaded state, not Ready).
  • The second run happens on the next frame, before the current player has been displayed. One would think “but this is fine - there’s a null check on scheduledPushPlayer!”, but unfortunately if the OnSuspending is run after the first schedule but before the second, it will trigger a cancelLoad which resets this to null. This allows a second scheduledPushPlayer to occur, to be eventually run after returning to the screen.

A simple solution would be adding a call to cancelLoad() in OnResuming, but not 100% sure we want this level of flaky logic in the first place. Will look at refactoring the whole process, I think.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Valorant Deadlock guide: All ability timings and how to use ...
Deadlock is a Valorant Agent designed to stop enemies from overwhelming a particular area of the map. The Sentinel's cutting-edge technology ...
Read more >
VALORANT Deadlock Agent Guide
In this impressions guide, we've got you covered with everything you need to know about Deadlock's abilities, best maps, and synergies.
Read more >
After a deadlock, why should application code wait before ...
2 Answers. Without a delay, deadlock retries could 'slam' the network/disk/database with activity until the loop stops. It's much better to ...
Read more >
Valorant Deadlock Abilities Explained
Valorant's Deadlock is equipped with abilities perfect for slowing down enemies and gathering intel, including a broken ultimate that can ...
Read more >
999. Spoiler Free Explanation of Flow Locks and Keys
When these are crossed out, it means they are still locked i.e. they represent a route in the game you cannot yet travel....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found