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 ...
随机推荐
- github学习心得。哈哈,今天上传了自己的项目!
使用github托管代码 仓库(Repository) 用来存放项目代码,每个项目对应一个仓库.如果有多个项目了就需要多个仓库 收藏(star) 仓库主页star按钮,意思为收藏项目的人数 复制克隆项 ...
- A*寻路初探(转载)
启发式搜索:启发式搜索就是在状态空间中的搜索对每一个搜索的位置进行评估,得到最好的位置,再从这个位置进行搜索直到目标.这样可以省略大量无畏的搜索路径,提到了效率.在启发式搜索中,对位置的估价是十分重要 ...
- The iOS 7 Design Cheat Sheet
http://ivomynttinen.com/blog/the-ios-7-design-cheat-sheet/
- js高级-递归调用
函数调用自身 求1-100的和 var sum = 0; for(var i = 1; i<=100; i++){ sum += i } console.log(sum) //自己写的递归 va ...
- 三种方法让Response.Redirect在新窗口打开
通过设置form的target属性同样可以让Response.Rederect所指向的url在新的窗口打开,下面为大家介绍三种具体的实现方法 Response.Rederect在默认情况下是在本页跳转 ...
- linux安装node简单方法
1.去官网下载和自己系统匹配的文件: 英文网址:https://nodejs.org/en/download/ 中文网址:http://nodejs.cn/download/ 通过 uname -a ...
- CentOS6.5安装MySQL5.7详细教程(本人6.3也行)
本文参考http://www.cnblogs.com/lzj0218/p/5724446.html 主要参考博文: https://segmentfault.com/a/119000000304949 ...
- Linux下开启计划任务日志
crontab记录日志 修改rsyslog vim /etc/rsyslog.d/50-default.conf (我的是root用户) 搜索cron 把如下行之前的注释"#"去掉 ...
- 04_web基础(四)之servlet详解
16.17.18.servlet生命周期 javax.servlet.Servlet接口方法:public String getServletInfo():获取Servlet相关信息(作者,版权,版本 ...
- redis做消息列队
#encoding:utf8 import time import redis conn = redis.Redis('localhost',db=1) #连接诶数据库并使用数据库1 def inse ...