VRC_AnimatorPlayAudio tries to play a disabled audio source which can logspam
available in future release
Jordo
I was playing and encountered an avatar that constantly tries to play a disabled audio source and this produces a warning (Unity warning) like so:
2024.10.17 06:37:05 Warning - Can not play a disabled audio source
ÏÍÏÎÎÎÏÌÌÏÍÎÌÍÍÌÌÌÍÌÍÎÍ:ÍÍÌÌÏÏÌÍÏÌÍÍÌÌÏÍÍÎÏÌÎÏÎ(VRC_AnimatorPlayAudio, Animator)
There should probably be a check to make sure the audio source isn't disabled before trying to play the audio.
Log In
This post was marked as
available in future release
_
_tau_
Merged in a post:
VRC Animator Play Audio component causes gigabytes of log file bloating.
- Lumine -
------------------------------------------
Affected parties:
---
Affects all PC based platforms, but only if Debug > Logging is enabled.
Many people have this feature enabled due to the existence of certain third party applications, or for their own uses in world/avatar development / debugging.
------------------------------------------
------------------------------------------
Issue:
---
Log file located in APPDATA/LocalLow/VRChat/vrchat becomes rapidly bloated by avatars that use the VRC Animator Play Audio Component in certain ways.
A single component is enough to create a 100-200mb log file in an hour.
If I were to spam this component onto an animator and put it on an avatar, I could easily immediately create a multi-gigabyte file just from someone loading my avatar in. (Could easily be used maliciously and undetectably by VRChats current automated systems.)
It also causes extreme lag and crashes in unity projects with the world SDK, as it reads error logs into the console window.
------------------------------------------
------------------------------------------
Replication:
---
See attached images and replicate them onto an FX layer.
Rapidly calling an animation brick that has an Animator Play Audio attempting to play a disabled exampleSound Game Object that has an audio source with a simple permanently true 0 exit time transition on it will generate a log file bloated with the error:
Can not play a disabled audio source
UnityEngine.AudioSource:PlayDelayed (single)
------------------------------------------
------------------------------------------
Solution:
---
Add a simple check to see if the audio sources attached gameobject is enabled before attempting to play it.
JanieUwU
if (object != null) source.Play();
Simple check could be something like this maybe?
Liindy
can confirm, just had to add a fix to my Card Bending asset to ensure this no longer happens to people that use my asset. Seems like a bit of an oversight, would be really nice to have a fix for it
- Lumine -
Update:
Unsure if it's a direct cause, but excessively large log files appear to cause memory related crashes. My game has crashed multiple times from testing a more powerful version of 'tupper destroyer' in my home world.
- Lumine -
I made a new canny based on my findings with JanieUwU from earlier this morning and detailed how it occurs. If you make an animation layer that spams the exploit that creates this error, your log file can literally go into the gigabytes+ range.
JanieUwU
The new card asset on gumroad by Liindy is confirmed to cause this. When it is enabled on an avatar that has it, the spamming stops. When turning it off in the expression menu it resumes.
StormRel
tracked