Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Song_G_
Beginner
60 Views

R6025 Pure virtual function call error when exiting program

I am writing a face tracking program. It displays color image. Whenever the program closes, It shows the R6025 error, which says pure virtual function call.

It disappears when I comment out the code to convert PXCMImage to Writablebitmap. Can someone help to figure out what causes the error? Thanks!

public WriteableBitmap Convert2Image(PXCMCapture.Sample sample)
        {
            PXCMImage.ImageData data;
            sample.color.AcquireAccess(PXCMImage.Access.ACCESS_READ, PXCMImage.PixelFormat.PIXEL_FORMAT_RGB32, out data);
            WriteableBitmap wbmp = data.ToWritableBitmap(STREAM_WIDTH, STREAM_HEIGHT, 96.0, 96.0);
            sample.color.ReleaseAccess(data);
            return wbmp;
        }

 

0 Kudos
1 Reply
Song_G_
Beginner
60 Views

Solved the issue after debugging line by line.

The error is caused by function call between threads (mine is wpf UI thread and realsense thread).

sensemanager.StreamFrames(false) will use a different thread.

Hope this can help someone.

Reply