- Home /
Unity crashing on audio but not in editor?
currently the project runs fine and there is audio for music and various effects using PlayOneShot functionality. However if i build to web stream-able or a desktop windows build it plays no audio, then when either reloading a scene (Application.loadLevel()) or exiting the application it crashes with this roughly as the output:
An invalid object handle was used.
(Filename: ....\Runtime\Audio\AudioSource.cpp Line: 240)
An invalid object handle was used.
(Filename: ....\Runtime\Audio\AudioSource.cpp Line: 247)
Unloading 11 unused Assets to reduce memory usage. Loaded Objects now: 745. Unloading 3 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0) An invalid object handle was used. UnityEngine.AudioSource:PlayOneShot(AudioClip, Single) UnityEngine.AudioSource:PlayOneShot(AudioClip) $:MoveNext() UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) CollapseBlock:CollapseBlock$StartCoroutine_Auto$CollapseBlock+$InitiateCollapse$21+$(Object, Object[]) Boo.Lang.Runtime.RuntimeServices:Dispatch(Object, String, Type[], Object[], DispatcherFactory) Boo.Lang.Runtime.RuntimeServices:Dispatch(Object, String, Object[], DispatcherFactory) Boo.Lang.Runtime.RuntimeServices:Invoke(Object, String, Object[]) UnityScript.Lang.UnityRuntimeServices:Invoke(Object, String, Object[], Type) GameManager:AttemptMove(String) GameManager:GrabPlayerInputs() GameManager:Update()
[....\Runtime\Audio\AudioSource.cpp line 240] (Filename: ....\Runtime\Audio\AudioSource.cpp Line: 240)
An invalid object handle was used. UnityEngine.AudioSource:PlayOneShot(AudioClip, Single) UnityEngine.AudioSource:PlayOneShot(AudioClip) $:MoveNext() UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator) CollapseBlock:CollapseBlock$StartCoroutine_Auto$CollapseBlock+$InitiateCollapse$21+$(Object, Object[]) Boo.Lang.Runtime.RuntimeServices:Dispatch(Object, String, Type[], Object[], DispatcherFactory) Boo.Lang.Runtime.RuntimeServices:Dispatch(Object, String, Object[], DispatcherFactory) Boo.Lang.Runtime.RuntimeServices:Invoke(Object, String, Object[]) UnityScript.Lang.UnityRuntimeServices:Invoke(Object, String, Object[], Type) GameManager:AttemptMove(String) GameManager:GrabPlayerInputs() GameManager:Update()
[....\Runtime\Audio\AudioSource.cpp line 247] (Filename: ....\Runtime\Audio\AudioSource.cpp Line: 247)
any help or ideas would be appreciated, thanks!