MixedReality-WebRTC icon indicating copy to clipboard operation
MixedReality-WebRTC copied to clipboard

Check failed: adm() when running without VS Code

Open frgt10cs opened this issue 4 years ago • 5 comments

I followed tutorial (https://microsoft.github.io/MixedReality-WebRTC/manual/cs/helloworld-cs-core3.html) and made simple console application with .NET Core 3.1. When I run it within VS Code it works correctly. But when I run just compiled .exe it shows error after a few seconds after initializing peer connection:

Fatal error in: ../../media/engine/webrtcvoiceengine.cc, line 253
last system error: 0
Check failed: adm()

Why can't my application work without VS Code? Am I doing something wrong?

frgt10cs avatar Aug 25 '21 06:08 frgt10cs

This is a problem with your sound setup. Likely you don't have a microphone available. webrtcvoiceengine.cc is the code capturing the microphone; if it fails this means there's a problem during initialization.

djee-ms avatar Aug 25 '21 07:08 djee-ms

I have a microphone and I allowed it to be used in apps on Windows settings. When I run my app within VS Code, this error doesn't appear

frgt10cs avatar Aug 25 '21 07:08 frgt10cs

I'm not sure what "within VS code" vs. "compile the exe" means. They should run the same executable, just a different parent process. Only things that can differ are the environment / start path, which is unlikely to affect audio, and maybe the microphone being already in use so failing to initialize?

djee-ms avatar Aug 25 '21 07:08 djee-ms

When i run app in VS Code it uses the following command:

& 'c:\Users\Me\.vscode\extensions\ms-dotnettools.csharp-1.23.14\.debugger\vsdbg.exe' '--interpreter=vscode' '--connection=4c1b17a5a29f44c9be65b565e6c510e3'

And all works!

When I try to run app:

.\bin\Debug\netcoreapp3.1\WebRTC.exe

It crashes with error which I described above

No, microphone is not in use already

frgt10cs avatar Aug 25 '21 07:08 frgt10cs

I understand that these two ways of launching uses the same exe to run, but the results is different -_-

frgt10cs avatar Aug 25 '21 07:08 frgt10cs