- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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; }
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page