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
Describe the bug
I'm getting a crash pretty consistently in the Unity editor, and relatively often in a PC build. It seems to happen around when a webrtc connection is made or renegotiated, but because it's happening in a worker thread down in the mrwebrtc DLL and our version of mrwebrtc (2.0.2) doesn't ship with debug symbols, I'm having a hard time figuring out what exactly the problem is. Anyone have any ideas, or suggestions for how to debug further?
mrwebrtc.dll caused an Access Violation (0xc0000005)
in module mrwebrtc.dll at 0033:2cbe4e53.
Read from location 0000000000000000 caused an access violation.
Stack Trace of Crashed Thread 97600:
0x00007FFF45574E53 (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback
0x00007FFF4572CC59 (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback
0x00007FFF45728D99 (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback
0x00007FFF456F781C (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback
0x00007FFF455BABB0 (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback
0x00007FFF45584B3E (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback
0x00007FFF45584AA5 (mrwebrtc) mrsVideoTrackSourceRegisterArgb32FrameCallback
0x00007FFFCD807034 (KERNEL32) BaseThreadInitThunk
0x00007FFFCEA82651 (ntdll) RtlUserThreadStart
To Reproduce
Unfortunately, I don't have a repro setup that I can share publicly.
SDP messages
Here's an example of the offer and answer in a case where I got a crash. Note that both clients were on my local machine, so the IP address here is just localhost.
At this point, PeerConnection.HandleConnectionMessageAsync runs and the crash seems to occur sometime during its execution. It doesn't always happen at the same point in that C# because the crash is on a different thread.
We also sometimes do get another ICE message or two after the answer. Not sure if that's related? It could be our signaling solution is receiving messages out of order.
Environment
MR-WebRTC version: 2.0.2 for both
Platform: Occurs on Windows Desktop, both in the editor and a standalone build
Architecture: x86_64
Unity version (if applicable): 2020.3.11f1
Target device: Windows Desktop
Additional context
PeerConnection Unity script has one audio source and one receiver on both sides. We typically have video as well, but I can repro without video. Can also reproduce with no ICE servers listed.
Describe the bug I'm getting a crash pretty consistently in the Unity editor, and relatively often in a PC build. It seems to happen around when a webrtc connection is made or renegotiated, but because it's happening in a worker thread down in the mrwebrtc DLL and our version of mrwebrtc (2.0.2) doesn't ship with debug symbols, I'm having a hard time figuring out what exactly the problem is. Anyone have any ideas, or suggestions for how to debug further?
To Reproduce Unfortunately, I don't have a repro setup that I can share publicly.
SDP messages Here's an example of the offer and answer in a case where I got a crash. Note that both clients were on my local machine, so the IP address here is just localhost.
At this point,
PeerConnection.HandleConnectionMessageAsync
runs and the crash seems to occur sometime during its execution. It doesn't always happen at the same point in that C# because the crash is on a different thread.We also sometimes do get another ICE message or two after the answer. Not sure if that's related? It could be our signaling solution is receiving messages out of order.
Environment
Additional context
PeerConnection
Unity script has one audio source and one receiver on both sides. We typically have video as well, but I can repro without video. Can also reproduce with no ICE servers listed.