question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AnimationMixer uncache bug

See original GitHub issue

Describe the bug

When calling the uncacheAction, uncacheClip, and uncacheRoot methods, an exception will be thrown.

To Reproduce

Steps to reproduce the behavior:

  1. Load robot model in webgl_animation_skinning_morph example
  2. Call the following js code
  3. See error

Code

clipCtrl.onChange( function () {
	fadeToAction( api.state, 0.5 );
        // The error will appear after two seconds
	setTimeout(() => {
		mixer.uncacheRoot(model);
	}, 2000);
} );

Screenshots

D148A648-0A0B-44DE-B364-B7C0D547DB1C

Platform:

  • Device: Desktop
  • OS: MacOS
  • Browser: Chrome
  • Three.js version: r129

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
mfkwgizhoujiancommented, Jun 25, 2021

Please share your code as a live example (and without any dependencies like react). It’s best to update the fiddle I have shared with my previous post: https://jsfiddle.net/hoy26z3a/2/

Sorry I can’t visit this website, and I upload the code again. This problem is very easy to reproduce. Modify the official example of threejs “webgl_animation_skinning_morph.html”, I added a timer to the state change event, and you can see the error after two seconds of state change.

0reactions
Mugen87commented, Jul 2, 2021

It’s hard to tell whether this is a bug or the expected behavior. Meaning it’s possible that the uncache* methods should only be used after certain or all animation actions are stopped.

For now, I think it’s better to just update the documentation and mentioned the usage of stop(). If more users complain, we can still change the code.

Read more comments on GitHub >

github_iconTop Results From Across the Web

miss binding.referenceCount++ error when AnimationMixer ... - GitHub
Describe the bug When use AnimationMixer.clipAction to generate an ... Uncaching a mesh while both animations are playbacked produces the issue.
Read more >
AnimationMixer wont play animation(gltf file) - Stack Overflow
It's necessary to update the animation mixer in the animation loop. Try it with this updated code var scene, renderer; var camera; var...
Read more >
firstInactiveBinding is undefined - Questions - three.js forum
The error description is “firstInactiveBinding is undefined” and it is being thrown by the AnimationMixer's _lendBindin… ... AnimationMixer uncache bug.
Read more >
Issue with mixing Animator and Timeline animations
Seems like potentially a bug in the Animation Mixer? I've tried playing around with the various types of Animation Extrapolation options, ...
Read more >
Why isn't my 3D animation playing? - Lens Studio Community
Near the top of the object's hierarchy, you will see an object that has an Animation Mixer component. Animations don't play automatically, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found