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.

Crash when loading user with no avatar in social browser

See original GitHub issue

It 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:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
xWTyronecommented, Apr 22, 2018

@Frontear

if the issue occurs in the debugger, that means it will occur with similar conditions under release, except the user can’t continue their program.

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.

0reactions
xWTyronecommented, Apr 26, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

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