- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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;
}
링크가 복사됨
1 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.