Build Failed / MissingReferenceException when uploading an avatar with VRCConstraints
tracked
kesera2
Summary
The build fails because of a MissingReferenceException caused by VRCConstraints.
Steps to Reproduce
- Create an avatar that uses VRCPositionConstraint(possibly with multiple sources).
 - Attempt to build and upload the avatar through the VRChat SDK.
 - The build process fails with the following error:
 
Build Failed
Your avatar failed to build or upload because of the following reason
The object of type "VRCPositionConstraint" 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.
We recommend taking a look at the console for more details
Note: The object of type "VRCPositionConstraint" can sometimes be replaced by other types of VRCConstraints depending on the avatar setup.
Expected Behavior
The avatar should upload successfully without exceptions.
Actual Behavior
The upload process fails with a MissingReferenceException.
Environment:
- VRChat SDK version: 3.8.2
 - Unity version: 2022.3.22f1
 - Reproducible: Sometimes
 
Additional Information
- After a build fails, VRCConstraints-related preview errors occur repeatedly and indefinitely until Unity is restarted.
 - According to @vr_hai, the issue seems to be caused by VRCConstraintManager.
 - This is my first bug report, so please let me know if any additional information is needed.
 
Log In
StormRel
marked this post as
tracked
kesera2
P.S. This issue can be temporarily avoided by reloading the VRChat SDK.
Tool bar > VRChat SDK > Reload SDK