Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Undefined batcher in SpinePipe.updateRenderable() with empty clipping vertices #17

Closed
sta-ger opened this issue Jun 10, 2024 · 0 comments · Fixed by #21
Closed

Undefined batcher in SpinePipe.updateRenderable() with empty clipping vertices #17

sta-ger opened this issue Jun 10, 2024 · 0 comments · Fixed by #21

Comments

@sta-ger
Copy link

sta-ger commented Jun 10, 2024

When attempting to play one of the animations, I get the following error:

SpinePipe.ts:154 Uncaught
TypeError: Cannot read properties of undefined (reading 'updateElement')
    at SpinePipe.updateRenderable (SpinePipe.ts:154:44)
    at Xu.updateRenderable (RenderGroup.ts:187:65)
    at iE (RenderGroupSystem.ts:143:25)
    at Sl.render (RenderGroupSystem.ts:94:17)
    at Qo.emit (SystemRunner.ts:70:26)
    at L_.render (AbstractRenderer.ts:303:29)
    at lu.render (Application.ts:154:23)
    at li.emit (TickerListener.ts:64:26)
    at Pt.update (Ticker.ts:461:37)
    at Pt._tick (Ticker.ts:163:22)

The problem is that batchableSpineSlot.batcher is undefined during the execution of updateRenderable() at SpinePipe.

image

After some investigation, I've determined that in the addRenderable() method, the batchableSpineSlot for one of the attachments is marked as clipped but has an empty clippedData.vertices, which prevents this batchableSpineSlot from being added to the batch.
image

Adding one more condition that allows a slot with empty vertices to pass solves the problem.
image (1)

Is it intentional that slots with empty clipping vertices are not allowed to be added to the batch?

@GoodBoyDigital GoodBoyDigital linked a pull request Jun 17, 2024 that will close this issue
@Zyie Zyie closed this as completed in #21 Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant