Showing results for 
Search instead for 
Did you mean: 

Unhandled exception in SDK when using FaceModule and SampleReader concurrently on Windows 10 UWP

I need to use the high res color stream of the SampleReader plus the FaceModule in a Windows 10 UWP app.

It works fine to show the color image stream through StreamReader.Activate() - similar to the DF_StreamReader_UWP_CS example.

However, if I add the initialization of the FaceModule, the app init method still finishes successfully (status codes = no error). But directly afterwards, the RealSense SDK crashes the app with an unhandled win32 exception - before the first frame arrives. If I deactivate the SampleReader activation, face tracking works.

_senseManager = SenseManager.CreateInstance();
_reader = SampleReader.Activate(_senseManager, StreamType.STREAM_TYPE_COLOR, 640, 480, 30);
_reader.SampleArrived += ReaderOnSampleArrived;

_faceModule = FaceModule.Activate(_senseManager);   // Crashes if this line is present

var status = await _senseManager.InitAsync();
status = _senseManager.StreamFrames();


The DF_FaceViewer_UPW_CS example from the SDK uses the processed image of the FaceModule for the on-screen display (_faceModule.Sample). But that obviously results in lower quality images and very low FPS.

Any ideas on how to make it work to combine face tracking with the StreamReader?

System: Windows 10 (1511, 10586.318), RealSense SR300 with the latest SDK (

0 Kudos
0 Replies