Skip to content

Comments

Fix crash when model has no clipping masks#27

Merged
RaSan147 merged 3 commits intoRaSan147:masterfrom
shinshin86:fix/cubism4-no-clipping-crash
Apr 28, 2025
Merged

Fix crash when model has no clipping masks#27
RaSan147 merged 3 commits intoRaSan147:masterfrom
shinshin86:fix/cubism4-no-clipping-crash

Conversation

@shinshin86
Copy link

Models that contain zero clipping masks do not create renderer._clippingManager, so the first frame threw:

Cannot set properties of undefined (setting '_currentFrameNo')

Added an early-return guard:

if (!this.renderer._clippingManager) {
  return;
}

Nothing changes when a clipping manager is present; models without masks now load and render normally.

This appears to address the same symptom described in #12

I would appreciate your review—thank you!

@RaSan147
Copy link
Owner

Thanks a lot, I had little to no knowledge in the underlying render pipeline. Will test and approve.

@RaSan147
Copy link
Owner

Can you kindly run the CI action in your repo and share the link. Then we can approve

@shinshin86
Copy link
Author

shinshin86 commented Apr 27, 2025

Hi @RaSan147 ,

I found that the previous failure was caused by an incorrect ref value in the workflow, which I’ve now removed. (686d282)

The workflow runs successfully in my fork.
https://github.com/shinshin86/pixi-live2d-display-lipsyncpatch/actions/runs/14697024806

Could you please click “Approve and run” so the CI can execute on this PR?
If anything still breaks, I’ll fix it right away.

Thanks for your help!

@RaSan147
Copy link
Owner

Looks good, merging. Thanks a lot for all your help. 🤩

@RaSan147 RaSan147 merged commit 01e14cd into RaSan147:master Apr 28, 2025
@shinshin86 shinshin86 deleted the fix/cubism4-no-clipping-crash branch April 28, 2025 06:34
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