Software Archive
Read-only legacy content
17060 토론

R6025 Pure virtual function call error when exiting program

Song_G_
초급자
884 조회수

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 포인트
1 응답
Song_G_
초급자
884 조회수

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 포인트
응답