opencv 3.2 vs2015 debug assertion __acrt_first_block == header
网上复制了一个转直方图的代码 ,说来也奇怪, 用imshow 显示 图片在独立窗体内,不存在问题, 要注释掉这段代码就出现了下边的错误. 网上查了查,原来是程序中 有个std::vector<cv::Mat> ColorChannels;写法出了问题
//char OUTPUT_T[] = "histogram demo";
//imshow(OUTPUT_T, histImage);
报错:
Microsoft Visual C++ Runtime Library
---------------------------
Debug Assertion Failed! Program: ...workspace\FileConverter\FileHandler\x64\Debug\FileHandler.exe
File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp
Line: Expression: __acrt_first_block == header For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts. (Press Retry to debug the application) ---------------------------
中止(A) 重试(R) 忽略(I)
---------------------------
问题原因有人说:使用DLL的时候,问题可能在于不同的堆用于分配和释放 引起的。
网上找到一段英文按照他说的改了,没问题了
The following code does not give the assertion, I simply changed std::vector<cv::Mat> ColorChannels; to cv::Mat ColorChannels[];. I think that my solution is quick and dirty and maybe the solution offered by iedoc is better (I did not test it).
把上边的
std::vector<cv::Mat> ColorChannels;换成 cv::Mat ColorChannels[3];.
问题解决
opencv 3.2 vs2015 debug assertion __acrt_first_block == header的更多相关文章
- C++析构函数造成Debug Assertion Failed的问题
昨天写了两个程序,均出现了析构函数造成Debug Assertion Failed的问题,由于是初学c++怎么想也想不通问题出在哪里.今天早上经人指点终于明白问题所在了.下面贴出代码和问题解析:(以下 ...
- Expression: __acrt_first_block == header
File: minkernel\crts\ucrt\src\appcrt\heap\debug_heap.cpp Line: 996 Expression: __acrt_first_block == ...
- Qt 调试时的错误——Debug Assertion Failed!
在VS2008中写qt程序时调试出现此问题,但在release模式下就不存在,在网上搜罗了一圈,是指针的问题. 问题是这样的: 需要打开两个文件,文件中数据类型是float,我使用QVector进行保 ...
- Solve Error Debug Assertion Failed Expression vector iterators incompatible Using PCL in Release Mode of VS2010
When using PCL 1.4.0 in the release mode building under VS2010, we might sometime get the error &quo ...
- imread() not working in OpenCV 2.4.11 Debug mode
The OpenCV function imread() not working in OpenCV 2.4.11 Debug mode of VS2010 under Win32, the way ...
- Debug Assertion Failed!
问题并没有解决..... 不知道怎么回事,先都没有这样的情况... VC++调程序出现如下错误: Debug Assertion Failed! Program: D:wyuS ...
- (转)Debug Assertion Failed! Expression: _pFirstBlock == pHead
最近在VS上开发C++程序时遇到了这个错误: Debug Assertion Failed! Expression:_pFirstBlock == pHead 如图: 点击Abort之后,查看调用 ...
- C++ error:Debug Assertion Failed.Expression:_BLOCK_TYPE_IS_VALID(phead->nBlock)
Debug Assertion Failed.Expression:_BLOCK_TYPE_IS_VALID(phead->nBlockUse) 关于上面这个错误,我在上一篇文章中的程序遇到过了 ...
- “Debug Assertion” Runtime Error on VS2008 VS2010 winhand.cpp
I'm writing a C++ MFC program on VS2008 and I'm getting this "Debug Assertion Error" when ...
随机推荐
- 1.Tomcat配置.md
1.启动 解压缩安装包后,点击startup.bat,保持控制台窗口开启 浏览器中输入http://localhost:8080 后看到启动界面则表示启动成功 点击shutdown.bat则关闭Tom ...
- Structs复习 命名空间
引入jar包 web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app version= ...
- Android高级控件(下)
Chronometer计时器 常用的方法 getBase() 基准时间 setFormat 设置显示格式 start() 开始计时 stop() 停止计时 setOnChronometerListen ...
- spring boot 中使用filter
- 数组的es6新方法
1.数组去重 var changeReArr=(arr)=>{ return Array.from(new Set([1,2,2,3,5,4,5]))//利用set将[1,2,2,3,5,4, ...
- html+js自定义颜色选择器
<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>te ...
- 2017秋季面向对象程序设计(Java)教材、教学纲要、考核要求
教材简况 凯 S.霍斯特曼 (Cay S. Horstmann)(作者), 周立新(译者), Java核心技术(卷1):基础知识(原书第10版) , 2016年9月1出版 本书包括两卷,选做教材的是卷 ...
- Ubuntu系统下手动释放内存
有时候,像mongo这种,对内存只吃不吐的,我们要手动释放一下. drop_caches的详细文档如下:Writing to this will cause the kernel to drop cl ...
- jQuery文档就绪事件
[jQuery文档就绪事件] 为了防止文档在完全加载(就绪)之前运行 jQuery 代码.如果在文档没有完全加载之前就运行函数,操作可能失败. $(document).ready(function() ...
- 取消掉maven