Debug problems with Visula C++

P

Polvere@Lab

Hello everybody,

I'm experiencing a problem during debug with Microsoft Visual C++: wherever
I set a breakpoint (and even if I disable all breakpoints) the debugger
goes into disassembler mode, and it stops at the same line, returning a
dialog windows that says: "user breakpoint called from code at 0xXXXXXX".
The active module is NTDLL, the istruction is "int 3".
The odd thing is that if I open my code on another PC, it works fine, and so
does it if I launch it normally.
Can you help me? It's not very confortable working without the chance to use
the debug.

Thank you very much
Davide
 
J

Jordan

Davide,

I have just recently run into this problem in one of my projects. I
discovered that it is an assertion error that happens when debugging
your code. Somewhere in the VC++ project, one of the default debug
symbols causes the debugger to halt when such an assertion arises. You
will notice this by the exact behavior you described (user breakpoint,
NTDLL, int 3, etc.). When you run your program normally, nothing
should happen. However, you probably have some memory issue that you
need to find.

In my case, I was using SAFEARRAYs and destroying SAFEARRAYs with COM
object references in them. For some reason, this did not boad well
with the debugger. I'm still doing research to understand the exact
context of the problem.
 
P

Polvere@Lab

Jordan said:
Davide,

I have just recently run into this problem in one of my projects. I
discovered that it is an assertion error that happens when debugging
your code. Somewhere in the VC++ project, one of the default debug
symbols causes the debugger to halt when such an assertion arises. You
will notice this by the exact behavior you described (user breakpoint,
NTDLL, int 3, etc.). When you run your program normally, nothing
should happen. However, you probably have some memory issue that you
need to find.

Thank you Jordan, I fixed the problem. Try this (as suggested to me):

"You can also try to enable Full PageHeap and test the application with it:

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution
Options\YourApp.exe
GlobalFlag = REG_DWORD 0x2000000
PageHeapFlags = REG_DWORD 0x3
(replace YourApp.exe with the real name of your executable)"

Bye
Davide
 

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

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top