Board index » cppbuilder » A little strange thing

A little strange thing

Hi.

    I'm using BCB 4 Pro and Windows 2000. When I'm debugging my code,
always, when I exit my app, I get set in a "Breakpoint" of a DLL, ntdll.dll.
I don't know why is this happening, because I don't have ANY breakpoints set
in that DLL. I started getting this breakpoint when I started debugging in
this machine, before I used W98 and everything goes fine.

    I don't know if that is a kind of exception handling by NT or something
like that, and I'm doing something wrong that produces an GPF or something
like that. Or I don't know if that is normal in the Windows 2000 OS, or
something like that.

    Does somebody experiences the same "problem"?

    Any help would be great.

    Rodrigo Gmez.

 

Re:A little strange thing


Hi Rodrigo,

Quote
>     I'm using BCB 4 Pro and Windows 2000. When I'm debugging my code,
> always, when I exit my app, I get set in a "Breakpoint" of a DLL, ntdll.dll.

I don't know the reason but I have seen somewhat similar behavior in one
app.
It used Shell API and for some reason, only when debugging, and only at
load time the app would break on several "int 3" breakpoints in NTDLL.
The
app would then continue to run just fine. I never figured it out but
I am guessing (without any basis) that some initialization code was
being
replaced with int 3's, maybe by the Windows loader(?).
BTW, as an experiment, you can add your own int 3's with...
__emit__(0xCC);

...but those exceptions are seen outside the de{*word*81}.

--Craig

Re:A little strange thing


Quote
"Rodrigo Gmez" <rgo...@ags.ciateq.mx> wrote in message

news:8fc5fl$28t11@bornews.borland.com...

Quote
> Hi.

>     I'm using BCB 4 Pro and Windows 2000. When I'm debugging my code,
> always, when I exit my app, I get set in a "Breakpoint" of a DLL,
ntdll.dll.
> I don't know why is this happening, because I don't have ANY breakpoints
set
> in that DLL. I started getting this breakpoint when I started debugging in
> this machine, before I used W98 and everything goes fine.

I have also seen this under Win2000.  It happened in a couple of my apps
after putting an open/save dialog on the main form.  The first time I
displayed either of them, it would stop at the breakpoint, and also when I
exited the app (presumably as it was destroying the dialogs).  Stefan said
it's usually caused by your application doing something wrong elsewhere, but
it started happening on a brand new app with me at one point.  Haven't seen
it for a bit now, though.  (It happened with both BCB4 and BCB5)

Russell

Re:A little strange thing


Quote
> >     I'm using BCB 4 Pro and Windows 2000. When I'm debugging my code,
> > always, when I exit my app, I get set in a "Breakpoint" of a DLL, ntdll.dll.
> I don't know the reason but I have seen somewhat similar behavior in one
> app.

I see it sometimes in our apps on NT when we've done bad things to memory
handles. I think NT (and Win2k) have more checking, so when things like freeing
a handle twice or some such will hit these breakpoints.

+====================================================+
| Jonathan Arnold (mailto:jdarn...@buddydog.org)     |
| Havas Interactive             HyperStudio Engineer |
| http://www.buddydog.org http://www.hyperstudio.com |
+====================================================+

Outside of a dog, a book is man's best friend. Inside
of a dog, it's too dark to read. -- Groucho Marx

Other Threads