Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

Textures not loading #6

Open
Dinhero21 opened this issue Jul 16, 2023 · 3 comments
Open

Textures not loading #6

Dinhero21 opened this issue Jul 16, 2023 · 3 comments

Comments

@Dinhero21
Copy link
Owner

Dinhero21 commented Jul 16, 2023

Sometimes, at random, textures simply decide they should not load. AssetLoader.getTexture returns a "bricked" HTMLImageElement, load and error events are never fired and the image never exists this "limbo" state. Clearing the cache does not seem to fix it as when a new image is created and assigned the URL of the "bricked" image it also gets "bricked". The devtools preview shows a missing image with everything apart from that seemingly normal. This issue seems to be impossible to replicate on Firefox but easily on Brave.

@Dinhero21
Copy link
Owner Author

Something I just noticed is that the "bricked" texture has a warning in the Timing section of the Network devtools tab. See below:

image

@Dinhero21
Copy link
Owner Author

It also seems like the texture has to be loaded "naturally" for it to be "bricked". Forcefully loading the texture by calling loader.getTexture does not seem to trigger the issue.

@Dinhero21
Copy link
Owner Author

I would hypothesize that the problem is the server side being somehow overloaded by socket.io and/or the number of textures being fetched at once and not sending the texture properly. But if the issue was server side then it would not make sense for it to be browser-dependent, would it? Well actually maybe Firefox re-tries to get the image if it fails the first time explaining why the image will not "brick".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant