user breakpoint problem

A

Anne

Hi,
Wish someone can help me out.
I have a windows appliction which uses both unmanaged and managed c/c++
code. Whenever I quit application I got following error:
Heap block at 07A3DEDO modified at 07A3DEDO past requested size of 4
Unhandled exception at 0x77f9180c in myprogram.exe: User breakpoint.

I searched online and found that it might be related to wrong management of
memory (bug in the code). But I don't know where it is and wish someone
could shed some light on me.
Here is what I found: when I run program in debug mode, it always stops at
_lock_file function at _file.c file (which is microft's file) and gives
above exception before I close application.
More details about my application: the application is using third party's
API (in c) to get real-time message over the network and I have a winform to
show message on the screen.

Any ideas?

Thanks sincerely

-Anne
 
F

Feng Yuan [MSFT]

You have a heap corruption in your code, or just in your process.

Try to enable page heap for your process and run your program again. Page
heap will put allocation at the end of a page, allowing early detection of
heap corruption. Use the gflags utility to enable page heap.

Or you can also trying to find out who is allocating the address and step
through the code to see who is overwring it beyoung the allocated size.

For us, heap corruption is a much fix.
 
A

Anne

Thanks for your help!!

Could you provide more details? I've never used any of tools you mentioned
here.

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top