Debug problems with Visual C++ 6.0


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
 
Ad

Advertisements

O

Oleg Starodumov

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.
Most likely it's a sign of heap corruption (hard-coded breakpoint in ntdll.dll,
raised by Debug Win32 heap when it detects a corruption; debug heap is enabled
only when the application is started under debugger)
(check also the output in Debug Output window, may be there is an explanation
of the problem). It should be possible to tell more if you could post the call stack
at the moment of the exception, with good symbols for system DLLs.

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)

With these settings set in Registry, run the application under debugger,
and wait for access violations or hard-coded breakpoints, then check
the call stack to find the reason of the problem. Better if the application
is linked with release version of CRT library.
More information about PageHeap:
http://support.microsoft.com/default.aspx?scid=kb;en-us;286470

Regards,
Oleg
[VC++ MVP]
 
Oleg Starodumov said:
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)
It works!!!
Man, you earned a place of honour in my list of people to say thanks to in
my thesis first page :)
I've been trying to solve that problem for 3 days, and it was driving me
crazy!
Thank you very much!
Davide
 
V

vcuser

------------------------
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)

With these settings set in Registry, run the application unde
debugger,
and wait for access violations or hard-coded breakpoints, then check
the call stack to find the reason of the problem. Better if th
application
is linked with release version of CRT library.
More information about PageHeap:
http://tinyurl.com/fw6cf
------------------------

Hey dude,

It worked for me too!!

Thanks
vcuse


-
vcuse
 
Ad

Advertisements


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