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
898 stars 278 forks source link

Check failed: adm() when running without VS Code #809

Open frgt10cs opened 2 years ago

frgt10cs commented 2 years ago

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?

djee-ms commented 2 years ago

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.

frgt10cs commented 2 years ago

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

djee-ms commented 2 years ago

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?

frgt10cs commented 2 years ago

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 commented 2 years ago

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