开发的软件可以通过按钮创建子窗体,在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下还是没有解决问题....
所以程序崩溃,我也很崩溃