在我的程序崩溃时,Visual Studio 给了我下面的调用堆栈,它没有引用任何 Iv 编写的代码或我的源代码中的行号,这是否表明 OpenCV 库中存在错误?
我认为仍然可以在我的程序中找到触发崩溃的源操作/函数,就像通常的情况一样..
opencv_imgproc243d.dll!cv::RGB2RGB<unsigned char>::operator()(const unsigned char * src=0x00000000, unsigned char * dst=0x0f010050, int n=1920) Line 208 + 0x6 bytes C++
> opencv_imgproc243d.dll!cv::CvtColorLoop_Invoker<cv::RGB2RGB<unsigned char> >::operator()(const cv::Range & range={...}) Line 176 + 0x1d bytes C++
opencv_core243d.dll!`anonymous namespace'::ParallelLoopBodyWrapper::operator()(const cv::Range & sr={...}) Line 134 + 0x17 bytes C++
opencv_core243d.dll!`anonymous namespace'::ProxyLoopBody::operator()(int i=0) Line 177 C++
opencv_core243d.dll!Concurrency::_Parallel_chunk_helper_invoke<int,unsigned int,`anonymous namespace'::ProxyLoopBody,0>::_Invoke(const int & _First=0, unsigned int & _Index=0, const `anonymous-namespace'::ProxyLoopBody & _Func={...}) Line 1445 C++
opencv_core243d.dll!Concurrency::_Parallel_chunk_helper<int,unsigned int,`anonymous namespace'::ProxyLoopBody,0>::operator()() Line 1833 + 0x16 bytes C++
opencv_core243d.dll!Concurrency::task_handle<Concurrency::_Parallel_chunk_helper<int,unsigned int,`anonymous namespace'::ProxyLoopBody,0> >::operator()() Line 116 C++
opencv_core243d.dll!Concurrency::details::_UnrealizedChore::_InvokeBridge<Concurrency::task_handle<Concurrency::_Parallel_chunk_helper<int,unsigned int,`anonymous namespace'::ProxyLoopBody,0> > >(Concurrency::task_handle<Concurrency::_Parallel_chunk_helper<int,unsigned int,`anonymous namespace'::ProxyLoopBody,0> > * _PChore=0x036fb148 {_M_first=0 _M_step=1 _M_function={...} ...}) Line 3495 C++
msvcr100d.dll!Concurrency::details::_UnrealizedChore::_StructuredChoreWrapper(Concurrency::details::_UnrealizedChore * pChore=0x036fb148 {_M_first=0 _M_step=1 _M_function={...} ...}) Line 99 + 0xc bytes C++
msvcr100d.dll!Concurrency::details::_UnrealizedChore::_Invoke() Line 3454 + 0xc bytes C++
msvcr100d.dll!Concurrency::details::WorkItem::Invoke() Line 75 C++
msvcr100d.dll!Concurrency::details::InternalContextBase::ExecuteChoreInline(Concurrency::details::WorkItem * pWork=0x0fb8f7dc) Line 1385 C++
msvcr100d.dll!Concurrency::details::InternalContextBase::Dispatch(Concurrency::DispatchState * pDispatchState=0x0fb8f7fc) Line 1478 C++
msvcr100d.dll!Concurrency::details::FreeThreadProxy::Dispatch() Line 157 C++
msvcr100d.dll!Concurrency::details::ThreadProxy::ThreadProxyMain(void * lpParameter=0x029c2160) Line 162 C++
kernel32.dll!@BaseThreadInitThunk@12() + 0x12 bytes
ntdll.dll!___RtlUserThreadStart@8() + 0x27 bytes
ntdll.dll!__RtlUserThreadStart@8() + 0x1b bytes
看起来断言失败是因为函数接收到损坏的 Mat,因为这是在崩溃时输出到控制台的。