Opencv程序已退出,代码为-1073741819

时间:2013-01-31 14:26:57

标签: c++ debugging opencv

我正在使用opencv和QT开展视频处理项目。每一段代码都运行得很完美但是当我关闭应用程序的GUI时,它的显示在Windows 7中停止了工作错误:

Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: QtTracker3.exe
  Application Version:  0.0.0.0
  Application Timestamp:    510a7ebe
  Fault Module Name:    ntdll.dll
  Fault Module Version: 6.1.7600.16695
  Fault Module Timestamp:   4cc7ab44
  Exception Code:   c0000005
  Exception Offset: 00052016
  OS Version:   6.1.7600.2.3.0.256.1
  Locale ID:    1033
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

和调试器给出:

Debugging starts
HEAP[QtTracker3.exe]: 
Heap block at 0BF96368 modified at 0BF96380 past requested size of 10
HEAP[QtTracker3.exe]: 
Invalid address specified to RtlFreeHeap( 00020000, 0BF96370 )
Debugging has finished

我无法弄清楚为什么会发生这种情况......: - (

1 个答案:

答案 0 :(得分:1)

c0000005是一个访问冲突错误,一个常见原因是您可能尝试通过无效指针访问已经解除分配的内容(基于应用程序退出时发生的信息)。

Qt的一个常见错误是在堆栈上分配子窗口小部件,如果父窗口小部件首先被销毁,则会在子地址上调用 delete (一个未在堆上分配的地址)也可能导致错误),但基本上你必须调试程序才能找到错误。