I’m using the example script in the tutorials for unity called ScriptUsageTimeline.

I’m getting this error when I stop play mode:

ArgumentException: GCHandle value belongs to a different domain
System.Runtime.InteropServices.GCHandle.op_Explicit (IntPtr value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:127)
System.Runtime.InteropServices.GCHandle.FromIntPtr (IntPtr value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:172)
ScriptUsageTimeline.BeatEventCallback (EVENT_CALLBACK_TYPE type, EventInstance instance, IntPtr parameterPtr) (at Assets/_scripts/utility/ScriptUsageTimeline.cs:96)
(wrapper native-to-managed) ScriptUsageTimeline:BeatEventCallback (FMOD.Studio.EVENT_CALLBACK_TYPE,FMOD.Studio.EventInstance,intptr)
FMOD.Studio.System.release () (at Assets/thirdParty/Fmod/Plugins/FMOD/Wrapper/fmod_studio.cs:371)
FMODUnity.RuntimeManager.OnDestroy () (at Assets/thirdParty/Fmod/Plugins/FMOD/RuntimeManager.cs:470)

The music will continue playing until i force quit unity manually. Any hints how to solve this ?

Thank you.

  • You must to post comments

This error usually happens when an attempt to get a GCHandle from an IntPtr after that GCHandle has been freed.

What version of FMOD and Unity are you using?
Is the file edited in any way?

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.