VC access violation debugging process record

Source: Internet
Author: User
Tags microsoft website

In the past few days, I am calling a camera program to read the image data from the camera and then compress it with h263 (refer to videonet of codeproject ).

Later, the program encountered an access violation (AV) error. After two days, I finally got it.

Later, the following problem was found during the debugging process:

// Convert the data from RGB format to YUV format <br/> convertrgb2yuv (image_width, image_height, Data, YUV );

Data is the RGB data returned by the camera, and YUV is the converted YUV data. The problem of YUV and output data is always found. No reason is found. Various debugging tools are used, the tool for debugging memory problems will be listed later. At last, the data source may be faulty, and the data may be faulty. So I started to look at the data returned by the camera, we found that the number of data returned by the camera was 50688 bytes, and the resolution was 176*144. It should have been 176*144*3 = 76032byte, a lot less, so we changed the camera, still so much, I tried the camera on my classmate WL's notebook and the result was normal. Later I came up with a reason why the camera was a fake-ruishi, so someone else may have done it, for example, if there were only 800 million, it would be 1000 million, and after you had worked on software, you would be 1000 million on the computer. I think of a USB flash drive that I bought by a classmate tfand. I inserted it into my computer and showed a 4g flash drive, but I only saved 2 GB flash drive. The 4g flash drive is displayed on my computer, however, the 2G behind cannot be used. WL's notebook is ThinkPad, so the camera cannot be fake. There is no brand camera of Logitech, so it cannot be verified yet, but this should be the problem.

 

**************************************** ***

The tool for debugging memory errors is as follows:

1. pageheap, which Tool can be downloaded to http://www.microsoft.com/downloads/details.aspx on Microsoft website? Familyid = 69e7fb1b-1fbe-4e86-b905-74b5473499b3 & amp; displaylang = en & displaylang = en. You can also find the error heap information in the output window. Only new and malloc related information should be displayed, because the RGB data of my later AV problem is an array defined, so this tool does not display any information.

2. gflag, this tool is also Microsoft's, but it has never been used.

3. boudschecker: this tool is very powerful. It is from compuware (the one used for DriverStudio) and can be downloaded online. You can also find instructions for use.

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.