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

Empty transform matrix causing reference errors #6495

Merged

Conversation

rawnsley
Copy link
Contributor

A recent update to Chrome (128) appears to have exposed a bug, as described in this Discord post.

I traced at least one cause (there may be more) to the use of a temporary array in the hoverable-visuals component. A threejs matrix is copied into the array and then the position elements are read and ultimately submitted as uniforms to the WebGL shader. However, if interactorOne or interactorTwo are not active, the matrix is not written and the required elements are never initialized. Seeding the array with a unit matrix fixes the problem.

It's not clear why this has only just started causing a runtime issue. Perhaps Chrome used to interpret undefined as zero instead of throwing a TypeError?

@Exairnous
Copy link
Contributor

LGTM. Merging.

@Exairnous Exairnous merged commit 49fe109 into Hubs-Foundation:master Aug 28, 2024
@rawnsley rawnsley deleted the matrix-init-for-browser-freeze branch August 28, 2024 07:42
Exairnous added a commit that referenced this pull request Sep 24, 2024
Fixes #6496

Chromium version 128 introduced a bug in Hubs that was fixed by
#6495 but PR#6495 seems
to have introduced the bug detailed in issue#6496 for all browsers.
Now Chromium has fixed an issue on their end as detailed here:
https://issues.chromium.org/issues/361823993 which should fix
the original bug that PR#6495 addressed in Hubs, which allows us
to revert the fix on the Hubs side (PR#6495) and so fix the
issue#6496 bug.  However, this doesn't do anything for the
potentially deeper issues in the system that were possibly exposed
with PR#6495.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants