VRCConstraintsBase.OnEnable produces MissingReferenceException checking execution order with Physbones
available in future release
Dor․
This occurs when the game object the constraint is attached to (or a parent of it) is enabled, looks like a missing null check. I'm almost certain this didn't happen prior to world dynamics.
MissingReferenceException: The object of type 'VRCPhysBone' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
VRC.Dynamics.VRCPhysBoneBase.GetRootTransform () (at <c68519bcd1064a18b5ee443ce1f5aaf9>:0)
VRC.Dynamics.VRCConstraintBase.DeterminePhysBoneDependency (UnityEngine.Transform constraintEffectiveTarget, VRC.Dynamics.VRCPhysBoneBase physBone) (at <c68519bcd1064a18b5ee443ce1f5aaf9>:0)
VRC.Dynamics.VRCConstraintBase.ReEvaluatePhysBoneOrder () (at <c68519bcd1064a18b5ee443ce1f5aaf9>:0)
VRC.Dynamics.VRCConstraintManager.RegisterConstraint (VRC.Dynamics.VRCConstraintBase constraint) (at <c68519bcd1064a18b5ee443ce1f5aaf9>:0)
VRC.Dynamics.VRCConstraintBase.OnEnable () (at <c68519bcd1064a18b5ee443ce1f5aaf9>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
Log In
Are_
I get this issue a lot too. It happens when a constraint were monitoring a physbone, and then that physbone got removed.
You can check it by viewing inspector in Debug mode for the constraint (Click the 3 vertical dots in the top right and select Debug), then scroll down and expand the Monitored Phys bones.
If this is the same issue as I regularly get, there should be several missing references there.
Sadly, I do not know how to empty this list without remaking the constraint completely.
This post was marked as
available in future release
Dor․
SDK 3.10.2-beta.1 still produces exceptions when performing prefab operations (right clicked an added game object ->
Added GameObject -> Apply as Override in Prefab ...
), I've not yet handled any overrides for VRC Constraints to see if the inspector still fails to draw, but they are present on the avatar I'm working on.EDIT: It appears to be happening with just about every action, including redo/undo, applying overrides from outside a prefab or within it.
MissingReferenceException: The object of type 'VRCPhysBone' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
VRC.Dynamics.VRCPhysBoneBase.GetRootTransform () (at <9ea6696cf148486aadc6bc5ef3d8ba3c>:0)
VRC.Dynamics.VRCConstraintBase.DeterminePhysBoneDependency (UnityEngine.Transform constraintEffectiveTarget, VRC.Dynamics.VRCPhysBoneBase physBone) (at <9ea6696cf148486aadc6bc5ef3d8ba3c>:0)
VRC.Dynamics.VRCConstraintBase.ReEvaluatePhysBoneOrder () (at <9ea6696cf148486aadc6bc5ef3d8ba3c>:0)
VRC.Dynamics.VRCConstraintManager.RegisterConstraint (VRC.Dynamics.VRCConstraintBase constraint) (at <9ea6696cf148486aadc6bc5ef3d8ba3c>:0)
VRC.Dynamics.VRCConstraintBase.OnEnable () (at <9ea6696cf148486aadc6bc5ef3d8ba3c>:0)
UnityEditor.GenericMenu:CatchMenu(Object, String[], Int32)
Dexvoid
Dor․ Thank you for the extra information. I've passed this on internally.
Please note that the fix for the issue originally reported here is not included in
3.10.2-beta.1
; this Canny report will be marked as Available in Future Release once it's staged to go out.Dexvoid
marked this post as
tracked
Dexvoid
marked this post as
needs more information
Are you seeing this issue after animating a constraint on via an animation on an avatar, or enabling a constraint via logic in a world?
Dor․
Dexvoid Seeing this in the avatar SDK, when enabling/disabling avatars/objects inside an avatar in the scene, in a prefab heavy workflow (may be relevant, I did not test whether these errors happen on unpacked objects).