Software Archive
Read-only legacy content
17061 Discussions

R6025 Pure virtual function call error when exiting program

Song_G_
Beginner
317 Views

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
317 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.

0 Kudos
Reply