Crash when loading user with no avatar in social browser
See original GitHub issueIt is crashing with Forbidden.
result.
Relevant output:
[network:verbose] Performing request osu.Game.Online.API.Requests.GetFriendsRequest
[network:verbose] Request to https://osu.ppy.sh/api/v2/friends successfully completed!
[network:verbose] Request to https://osu.ppy.sh/images/headers/profile-covers/c8.jpg successfully completed!
[network:verbose] Request to https://osu.ppy.sh/images/headers/profile-covers/c1.jpg successfully completed!
[network:verbose] Request to https://a.ppy.sh/519024 successfully completed!
[.. some more successfull completions later]
[network:verbose] Request to https://a.ppy.sh/442979 failed with System.Net.WebException: Forbidden.
[network:verbose] Request to https://a.ppy.sh/579171 failed with System.Net.WebException: Forbidden.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
discord crashing when trying to edit server profile
I can go to my overall settings and edit my profile there with no ... it lets me edit the avatar and username...
Read more >[Fixed] Android apps continuously crashing for some Pixel ...
In what may be an emerging issue, some Pixel owners are reporting continuous Android app crashes with no straightforward fix.
Read more >Why is the app crashing/freezing and how do I fix it?
Possible reasons the app is crashing or freezing are: Not enough RAM on the device. The app cache is full. Not enough storage...
Read more >Instagram bug affecting some users causing iOS app to crash
An Instagram bug that causes the iOS app to crash on opening has been affecting a number of users on Wednesday. On the...
Read more >DndBeyond crashes my browser when I try to load a ...
I can navigate the site, even the "My Characters" page itself, but trying to 1. view one of my existing character sheets and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Frontear
Well, you are right there. The thing is the issue does occur under release. The exception is thrown and unhandled anyway (swallowed), but that doesn’t interfere with the game. (Default Avatar is loaded)
osu!Framework’s WebRequest class should not be ignoring 403 Forbidden errors. Good coding practice says no exception swallowing.
What actually happens is since osu! sees the request as Complete (since the server returns with 403 but sends the image anyway), the exception is ignored.
As to why it is an issue in VS, that is because it is set to check if any and all exceptions are handled.
TL;DR: Is it an issue? No. Could it be an issue if WebRequest gets used on a different context? Yes.
EDIT: Spelling.
VS breaks at this point (before line executes): https://github.com/ppy/osu-framework/blob/61e676094d25436bb9e8858946f65c43d15d8e01/osu.Framework/IO/Network/WebRequest.cs#L358
This is where it complains about WebException…
In the Avatar loading case, the catch block on OnlineStore.cs (https://github.com/ppy/osu-framework/blob/61e676094d25436bb9e8858946f65c43d15d8e01/osu.Framework/IO/Stores/OnlineStore.cs#L24) returns null regardless of the exception (VS thinks this is swallowing? Then why not break here?).
I have no idea why VS complains. No failed action is triggered though. And default avatar is loaded, and thus execution resumes normally.