WebGL Error on mobile. INVALID_OPERATION: readPixels: pixels is not TypeUint16
Describe the bug 💬
Tester is getting random crashes on Iphone. Pulled this error from log.
[Error] WebGL: INVALID_OPERATION: readPixels: pixels is not TypeUint16
readPixels
(anonymous function) (index-ac4969aa.js:3564:87659)
fromCubeRenderTarget (index-ac4969aa.js:4250:3865)
getSphericalHarmonicsArray (index-ac4969aa.js:4255:17531)
(anonymous function) (index-ac4969aa.js:4255:16656)
(anonymous function) (index-ac4969aa.js:4255:16689)
Is this related to https://github.com/mrdoob/three.js/issues/26765 ? If so, sounds fixed by Three?
We're using a procedural skybox and three reflection probes. Crash appears to happen at random times, sometimes instantly and sometimes after quite a while.
Operating System 👩💻
iOS (mobile)
What browsers are you seeing the problem on? 🏄♂️
Safari
Editor Version 🎲
2022.x
Needle Exporter version
3.24.0
Project Info (Unity only) 📜
No response
Steps to reproduce 🔢
Sry for no steps to repro here.
Reproduction ♻
No response
Discord or Discussion link
No response
Validations 🩹
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Needle-Engine-specific issue. For example if it's a Unity related bug, it should be reported to Unity instead.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [ ] The provided reproduction is a minimal reproducible example of the bug.
Thanks, I believe I've seen this before and it's not related to spherical harmonics – instead seems to be related to our on-device poster generation in dev mode running out of memory on some devices (I've seen it on older iOS devices).
We'll investigate; in the time being you can disable poster generation in the vite.config.js by adding noPoster: true:
We'll also soon-ish update three.js again, I do think that cubemap readback error should go away then.
Ok, I'll try that. But in dev mode? Maybe I misunderstand here but this happens on production builds.