System information (version)
- OpenCV => 4.4.0
- Operating System / Platform => Windows 10 64 Bit
- Compiler => Visual Studio 2019 (16.6.2)
Detailed description
When compiled in debug mode I get the following warning logged to the console from when executing the cv::dnn::forward function when using the opencl target.
! OPENCV warning: getUMat()/getMat() call chain possible problem.
! Base object is dead, while nested/derived object is still alive or processed.
! Please check lifetime of UMat/Mat objects!
The program seems to be running fine even with the warning indicating that it is the warning that is invalid.
This warning is not produced with a release compilation or when running without setting a prefrable target.
Steps to reproduce
I can reproduce the issue with a modified version of the learnopencv dnn example at https://github.com/spmallick/learnopencv/blob/master/FaceDetectionComparison/face_detection_opencv_dnn.cpp
The following additional line is added after line 64 to trigger the warning to be created.
net.setPreferableTarget(cv::dnn::DNN_TARGET_OPENCL);
Issue submission checklist
System information (version)
Detailed description
When compiled in debug mode I get the following warning logged to the console from when executing the cv::dnn::forward function when using the opencl target.
The program seems to be running fine even with the warning indicating that it is the warning that is invalid.
This warning is not produced with a release compilation or when running without setting a prefrable target.
Steps to reproduce
I can reproduce the issue with a modified version of the learnopencv dnn example at https://github.com/spmallick/learnopencv/blob/master/FaceDetectionComparison/face_detection_opencv_dnn.cpp
The following additional line is added after line 64 to trigger the warning to be created.
Issue submission checklist
answers.opencv.org, Stack Overflow, etc and have not found solution