Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGL Error on mobile. INVALID_OPERATION: readPixels: pixels is not TypeUint16 #187

Open
5 of 6 tasks
snorulf opened this issue Dec 4, 2023 · 2 comments
Open
5 of 6 tasks
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@snorulf
Copy link

snorulf commented Dec 4, 2023

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 mrdoob/three.js#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 🩹

@snorulf snorulf added the untriaged Newly reported issue label Dec 4, 2023
@snorulf snorulf changed the title Crash on mobile WebGL Error on mobile. INVALID_OPERATION: readPixels: pixels is not TypeUint16 Dec 4, 2023
@hybridherbst
Copy link
Contributor

hybridherbst commented Dec 5, 2023

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:
image

We'll also soon-ish update three.js again, I do think that cubemap readback error should go away then.

@hybridherbst hybridherbst added bug Something isn't working documentation Improvements or additions to documentation and removed untriaged Newly reported issue labels Dec 5, 2023
@snorulf
Copy link
Author

snorulf commented Dec 6, 2023

Ok, I'll try that. But in dev mode? Maybe I misunderstand here but this happens on production builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants