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

Bug: null texture in the batcher (8.2.3 regression) #10737

Closed
LazeKer opened this issue Jul 11, 2024 · 1 comment
Closed

Bug: null texture in the batcher (8.2.3 regression) #10737

LazeKer opened this issue Jul 11, 2024 · 1 comment

Comments

@LazeKer
Copy link

LazeKer commented Jul 11, 2024

Current Behavior

Since 8.2.3 having two (or more) sprites and changing the visibility of one of them will replace the texture (in batcher textures array) with a null and throw during rendering:

TypeError: Cannot read properties of null (reading 'source')
    at GlTextureSystem.bind (GlTextureSystem.mjs:53:28)
    at GlBatchAdaptor.execute (GlBatchAdaptor.mjs:56:24)
    at BatcherPipe.execute (BatcherPipe.mjs:53:19)
    at executeInstructions (executeInstructions.mjs:7:40)
    at RenderGroupSystem.render (RenderGroupSystem.mjs:50:5)
    at SystemRunner.emit (SystemRunner.mjs:19:20)
    at WebGLRenderer.render (AbstractRenderer.mjs:89:25)
    at _PixiApplication.render (Application.mjs:29:19)
    at TickerListener.emit (TickerListener.mjs:40:18)
    at _Ticker2.update (Ticker.mjs:257:29)

Expected Behavior

Should not throw an error

Steps to Reproduce

You need two sprites with different textures and set visible to false to one of them

Environment

Possible Solution

I would say it should either:

  • Remove the entry from the batcher textures (heavier)
  • Handle null/undefined textures

Additional Information

No response

@LazeKer
Copy link
Author

LazeKer commented Jul 11, 2024

fixed by #10733

@LazeKer LazeKer closed this as completed Jul 11, 2024
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

No branches or pull requests

1 participant