League-of-Foundry-Developers / simplefog

A module for FoundryVTT that lets you draw fog of war manually
MIT License
18 stars 15 forks source link

Crash on Firefox #26

Closed Havoclivekiller closed 3 years ago

Havoclivekiller commented 3 years ago

The module seems to crash on Firefox lately. Probably an update to the browser? I've a large map 15k x 10k and it seems to crash when it wants to load the fog image (or when I try to move around). The console doesn't show any errors before it.

Failed to allocate internal command buffer. WebGL context was lost. Failed to create WebGL context: SendPWebGLConstructor failed Failed to allocate internal command buffer. WebGL context was lost. Failed to allocate internal command buffer. WebGL context was lost.

VanceCole commented 3 years ago

This is usually because your GPU is struggling with the texture size involved in rendering the fog. The fog uses an image texture and 15kx10k is a fairly large map. With the buffer region the 15k dimension may exceed 16k which is a common limitation point on GPUs. Does it only happen on large maps? If so you may need to scale your map down somewhat in an image editor.

Simplefog does attempt to scale down the fog resolution when approaching a limit, but it's not the smartest about it and sometimes will still fail. I believe SF uses the core function to detect this threshold, so if that changed in core it may explain why you are suddenly having problems. I will try to look into it soon.

Havoclivekiller commented 3 years ago

It started to happen suddenly, worked before and it works normally on Chrome. I got the crashes too and I've got a GTX3090.

crhampton1 commented 3 years ago

Probably not much we can do with this, so closing, but will keep it on our list to investigate.