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

Fixes null @ currentBatch due flush() calls @ LightPipeline.js #6822

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

urueda
Copy link

@urueda urueda commented May 17, 2024

This PR: Fixes a bug

Test scenario:

  1. Mesh gameobject -> .setPipeline('Light2D')
  2. Applying a rotation to the mesh
    The test might reveal an exception/crash due null values at currentBatch property of LightPipeline.
    Crash flow: MeshWebGLRenderer -> setGameObject -> setNormalMapRotation -> flush

Rationale: setGameObject @ MeshWebGLRenderer invoking a flush @ setNormalMapRotation and making currentBatch=null.
The crash happens @ MeshWebGLRenderer once reading a property on currentBatch (null).

The next test scenario might reveal an exception/crash due null values at currentBatch property of LightPipeline:

1) Mesh gameobject -> .setPipeline('Light2D')
2) Applying a rotation to the mesh
2) Crash flow: MeshWebGLRenderer -> setGameObject -> setNormalMapRotation -> flush

Rationale: setGameObject @ MeshWebGLRenderer invoking a flush @ setNormalMapRotation and making currentBatch=null.

The crash happens @ MeshWebGLRenderer  once reading a property on currentBatch (null).
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.

None yet

1 participant