Search Issue Tracker
Won't Fix
Votes
0
Found in
2021.3.44f1
2022.3.48f1
6000.0.21f1
6000.1.0a1
Issue ID
UUM-82561
Regression
No
Crash on mecanim::SetValueWeight when switching the AnimationMixerPlayable connection with Animator's UpdateMode set to "Animate Physics"
Steps to reproduce:
1. Open the “users attached project”
2. Open the “SampleScene”
3. Enter Play Mode
4. Observe the crash
Reproducible with versions: 2021.3.44f1, 2022.3.48f1, 6000.0.21f1
Reproducible on: macOS 14.6.1 (Intel)
Not reproducible on: no other environment tested
Notes:
- Also reproducible in Standalone Player
Workaround:
- Creating PlayableGraph via AnimationPlayableUtilities
First few lines of StackTrace:
{noformat}#0 0x000001070f438f in mecanim::SetValueWeight(mecanim::ValueArrayWeight, float)
#1 0x000001070b4073 in AnimationMixerPlayable::MixerProcess(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput, void (AnimationPlayable::)(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput), void (AnimationMixerPlayable::)(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput), void (AnimationMixerPlayable::)(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput), void (AnimationMixerPlayable::)(AnimationPlayableEvaluationOutput, AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput, float), void (AnimationMixerPlayable::)(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput, float))
#2 0x000001070b4248 in AnimationMixerPlayable::ProcessRootMotion(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput)
#3 0x000001070b4248 in AnimationMixerPlayable::ProcessRootMotion(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput)
#4 0x00000107033c14 in (anonymous namespace)::ProcessPlayableGraph(Animator::AnimatorJob&, AnimationPlayableEvaluationConstant&, AnimationPlayableEvaluationInput&, AnimationPlayableEvaluationOutput&, void ()(AnimationPlayableEvaluationConstant&, AnimationPlayable&), void ()(AnimationPlayableEvaluationConstant&, AnimationPlayableEvaluationInput&, AnimationPlayableEvaluationOutput&), void ()(AnimationPlayableEvaluationOutput&, AnimationPlayableEvaluationConstant&, AnimationPlayableEvaluationInput&, AnimationPlayableEvaluationOutput&, float), void ()(AnimationPlayableEvaluationConstant&, AnimationPlayableEvaluationInput&, AnimationPlayableEvaluationOutput&), void (AnimationPlayable::)(AnimationPlayableEvaluationConstant, AnimationPlayableEvaluationInput, AnimationPlayableEvaluationOutput*)){noformat}
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- VFX Graph Documentation dropdown button does nothing when clicked on the right side
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
Resolution Note:
Currently, the stage responsible for preparing and rebinding the PlayableGraph is only executed during the normal update loop, even if the "animate physics" is selected on the animator. This mismatch can lead to issues because the necessary preparation/rebinding doesn’t happen during FixedUpdate, meaning that an evaluation of the still dirty graph will lead to a crash in some edge cases.
Unfortunately, while we do acknowledge that the issue found by the user is problematic, fixing this behavior without risking regressions in other projects and packages (ex : timeline) is not feasible at the moment, so we will be marking this issue as "Won't Fix."
However, we do have some workarounds for you:
1.
Manual Evaluation in FixedUpdate:
Set the PlayableGraph’s update mode to DirectorUpdateMode.Manual.
Manually call the Evaluate() function in the FixedUpdate() of a MonoBehaviour.
Example:
// Assuming you have a reference to the playable graph
playableGraph.SetTimeUpdateMode(DirectorUpdateMode.Manual);
void FixedUpdate()
{
playableGraph.Evaluate();
}
2.
Sync Using Reflection (Experimental):
Use the method AnimationPlayableGraphExtensions.SyncUpdateAndTimeMode(this PlayableGraph graph, Animator animator) via reflection, as this method is internal only. This can help sync the preparation stage with the Animator’s update mode. Note that this method is less tested, so please proceed with caution.