c++ - Opencv 程序退出,代码为 -1073741819

标签 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

我不知道为什么会这样......:-(

最佳答案

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

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

关于c++ - Opencv 程序退出,代码为 -1073741819,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14628108/

相关文章:

c++ - 从 C 调用静态 C++ 方法在编译时给出 undefined reference

C++ 使用shared_ptr 安全删除事件对象有效负载

python - 在 ROI 之后对图像进行排序(Python、OpenCV)

c++ - Face Landmark Detection算法,输出图像消失C++,Dlib

python - OCR : check if letter is in (string) of image (Opencv, Python,超正方体)

c++ - C++ 11中的thread_local不一致

c++ - InternetGetConnectedStateEx 的使用

delphi - 为什么 Delphi-XE2 64 位 Windows 程序不能在集成环境中运行?

javascript - 用两种不同的方式编写函数 : one way results in a TypeError and the other does not. 为什么?

c++ - 你如何在 macOS 上使用 Valgrind/Helgrind?