ppy / osu

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

Unhandled exception at osu.Game.Online.API.APIRequest.Perform #3881

Closed ghost closed 3 years ago

ghost commented 5 years ago

Describe your problem:

Process exit due to request timeout.

Screenshots or videos showing encountered issue:

N/A. See stack trace below.

osu!lazer version: 4b0cad145581441cb44c41b2241c0b4352770ff6

Logs:

Unhandled Exception: System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Request to https://osu.ppy.sh/api/v2/beatmapsets/148980/download timed out after 10 seconds idle (read 0 bytes, retried 0 times).) ---> System.Net.WebException: Request to https://osu.ppy.sh/api/v2/beatmapsets/148980/download timed out after 10 seconds idle (read 0 bytes, retried 0 times).
   at osu.Framework.IO.Network.WebRequest.Complete(Exception e)
   at osu.Framework.IO.Network.WebRequest.internalPerform()
   at osu.Framework.IO.Network.WebRequest.PerformAsync()
   at osu.Framework.IO.Network.WebRequest.Perform()
   at osu.Game.Online.API.APIRequest.Perform(APIAccess api) in /home/binota/Repositories/osu/osu.Game/Online/API/APIRequest.cs:line 96
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
   --- End of inner exception stack trace ---
   at osu.Framework.Threading.Scheduler.Update()
   at osu.Framework.Threading.GameThread.ProcessFrame()
   at osu.Framework.Platform.GameHost.<>c__DisplayClass98_0.<Run>b__1(Object <p0>, FrameEventArgs <p1>)
   at osuTK.GameWindow.RaiseUpdateFrame(Stopwatch watch, Double elapsed, Double& timestamp)
   at osuTK.GameWindow.DispatchUpdateFrame(Stopwatch watch)
   at osuTK.GameWindow.Run(Double updates_per_second, Double frames_per_second)
   at osu.Framework.Platform.GameHost.Run(Game game)
   at osu.Desktop.Program.Main(String[] args) in /home/binota/Repositories/osu/osu.Desktop/Program.cs:line 46
[1]    2682 abort (core dumped)  dotnet exec ~/Repositories/osu/osu.Desktop/bin/Release/netcoreapp2.2/osu!.dll

Computer Specifications: OS: Arch Linux 4.19.7-arch1-1-ARCH .NET Core SDK: 2.2.100

peppy commented 5 years ago

Could you please test again on the latest master?

ghost commented 5 years ago

@peppy It still got exit when timeout

I've uploaded full log output here: https://pastebin.com/QaX2K1NB The way I reproduce this issue is disconnect the wireless while downloading a beatmap from osu!direct.

peppy commented 5 years ago

Thanks. A slightly different case which I'll look into. Can you confirm the above behaviour is fixed though? ie. your network reconnects and starts working again after a failure

ghost commented 5 years ago

The above is fixed. I think now it's trigger from the different place.

It's wired, I am not familiar with C# but I just set up Rider to dig into this issue.

image

Seems like the Exception was not throw from the BeatmapManager but the Scheduler. Why the Exception instance is the previous one?

peppy commented 5 years ago

Yeah I have a good idea of why the new one you found is happening, should be fixed for today's release.

smoogipoo commented 5 years ago

@BinotaLIU confirm if this is fixed?

peppy commented 3 years ago

Closing as probably-fixed.