keeptrack.space icon indicating copy to clipboard operation
keeptrack.space copied to clipboard

uniformMatrix4fv fails in Earth.draw on some devices

Open Pesca46 opened this issue 3 years ago • 1 comments

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)

Pesca46 avatar Aug 19 '22 22:08 Pesca46

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.~~

thkruz avatar Aug 20 '22 15:08 thkruz

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.

thkruz avatar Oct 18 '22 11:10 thkruz

Closed because of 2db65d0804b69992eacce31d7f0c0b5af367db08

thkruz avatar Oct 18 '22 12:10 thkruz