Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

UMat dealloc problem.

When the function reaches end of scope one particular UMat is failing to get deallocated and I'm getting this in call stack:

"UMat deallocation error: some derived Mat is still alive"

This is happening when I'm copying the UMat to Mat. If I dont copy to Mat then there is no issue. But I need the Mat version.

Code to reproduce:

cv::Mat x;
void some_function(cv::Mat x)
{
  cv::UMat y;
  x = y.getMat(cv::ACCESS_RW);
}

UMat dealloc problem.

When the function reaches end of scope one particular UMat is failing to get deallocated and I'm getting this in call stack:

"UMat deallocation error: some derived Mat is still alive"

This is happening when I'm copying the UMat to Mat. If I dont copy to Mat then there is no issue. But I need the Mat version.

Code to reproduce:

cv::Mat x;
void some_function(cv::Mat x)
{
  cv::UMat y;
  x = y.getMat(cv::ACCESS_RW);
}

Even adding y.release() in the end didn't solve the issue.