Unhandled exception at 0x........ in XXXX.exe: 0xC0000005:错误
第一件事,检查下你传入的参数是否合法;
第二件事,若malloc了一块内存,必须记得free;
第三件事,你是否赋值了已经溢出的值或地址。
- pOrg = pcPicYuvOrg->getLumaAddr();
- for( y = 0; y < height-1; y++ )
- {
- for( x = 0; x < width-1; x++ )
- {
- Pel A[4];
- //2x2
- A[0]=pOrg[x]; A[1]=pOrg[x+1];
- A[2]=(pOrg+stride)[x]; A[3]=(pOrg+stride)[x+1];
- if( A[0]==255 && A[1]==255 && A[2]==255 && A[3]==255 )
- {
- pOrg[x] = 255; pOrg[x+1] = 255;
- (pOrg+stride)[x] = 255; (pOrg+stride)[x+1] = 255;
- }
- else
- {
- pOrg[x] = 0; pOrg[x+1] = 0;
- (pOrg+stride)[x] = 0; (pOrg+stride)[x+1] = 0;
- }
- x += 1;
- }
- pOrg += 2*stride;
- }
此代码就会出现上图所示错误。那么如何解决呢?
- pOrg = pcPicYuvOrg->getLumaAddr();
- for( y = 0; y < height/2; y++ )
- {
- for( x = 0; x < width-1; x++ )
- {
- Pel A[4];
- //2x2
- A[0]=pOrg[x]; A[1]=pOrg[x+1];
- A[2]=(pOrg+stride)[x]; A[3]=(pOrg+stride)[x+1];
- if( A[0]==255 && A[1]==255 && A[2]==255 && A[3]==255 )
- {
- pOrg[x] = 255; pOrg[x+1] = 255;
- (pOrg+stride)[x] = 255; (pOrg+stride)[x+1] = 255;
- }
- else
- {
- pOrg[x] = 0; pOrg[x+1] = 0;
- (pOrg+stride)[x] = 0; (pOrg+stride)[x+1] = 0;
- }
- x += 1;
- }
- pOrg += 2*stride;
- }
很明显,错误的原因在于:赋值了已经溢出的值。
Unhandled exception at 0x........ in XXXX.exe: 0xC0000005:错误的更多相关文章
- Solve Error: Unhandled exception at 0x00905a4d in xxx.exe: 0xC0000005: Access violation.
在使用Visual Studio进行项目开发的时候,有时候会遇到下面这个错误: Unhandled exception at 0x00905a4d in xxx.exe: 0xC0000005: Ac ...
- NET环境下的未处理异常(unhandled exception)的解决方案
NET环境下的未处理异常(unhandled exception )的解决方案 .Net 框架提供了非常强大的异常处理机制,同时对一些非托管代码很难控制的系统问题比如指针越界,内存泄漏等提供了很好的解 ...
- [转]让程序在崩溃时体面的退出之Unhandled Exception
原文地址:http://blog.csdn.net/starlee/article/details/6613424 程序是由代码编译出来的,而代码是由人写的.人非圣贤,孰能无过.所以由人写的代码有缺陷 ...
- Unhandled Exception: System.BadImageFormatException: Could not load file or assembly (2008R2配置x64website)
.NET Error Message: Unhandled Exception: System.BadImageFormatException: Could not load file or asse ...
- Unhandled Exception:System.DllNotFoundException: Unable to load DLL"**":找不到指定的模块
在项目中使用C#代码调用C++ DLL时.常常会出现这个问题:在开发者自己的电脑上运行没有问题,但是部署到客户电脑上时会出现下面问题: Unhandled Exception:System.DllNo ...
- android Unhandled exception type ParseException提示报错
Unhandled exception type ParseException 意思指:你有一个方法会抛出异常,但是你没有捕捉. 依提示添加一下即可解决:
- JAVA 新手问题: Request 编码编译出错,Unhandled exception type UnsupportedEncodingException
新手: 编写如下代码 private void Exec(HttpServletRequest Req,HttpServletResponse Response) //throws ServletEx ...
- Quartz:ERROR threw an unhandled Exception
详细的错误信息如下: -- ::] ERROR org.quartz.core.JobRunShell: - Job group1.job1 threw an unhandled Exception: ...
- Unhandled Exxception “Unhandled exception type IOException”?
Unhandled Exxception “Unhandled exception type IOException”? 在Android studio中,自动遇见这个异常报错,如果eclipse会 ...
随机推荐
- [原]Linux ssh远程连接断开问题处理办法
我们在通过远程连接操作Linux server的时候,有可能过一段时间忘记操作,便会发生ssh断开的问题. 而如果是本地的server,比较好办,直连设备kill掉ssh,踢掉无效用户连接,再次链接即 ...
- spark的standlone模式安装和application 提交
spark的standlone模式安装 安装一个standlone模式的spark集群,这里是最基本的安装,并测试一下如何进行任务提交. require:提前安装好jdk 1.7.0_80 :scal ...
- 一个div里有多个a标签,改变a标签的字体颜色方法
<script type="text/javascript">var all=document.getElementById("big");var ...
- Makefile中头文件在依赖关系中作用
摘于:http://bbs.csdn.net/topics/120024677 (1)在makefile的依赖关系中用不用体现.h头文件?(2)如果在依赖关系中要体现.h头文件,应该体现到什么层次?= ...
- Excel数据批量导入到数据库2
1.导包(共3个) 2.jsp <s:form action="ReadExcel.action" method="post" enctype=" ...
- javascript的假查询
1. function select(){ var text=$("#ss").val();//获得关键字 $("#show_tab tr").hide().f ...
- appml的安装与使用
来自w3cshool的中文文档:http://www.w3cschool.cc/appml/appml-tutorial.html 我们要做的是完整的例子,所以从这里http://www.w3csch ...
- SPSS数据分析—广义线性模型
我们前面介绍的一般线性模型.Logistic回归模型.对数线性模型.Poisson回归模型等,实际上均属于广义线性模型的范畴,广义 线性模型包含的范围非常广泛,原因在于其对于因变量.因变量的概率分布等 ...
- 抓包工具--Fiddler及charles的使用
Fiddler和charles--是抓包工具,可以抓到pc端的请求,手机上设置代理后也可以抓到手机上的请求,也可以修改请求数据和返回的数据. 1.网页抓包,打开Fiddler或Charles应用直接访 ...
- [转]JavaScript快速检测浏览器对CSS3特性的支持
转自:https://yuguo.us/weblog/detect-css-support-in-browsers-with-javascript/ ------------------------- ...