Problems of first chance exception & R6025-pure virtual function call opencv

Source: Internet
Author: User

It wasn't long before the program was written tonight, and the program did not report any errors or warning. However, after running the program, the image windows disappeared immediately and could not be displayed. The program was wasted for more than an hour and encountered a strange problem, finally, I changed my notebook to run it without modifying the program. It's totally correct!

One problem reported during debugging is the first chance exception, sometimes there will be inexplicable R6025-pure virtual function call, unstable ~

For the second problem, r6025, it is generally considered that the window was not destroyed, but I used the C ++ version and did not need to manually destroy the window. He actually reported an error ~ Not understood

For the first question, I checked some information and thought it was kernel32.dll. I have taken a professional explanation below. My final solution to these two problems is: restart! That's all right! If you encounter the second error and use cvnamedwindow, check whether there is no destroy.

----------------------------------------------------------------------------

Have you ever been debugging an application and seen a message, in the output window, about a "first chance" exception?


Ever wondered:

  • What is a first chance exception?
  • Does a first chance exception mean there is a problem in my code?

What is a first chance exception?
When an application is being debugged, the debugger gets notified whenever an exception is encountered at this point, the application is suincluded and the debugger decides how to handle the exception. the first pass through this mechanism is called
A "first chance" exception. depending on the debugger's configuration, it will either resume the application and pass the exception on or it will leave the application susponded and enter debug mode. if the application handles the exception, it continues
Run normally.

In Visual Studio, you may see a message in the output window that looks like this:

A first chance exception of type 'System.ApplicationException' occurred in myapp.exe

In Visual Studio 2005 beta2, you will see this message anytime a first chance exception is encountered in your application's code. if you are using Visual Studio. NET 2003, this message is shown if you have configured the debugger to stop when the specific
Exception type is thrown.

If the application does not handle the exception, the debugger is re-notified. this is known as a "second chance" exception. the debugger again suspends the application and determines how to handle this exception. typically, debuggers are configured to stop
On Second Chance (unhandled) exceptions and debug mode is entered, allowing you to debug.

Does a first chance exception mean there is a problem in my code?
First chance exception messages most often do not mean there is a problem in the Code. For applications/components which handle exceptions gracefully, first chance exception messages let the developer know that an exceptional situation was encountered
And was handled.

For code without exception handling, the debugger will receive a second chance exception notification and will stop with a unhandled exception.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.