简体   繁体   English

Qt调试器通过OpenCV冻结

[英]Qt Debugger Freezes With OpenCV

在此处输入图片说明

If I don't include cv::Mat test; 如果我不包括cv::Mat test; then the debugger works fine. 然后调试器可以正常工作。 The inclusion of that 1 line, for some reason, kills the Qt debugger. 由于某种原因,包含该1行会杀死Qt调试器。

Symptoms: 症状:

  • The variables view forever loads 变量查看永久负载
  • The coded program freezes - you cannot stop, start or step anything 编码程序冻结-您无法停止,启动或踩任何东西
  • The editor functions normally 编辑器功能正常
  • Breakpoints become unremovable until you stop debugging mode 停止调试模式之前,断点将不可移动
  • After 40 seconds you're given the option to stop the debugger, inferring that it may be in an infinite loop - this (or closing Qt) is the only way to stop the debugger 40秒后,您可以选择停止调试器,这表明它可能处于无限循环中-这(或关闭Qt)是停止调试器的唯一方法
  • Running the code in runtime works as expected 在运行时中运行代码按预期工作
  • Running the code without breakpoints works as expected 运行没有断点的代码可以按预期工作

I'm not doing anything fancy (to my knowledge), so the settings should be the defaults on installation. (据我所知)我没有做任何花哨的事情,因此设置应为安装时的默认设置。

Version info: 版本信息:

  • Qt Creator 4.2.1 Qt Creator 4.2.1
  • Based on Qt 5.8.0 (MSVC 2015, 32 bit) 基于Qt 5.8.0(MSVC 2015,32位)
  • From revision 7071b61e02 从7071b61e02版开始

I can't work with this anymore! 我不能再用这个了! Its slowed the debugging process down to a crawl just finding where the bugs are. 它将调试过程减慢到仅查找错误所在的位置。 The problem seems to be new, having only just started a few days ago. 这个问题似乎是新的,只是在几天前才开始。 What's going on? 这是怎么回事? How can I bring the debugger back to life without reinstalling Qt? 如何在不重新安装Qt的情况下使调试器恢复活力? Thanks in advance! 提前致谢!

It's not OpenCV only. 不只是OpenCV。 I have the same problem on Windows. 我在Windows上有同样的问题。 the Windows Debugger (WinDbg) is horribly bad. Windows调试器(WinDbg)太糟糕了。 Many times it freezes like you're describing and takes forever with that irritating waiting spinner. 很多时候,它像您所描述的那样冻结,并永远与烦人的等待旋转器一起使用。 It's not even possible to view the value of a boost::filesystem::path . 甚至不可能查看boost::filesystem::path Some times it doesn't even show variables that are there (like this sometimes), and when I expand it in Qt Creator, they appear empty. 有时它甚至不显示那里的变量(有时像this ),而当我在Qt Creator中对其进行扩展时,它们显示为空。

Therefore, I decided not to do hardcore debugging on Windows anymore. 因此,我决定不再在Windows上进行核心调试。 What I do, is do very shallow debugging on Windows, and hardcore debugging I do on Linux, with gcc and gdb. 我要做的是在Windows上进行非常浅层的调试,而在Linux上使用gcc和gdb进行核心调试。 I have a virtual machine (VM Ware) that I use for this. 我有一个用于此的虚拟机(VM Ware)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM