uniformMatrix4fv fails in Earth.draw on some devices
User Description
Type what you were trying to do here...
Error Title
TypeError
Error Message
Failed to execute 'uniformMatrix4fv' on 'WebGL2RenderingContext': Overload resolution failed.
Stack
TypeError: Failed to execute 'uniformMatrix4fv' on 'WebGL2RenderingContext': Overload resolution failed. at Object.draw (https://www.keeptrack.space/js/4.e8d8818096dd0814d251.js:2:295685) at ie (https://www.keeptrack.space/js/4.e8d8818096dd0814d251.js:2:275519)
Traced the issue to: https://github.com/thkruz/keeptrack.space/blob/ee043d29822a70010675cc759743c4ca1624e520/src/js/drawManager/sceneManager/earth.ts#L361
Can you provide some info.
What browser are you using and what kind of device were you using?
Does this happen on load or were you in the middle of doing something?
~~My initial guess is that you are on an older device and/or browser which can't handle the resolution it is attempting to use.~~
The problem appears to have been that pMatrix was not correctly generated. Possibly a race condition. I have added some defensive code at the beginning that will try to identify that situation and rerun calculatePMatrix to hopefully resolve the issue.
Closed because of 2db65d0804b69992eacce31d7f0c0b5af367db08