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 ...
随机推荐
- Android EventBus3.x 使用详解
♪(^∇^*) 五一假期在家无事,新项目中用的是RxJava2+EventBus感觉还不错,趁这闲暇总结下EventBus. 一.概要简述 EventBus是一个基于观察者模式的Android事件发布 ...
- 微信小程序---模版
微信小程序用的是否娴熟,会灵活使用模版很重要. 新建一个template文件,做一个step模版. <template name="top"> <view cla ...
- 三种方式解决你的js加载乱码
第一种方式——编码统一 我们以前觉得出现乱码的原因是因为编码不统一,就是因为我们设置编码统一之后,就解决了问题,所以,让html和js的编码统一,是最简单的一个乱码解决方式,原因是什么,是因为,如果你 ...
- node Cannot enqueue Quit after invoking quit.
因为第二次调用数据库时连接关闭了,应该把connection.connect();放在请求的函数里面:不然第二次请求出错
- JDK各个版本比较 JDK5~JDK10
JDK1.5新特性: 1.自动装箱与拆箱: 2.枚举 3.静态导入,如:import staticjava.lang.System.out 4.可变参数(Varargs) 5.内省(Introspec ...
- fiddler模拟timeout超时场景
fiddler模拟网络超时: 用fiddler模拟网络请求超时 最近要测试程序对cgi 请求超时的兼容,所以就需要模拟超时,第一个想到的就是fiddler工具,说一下具体的做法: Rules -> ...
- IN_ORDER_PLANNING、IN_BOM_CHANGE
一.IN_ORDER_PLANNING 新增一个IN表(IN_ORDER_PLANNING,把ZFP037和ZFP026整合成一张表,标示哪些订单的是真验货/假验货.VIP真验货/假验货订单) ORD ...
- 【OpenGL】纹理(Texture)
纹理是一个2D图片(也有1D和3D),它用来添加物体的细节:这就像有一张绘有砖块的图片贴到你的3D的房子上,你的房子看起来就有了一个砖墙.因为我们可以在一张图片上插入足够多的细节,这样物体就会拥有很多 ...
- style标签下的CSS代码的显示与实时编辑
style标签也是标签 首先设置body style的样式 body style{ display:block; padding:0.6em 0.8em; border:1px dashed #ccc ...
- 二叉树中和为某一值的路径(python)
题目描述 输入一颗二叉树的跟节点和一个整数,打印出二叉树中结点值的和为输入整数的所有路径.路径定义为从树的根结点开始往下一直到叶结点所经过的结点形成一条路径.(注意: 在返回值的list中,数组长度大 ...