Updated by Alexander Karsakov about 11 years ago
Failed test stitch_a123.a123/0 (compiled with VS2012 x64).
I found out that error is occured in @base_any_policy* get_policy()@ method. In this method declared static variable @policy@.
<pre>
template<typename T>
base_any_policy* get_policy()
{
static typename choose_policy<T>::type policy;
return &policy;
}
</pre>
I suppose that a few threads can enter to this function and incorrect initialize this variable.
When I run tests with one thread all tests passed. I tryed to add cv::Mutex before initialization. All tests passed, but works a little slower.
I found out that error is occured in @base_any_policy* get_policy()@ method. In this method declared static variable @policy@.
<pre>
template<typename T>
base_any_policy* get_policy()
{
static typename choose_policy<T>::type policy;
return &policy;
}
</pre>
I suppose that a few threads can enter to this function and incorrect initialize this variable.
When I run tests with one thread all tests passed. I tryed to add cv::Mutex before initialization. All tests passed, but works a little slower.