Mat/UMat may be out of sync. (Bug #4380)
Description
I created this test as a reproducer:
TEST(UMat, SyncTemp) { Mat m(10, 10, CV_8UC1); { UMat um = m.getUMat(ACCESS_WRITE); { Mat m2 = um.getMat(ACCESS_WRITE); m2.setTo(cv::Scalar::all(17)); } um.setTo(cv::Scalar::all(19)); EXPECT_EQ(0, cvtest::norm(um.getMat(ACCESS_READ), cv::Mat(um.size(), um.type(), 19), NORM_INF)); } }
This will create the following exception:
error: (-215) u->refcount == 0 in function cv::UMat::handle
Related issues
related to Bug #4468: Data race may happen between oclCleanupCallback and Mat::... | New | 2015-07-07 | ||
related to Bug #4006: getUMat does not work properly with Mat on user data | Open | 2014-11-13 |
History
Updated by Alexander Alekhin over 9 years ago
Related issue: http://code.opencv.org/issues/4468
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/5010