Hello,
We are currently facing an issue with FMOD Studio 2.02.07 our Unity project (version 2021.3.14f1). The problem seems to be with the microphone functionality, even though we are not using any microphones in our application.
Issue Description:
We are consistently encountering an error message that reads: “Failed to get number of recording devices: ‘An invalid object handle was used.’ (36)”. This issue occurs four times; twice when logging into our game and twice when quitting playmode.
Error Callstacks:
Here are the callstacks associated with the error messages:
On Logging into the Game:
Failed to get number of recording devices: "An invalid object handle was used. " (36)
0x00007ff7e90facbd (Unity) StackWalker::GetCurrentCallstack
0x00007ff7e9101999 (Unity) StackWalker::ShowCallstack
0x00007ff7ea0688a3 (Unity) GetStacktrace
0x00007ff7ea70797d (Unity) DebugStringToFile
0x00007ff7e9511228 (Unity) AudioManager::ValidateFMODResult
0x00007ff7e9502405 (Unity) AudioManager::GetMicrophoneDeviceIDFromName
0x00007ff7e845624c (Unity) Microphone_CUSTOM_GetMicrophoneDeviceIDFromName
0x000002ce4c810bca (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Microphone:GetMicrophoneDeviceIDFromName (string)
0x000002ce4c810a13 (Mono JIT Code) UnityEngine.Microphone:End (string)
0x000002ce4c81077b (Mono JIT Code) [AudioCapture.cs:51] Inworld.AudioCapture:StopRecording ()
0x000002ce4c7cb93b (Mono JIT Code) [InworldController.cs:211] Inworld.InworldController:OnDisable ()
0x000002ce4c83f4c8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffc9c23feb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ffc9c17e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ffc9c17e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff7e901f644 (Unity) scripting_method_invoke
0x00007ff7e8ffeee4 (Unity) ScriptingInvocation::Invoke
0x00007ff7e8ffefce (Unity) ScriptingInvocation::InvokeChecked
0x00007ff7e9093f66 (Unity) SerializableManagedRef::CallMethod
0x00007ff7e8ff1872 (Unity) MonoBehaviour::RemoveFromManager
0x00007ff7e89abbf7 (Unity) GameObject::ActivateAwakeRecursivelyInternal
0x00007ff7e89ab809 (Unity) GameObject::ActivateAwakeRecursively
0x00007ff7e89ae4c9 (Unity) GameObject::Deactivate
0x00007ff7e8cc0135 (Unity) DestroyObjectHighLevel_Internal
0x00007ff7e8cc3401 (Unity) UnloadGameScene
0x00007ff7e8d1ea4a (Unity) LoadSceneOperation::PlayerLoadSceneFromThread
0x00007ff7e8d1ca43 (Unity) LoadSceneOperation::IntegrateMainThread
0x00007ff7e8d20711 (Unity) PreloadManager::UpdatePreloadingSingleStep
0x00007ff7e8d20cef (Unity) PreloadManager::WaitForAllAsyncOperationsToComplete
0x00007ff7e8d20286 (Unity) PreloadManager::UpdatePreloading
0x00007ff7e8ceef73 (Unity) InitPlayerLoopCallbacks'::
2’::EarlyUpdateUpdatePreloadingRegistrator::Forward
0x00007ff7e8cd614a (Unity) ExecutePlayerLoop
0x00007ff7e8cd62d6 (Unity) ExecutePlayerLoop
0x00007ff7e8cdc389 (Unity) PlayerLoop
0x00007ff7e9c205a9 (Unity) PlayerLoopController::UpdateScene
0x00007ff7e9c1e7ab (Unity) Application::TickTimer
0x00007ff7ea06ea3a (Unity) MainMessageLoop
0x00007ff7ea0732fb (Unity) WinMain
0x00007ff7eb414fbe (Unity) __scrt_common_main_seh
0x00007ffd2d627344 (KERNEL32) BaseThreadInitThunk
0x00007ffd2ebe26b1 (ntdll) RtlUserThreadStart
On Quitting Playmode:
Failed to get number of recording devices: "An invalid object handle was used. " (36)
0x00007ff7e90facbd (Unity) StackWalker::GetCurrentCallstack
0x00007ff7e9101999 (Unity) StackWalker::ShowCallstack
0x00007ff7ea0688a3 (Unity) GetStacktrace
0x00007ff7ea70797d (Unity) DebugStringToFile
0x00007ff7e9511228 (Unity) AudioManager::ValidateFMODResult
0x00007ff7e9502405 (Unity) AudioManager::GetMicrophoneDeviceIDFromName
0x00007ff7e845624c (Unity) Microphone_CUSTOM_GetMicrophoneDeviceIDFromName
0x000002ce4657bf2a (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Microphone:GetMicrophoneDeviceIDFromName (string)
0x000002ce4657bc43 (Mono JIT Code) UnityEngine.Microphone:End (string)
0x000002ce4657ba6b (Mono JIT Code) [AudioCapture.cs:51] Inworld.AudioCapture:StopRecording ()
0x000002ce465766fb (Mono JIT Code) [InworldController.cs:211] Inworld.InworldController:OnDisable ()
0x000002ce1944e4a8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffc9c23feb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ffc9c17e764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ffc9c17e8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff7e901f644 (Unity) scripting_method_invoke
0x00007ff7e8ffeee4 (Unity) ScriptingInvocation::Invoke
0x00007ff7e8ffefce (Unity) ScriptingInvocation::InvokeChecked
0x00007ff7e9093f66 (Unity) SerializableManagedRef::CallMethod
0x00007ff7e8ff1872 (Unity) MonoBehaviour::RemoveFromManager
0x00007ff7e89abbf7 (Unity) GameObject::ActivateAwakeRecursivelyInternal
0x00007ff7e89ab809 (Unity) GameObject::ActivateAwakeRecursively
0x00007ff7e89ae4c9 (Unity) GameObject::Deactivate
0x00007ff7e8cc0135 (Unity) DestroyObjectHighLevel_Internal
0x00007ff7e8cbfd84 (Unity) DestroyObjectHighLevel
0x00007ff7e8cca6be (Unity) DestroyWorldObjects
0x00007ff7e9efe8e1 (Unity) EditorSceneManager::RestoreSceneBackups
0x00007ff7e9c0bb8d (Unity) PlayerLoopController::ExitPlayMode
0x00007ff7e9c1b641 (Unity) PlayerLoopController::SetIsPlaying
0x00007ff7e9c1ea39 (Unity) Application::TickTimer
0x00007ff7ea06ea3a (Unity) MainMessageLoop
0x00007ff7ea0732fb (Unity) WinMain
0x00007ff7eb414fbe (Unity) __scrt_common_main_seh
0x00007ffd2d627344 (KERNEL32) BaseThreadInitThunk
0x00007ffd2ebe26b1 (ntdll) RtlUserThreadStart
I am not a dev, just the audio guy. I would greatly appreciate any guidance or solutions you could provide to resolve this. Is this a known issue with FMOD Studio 2.02.07 and Unity 2021.3.14f1? Are there any patches or workarounds available to address this problem?
Thank you very much for your time!
Best Regards,
Merlin