microsoft / MixedReality-WebRTC

MixedReality-WebRTC is a collection of components to help mixed reality app developers integrate audio and video real-time communication into their application and improve their collaborative experience
https://microsoft.github.io/MixedReality-WebRTC/
MIT License
913 stars 283 forks source link

Too many AudioReceiver causing Unity to crash #747

Open goodlxs880 opened 3 years ago

goodlxs880 commented 3 years ago

Describe the bug I have one MicrophoneSource to send voice and five AudioReceiver to recive ovices from server, it is ok, but the UnityEditor crashed if i set six or more AudioReceiver.

Stacks for Running Threads Call Stack for Thread 24500: 0x00007FFC0418CDA4 (ntdll) ZwWaitForSingleObject 0x00007FFC01E7165E (KERNELBASE) WaitForSingleObjectEx 0x00007FFB7836A28E (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback 0x00007FFB78380312 (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback 0x00007FFB78309A5A (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback 0x00007FFB782A5CFD (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback 0x00007FFB782A5152 (mrwebrtc) mrsRemoteAudioTrackCreateReadBuffer 0x0000026861433915 (Microsoft.MixedReality.WebRTC) Microsoft.MixedReality.WebRTC.Interop.RemoteAudioTrackInterop.RemoteAudioTrack_CreateReadBuffer() 0x0000026861433573 (Microsoft.MixedReality.WebRTC) Microsoft.MixedReality.WebRTC.RemoteAudioTrack.CreateReadBuffer() 0x0000026861433472 (Microsoft.MixedReality.WebRTC.Unity) Microsoft.MixedReality.WebRTC.Unity.AudioRenderer.StartReadBuffer() 0x0000026861433313 (Microsoft.MixedReality.WebRTC.Unity) Microsoft.MixedReality.WebRTC.Unity.AudioRenderer.StartRendering() 0x000002686143311C (UnityEngine.CoreModule) UnityEngine.Events.InvokableCall1.Invoke() 0x0000026861432AA1 (UnityEngine.CoreModule) UnityEngine.Events.UnityEvent1.Invoke() 0x000002686143257B (Microsoft.MixedReality.WebRTC.Unity) Microsoft.MixedReality.WebRTC.Unity.AudioReceiver.OnPaired() 0x000002686143218B (Microsoft.MixedReality.WebRTC.Unity) Microsoft.MixedReality.WebRTC.Unity.MediaLine.UpdateAfterSdpReceived() 0x000002686140A683 (Microsoft.MixedReality.WebRTC.Unity) d23.MoveNext() 0x00000268614086B2 (mscorlib) System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start() 0x0000026861406C43 (Microsoft.MixedReality.WebRTC.Unity) Microsoft.MixedReality.WebRTC.Unity.PeerConnection.HandleConnectionMessageAsync() 0x00000268613E9BAB (Assembly-CSharp) d24.MoveNext() 0x00000268373912E1 (UnityEngine.CoreModule) UnityEngine.SetupCoroutine.InvokeMoveNext() 0x00000268373914D0 (UnityEngine.CoreModule) .runtime_invoke_void_object_intptr() 0x00007FFB8160D6B0 (mono-2.0-bdwgc) mono_get_runtime_build_info 0x00007FFB81592912 (mono-2.0-bdwgc) mono_perfcounters_init 0x00007FFB8159B96F (mono-2.0-bdwgc) mono_runtime_invoke

Screenshots image

Environment Unity Editor