I found that this happens if I set a PointLight’s .mapSize.width and .mapSize.height too big (4096x4096). Then the app just crashes with nothing but this totally useless error on the screen, the console empty.
Wish Safari threw a catchable error rather than just crashing the tab.
this error comes from too much vram usage on iphones. some iphones may accept 4k textures, but as you’ve experienced some don’t, so i’d recommend sticking to 2k.
@alex-shortt Thanks. I wonder if there’s a way to detect the error rather than, for example, setting a lower size depending on navigator.platform which is what my current workaround is for iPhone.
afaik safari’s behavior is to just crash if the vram reaches some threshold. but that threshold is different per device and, since the memory is shared between cpu/gpu, can be different depending on other processes running on the phone.
besides the edge case of 4k textures, all you can do is try to lower memory usage by using smaller textures or compressing them with ktx
The problem is though, how do we detect the crash at runtime, so that we can adjust accordingly (instead of using User Agent sniffing)? This isn’t clear because the whole Safari tab simply crashes with nothing in the console.