We help IT Professionals succeed at work.

CPU Debug !@#$^%#@ HELP !!!

CyberKnight
CyberKnight asked
on
Hi !
This is driving me absolutely insane !!!!

Im currently running Delphi 5. (on Win2000)

When I run my programs (for some reason) it suddenly breaks, and the CPU window pops up (as if Im debugging)...?

When it breaks (in the CPU window), it has the following lines...
"ntdll.DbgBreakPoint:"
and
"ntdll.DbgUserBreakPoint:"

Even though I have no breakpoints in my program, it keeps breaking at this point, and it is annoying @#$ !!!

Ive done some minor searching, and one website suggested that it is a "hardcoded breakpoint in one of the Microsoft DLLs" that they forgot to remove after testing.

Please help....
Thanx....
CyberKnight...
Comment
Watch Question

Commented:
You may have inadvertantly put a breakpoint on some system code after doing a step-into while debugging.

I know there is a view selectable off of the main IDE menu in which you can view all breakpoints.

See if you can find it and make sure you have all breakpoints off

Author

Commented:
Hi, Belcher

Im sure that ALL the breakpoints are off.
Ive even closed Delphi, and reloaded my project. And yet again, it breaks. Its definitely not a breakpoint that I have overlooked....
Russell LibbySoftware Engineer, Advisory
CERTIFIED EXPERT
Top Expert 2005

Commented:

CyberKnight,

It very well could be hard coded breakpoint left in a dll that your project is loading. If a call to DebugBreak (Windows API call) is left in dll code, than a debugging program (in your case, Delphi) will recieve the breakpoint exception. For example, place the following line in your code and watch what happens when executed...

// your code
DebugBreak;
// your code

You will see Delphi's debugger break and raise the CPU window.

Russell

Commented:
CyberKnight, please look at the callstack, when your project halts at that location. Maybe you can see, how this happened.

Regards, Madshi.
CK-

Check your Task Manager, Processes. Do you have a process named NewNet running?
DMN

Commented:
Did you press F12 key just before CPU debug window pops up? Don't do so :))) When you press F12 while application running CPU debug SHOULD popup...
Commented:
there is a small patch fix on borland site (codecentral) for the ntdll problems with ms's leftover breakpoints.
it is by M Passmore ,codecentral seems to be down alot lately but i have a copy localy so if you want i can send it.

Commented:
that should read
Dennis M Passmore

Author

Commented:
After more searching, I really think that rllibby is right. I think it is a hard coded break point left by MS in one of their dlls. (This problem only occurs on Win2K).

Madshi, the call stack just shows "Project1" when it breaks. (nothing else)

OryxConLara, - No, I dont seem to have a process named NewNet running.

DMN, Im definitely NOT pressing the F12 (im aware that this does break with the CPU window).

Hmm, Borland does seem to know about this problem...Check this out....
http://www.borland.com/devsupport/delphi/fixes/delphi5/debugger.html#multi-process

Inthe, If you can send me a fix for the problem, U get the points :-)
How big is it ?
U can email me at Amand.Maharaj@Spar.co.za

Thanx....
CK....


DMN

Commented:
:) In my case when I press F12 I'll get that CPU window.

Commented:
howdy,
its like 5kb or something zipped so i sent it,let us know if it does the job.

Author

Commented:
Hi Inthe,

Thank you for the fix, it actually works !!!!! (Just had to get the correct memory address).

That certainly is some good piece of coding (lol, what a relief to finally run a program without it breaking for no apparent reason !)

Inthe gets the points, thank you all, for your input/comments.

Regards...
  CyberKnight