Parralel creation of cv::Mat crashes? Bug?
Hi there,
I'm using OpenCV 3.0rc1 and Windows 7 (Visual Studio 2010) My problem is that the following code crashes randomly when using OpenMP for parallization. If I remove the OpenMP loop parallelization everything works fine.
#pragma omp parallel for
for(int i = 0; i < 100; i++)
{
cv::Mat blub;
blub.create(3456, 5184, 16);
cout << ".";
}
The following exception is thrown OpenCV Error: Assertion failed (u != 0) in cv::Mat::create, file src\matrix.cpp, line 412
Can anyone reproduce / confirm this behavior?
That line is inside a
catch (...)
and is not handling the exception. If you remove the try/catch you will be able to see what type of exception is thrown during run-time. Maybe some memory allocation failure? Does it work with acreate()
of smaller dimensions?