Cause of cannot execute program running

Source: Internet
Author: User

Today'sProgramI encountered this problem for the first time. I found this explanation on the Internet.

After the program is compiled, it only indicates that the program itself has no syntax errors and does not mean that the program can be smoothly executed. This is a common problem. According to my own experience on the opencv program, there are mainly the following situations.
1. The data type and length do not match. For example, when processing an image, some functions require that the data length of some parameters required by the image be set to 8-bit, 16-bit, or 32-bit. Is there any data type differentiation. If the conditions are not met, an error occurs during execution.
2. When processing images, it is actually a process of calculating the Matrix. During calculation between matrices, the size of the matrix must be consistent. Most functions in opencv require this.
3. Memory operations: when using opencv for image processing, most operations are performed with pointers, which involves memory operations. If you do not pay attention to it, an error will occur. For example, if a pointer has been directed to the memory but is not assigned a value, that is, it is null. When another pointer is operated, an error occurs.
There may be some other problems that may also be unable to run the program.
The general solution is
1. analyze the possible causes of the Error. For example, in many cases, the error window appears. You can read the error information and modify it.
2. Use the Step Method to execute the statement step by step. Check which statement has an error. Analyze the cause and correct it.

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.