First-chance exception at 0x782260ec in xxx.exe: 0xC0000005: Access violation

开发的软件可以通过按钮创建子窗体,在win7下测试正常,在winXP下崩溃。于是搜到以下帖子,没有讲到直接解决方法,因为貌似没有直接解决的方式。

通过里边的设置可以捕获异常,然后再分析代码。

原帖地址

‘First-chance exception‘ usually means an exception that has been handled by user code. If you‘re using the Vosual Studio & the Windows Mobile emulator for debug then you can turn off exception handling. Go to Debug > Exceptions and check the ‘Thrown‘ column for Win32 Exceptions. Then run the program and try and get it to fall over again.

When the debug runs it will halt execution and break to the debugger when it hits that ‘first-chance exception‘ allowing you to see what is causing that, and see if it‘s in any way related.

The ‘netcfagl3_5.dll‘ library is part of .NET CF, not your code, which is why you can‘t match up the debug symbols.

我的错误信息如下:First-chance exception at 0x00B59CBC in 磁性窗体.exe: 0xC0000005: Access violation reading location 0xFEEF000A.

捕获异常后定位如下图

win7下解决方式是讲OnClose中的 delete[] this 删除,但到XP下还是没有解决问题....

所以程序崩溃,我也很崩溃

时间: 2024-08-24 07:20:53

First-chance exception at 0x782260ec in xxx.exe: 0xC0000005: Access violation的相关文章

Solve Error: Unhandled exception at 0x00905a4d in xxx.exe: 0xC0000005: Access violation.

在使用Visual Studio进行项目开发的时候,有时候会遇到下面这个错误: Unhandled exception at 0x00905a4d in xxx.exe: 0xC0000005: Access violation 产生这个错误的原因可能是在Visual Studio中链接了后缀为"*.a"的库文件,这种库文件应该是在Linux系统或者是使用MinGW编译时链接的,用VS的话应该链接"*.lib"的库文件,而下载的第三方库中一般会包含"*.d

Unhandled exception at 0x........ in XXXX.exe: 0xC0000005:Access violation reading location 0x......

Unhandled exception at 0x........ in XXXX.exe: 0xC0000005:Access violation reading location 0x...... 对于C++初学者或粗心者,很容易犯如下图所示错误: 那么该错误是由什么造成的呢? 答案无疑只有一个,即:读取了本该没有的值或者地址. 那么如何解决呢? 第一件事,检查下你传入的参数是否合法: 第二件事,若malloc了一块内存,必须记得free: 第三件事,你是否赋值了已经溢出的值或地址. 举例说

Unhandled exception at 0x........ in XXXX.exe: 0xC0000005:错误

对于C++初学者或粗心者,很容易犯如下图所示错误: 那么该错误是由什么造成的呢? 答案无疑只有一个,即:读取了本该没有的值或者地址. 那么如何解决呢? 第一件事,检查下你传入的参数是否合法: 第二件事,若malloc了一块内存,必须记得free: 第三件事,你是否赋值了已经溢出的值或地址. 举例说明: [cpp] view plain copy print? pOrg = pcPicYuvOrg->getLumaAddr(); for( y = 0; y < height-1; y++ ) {

&quot;Unhandled exception in app.exe (QtGuid4.dll): 0xC0000005: Access Violation&quot;错误解决

本文要解决的Qt调试问题截图如下: 起因:在代码中添加类型为QColor的二维数组,存储图片每个像素. 现象:调试时出现上图所示错误. 原因:经过百度以及反复查看代码,发现在代码中,有数组越界的情况.因为定义的时候,数组的两个维度大小不一样,而在实 现 QWidget的重画事件时,因为坐标系的差别,使得两个维度的顺序对换,使得发生数组越界的情况. 详细解释:在程序中我定义的数组是QColor color [ Height ] [ Width ], 我的本意是Height代表图片的高度,Heigh

【性能诊断】九、并发场景的性能分析(windbg案例,Fist Chance Exception/Crash dump)

经常会碰到这样的场景,自测及单单点的测试时没有任何问题,但在并发环境或生产环境下有时出现没规律的异常.报错等情况.在代码中增加日志是其中一种解决方式:抓取指定异常时的dump,通过windbg也可以快速定位问题. Procdump命令示例:procdump -ma -e 1 –f SqlException w3wp.exe 貌似ProcDump无法抓取Crash的dump文件,看来有时还得回归到windbg带的命令行---adplus adplus -crash -pn w3wp.exe -fu

C++错误——”无法启动程序”…\xxx.exe” 系统找不到指定的文件”

背景 在VS2010环境下,升级了一个用C++编写的程序,编译生成成功,但是,不能在VS中直接运行(可以通过打开debug文件目录的exe应用程序运行),提示以下错误:"无法启动程序"-\xxx.exe" 系统找不到指定的文件",如截图1. 截图1 解决方法 1.选择工程,右键单击属性,打开工程的属性页,参考截图2: 截图2 2.选择"配置属性->General",选择output directory ,设置为"inherit f

vs2012打包部署时“cannot extract icon with index 0 from file xxx.exe”的解决方案

最近使用vs2012做opencv项目的时候,打包时老是碰到cannot extract icon with index 0 from file xxx.exe这样的问题,弄了半天,才搞定. 为了让大家少走弯路,特分享一下解决办法: 1.先将大小为(16*16或32*32或48*48)的.ico格式Icon图片拷贝到项目目录下; 2.然后在vs中的资源管理器中刷新并将该Icon图片添加进项目中(右键->Include in project); 3.在项目上右键->添加->已有项,出现新窗

HEAP[xxx.exe]:Invalid Address specified to RtlValidateHeap 错误的解决方法总结

一.情况 抽象出问题是这样的: class DLL_API1 A { func() { vector vec; B b; b.func(vec); return TRUE; } } 其中B是另一个导出类,定义如下 class DLL_API2 B { private: vector m_vec; public: func( vector &vec ) { vec = m_vec; } } 运行时发现,每次运行到A的return TRUE释放vector的时候,都会报错:user breakpoi

(C# Debug)A first chance exception of type &#39;System.ArgumentException&#39; occurred in System.Data.dll

Debug 模式下运行程序的时候,Output 窗口出来个错误“A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll”. 但是并没有直接throw错误.无法知道具体在哪一步发生了这个错误. 如果想知道具体的内容,需要enable 这个debug If you do want to know, in Visual Studio -> Debug (main menu) ->