radioman/WebRtc.NET

AccessViolationException when disconnected twice

JaebumLee opened this issue · 2 comments

WebRtc.NET.ManagedConductor.!ManagedConductor()
webrtc.net-master\webrtc.net\src\managed.cpp:line 377
WebRtc.NET.ManagedConductor.~ManagedConductor()
webrtc.net-master\webrtc.net\src\managed.cpp:line 217
WebRtc.NET.ManagedConductor.Dispose(Boolean A_0)
c:\program files (x86)\microsoft visual studio 14.0\vc\include\xatomic0.h:line 0
WebRtc.NET.ManagedConductor.Dispose()
WebRtc.NET.Demo.WebRTCServer.<>c__DisplayClass19_1.b__0()
WebRtc.NET-master\WebRtc.NET.Demo\WebRTCServer.cs:line 227
...

[managed.cpp]

!ManagedConductor()
{
	// free unmanaged data
	if (cd != NULL)
	{
		delete cd;		// **crash here!!**			
	}
	cd = NULL;
}

got the same issue. Anybody got a fix for this?

Same issue here.
Worked around it by changing the "using" of the WebRtcNative in WebRTCServer.cs to a try / catch (AccessViolationException e) without calling Dispose() on it in the finally block.
I know this is ugly and should not be done, but it may work for you @gerrosc .