User breakpoint called from code at 0x ********

Source: Internet
Author: User

Debug todayProgramThis error occurs in the debug version .. I have not set a breakpoint for the program. it seems that there is a problem with my heap, and a release version is compiled to run normally .. later, Google found the following explanation:

In the debugging status, the operating system uses debugwin32heap to replace normal heap to allocate memory space. The heap manager that operates Debug on the heap checks the data integrity of the heap. If an error is found, a message is reported. When the pageheap mechanism of an application is activated, all heap allocations of the application are put into the memory, so that the heap boundary is ranked together with the virtual memory boundary. The Virtual Memory Page adjacent to the heap is set to no_access. Access to the space behind the heap in this application will immediately cause errors, which can be captured in a debugging tool. The process is similar when the heap is released. Pageheap modifies the virtual page of the released application to no_access. In this way, an access error occurs when the application attempts to read and write the memory.

Since it is a heap problem, I have checked allSource codeNew and delete operationsCode, It seems that there is no problem .. all allocated for change are released .. there are no errors. later, I couldn't get an extreme idea. I commented out all the delete statements in the program. run the program again. sure enough... --.. I checked the program again. it's okay .... later, an error was reported if a delete program exists. no. this Delete is found in a function for removing the service. it is necessary to describe the program structure here.

I will store all the services into the DLL. The main function is one of four (the rest will not be mentioned)

Createsrv establish service removesrv remove service runsrv run service stopsrv Stop Service

The delete is located in removesrv... however, there is no problem with my Delete. later, there was no way to go to Google. I found someone who encountered the same problem as me .. http://hi.baidu.com/yanerxh/blog/item/88d58455ace78cc2b645ae8e.html ....

"User breakpoint called from code at 0x77f9193c is a problem caused by repeated release. The above is because a class member is released, finally, an error occurs when the member of this class is released (the Member is released but no null is set )"

After reading this sentence, I will immediately look at my class's destructor (because my DLL is used to export functions instead of export classes, the caller has compiled a call class to call the DLL export function to achieve unified management and encapsulation.)---|... I am afraid that, in case my call does not include "stopsrv stop service" or "removesrv remove service", I have called these two functions in the Destructor .... depressed, I have been debugging from until now --..... write thisArticleWarning future generations ......

 

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.