Board index » cppbuilder » CPU-Window on minus-sign

CPU-Window on minus-sign


2005-05-03 06:58:19 PM
cppbuilder22
Hi,
When I'm running my Application in the IDE it gets back to the IDE and shows
the CPU-Window when I'm entering a minus-sign('-') in one of my several
TEdits. Why? How to prevent? Thanks!
 
 

Re:CPU-Window on minus-sign

Ron Eggler @ work wrote:
Quote
When I'm running my Application in the IDE it gets back to the IDE
and shows the CPU-Window when I'm entering a minus-sign('-') in one
of my several TEdits. Why? How to prevent?
Hmmm. There's probably several possible reasons but one is a hardcoded
breakpoint. This occasionally bites me because my HP printer drivers
have breakpoints and at certain times (not always when I'm printing)
the CPU wanders into the HP driver code and hits the breakpoint.
What version of Builder are you using? IIRC BCB3 had an annoying habit
of bringing the CPU window up when an AV occurred. In that case you can
hit Ctrl+V or right click the execution pain and select 'View Source'.
Of course if it's the hardcode breakpoint issue then you won't have the
source and all you can do is continue running.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:CPU-Window on minus-sign

Andrue Cope [TeamB] wrote:
Quote
Ron Eggler @ work wrote:

>When I'm running my Application in the IDE it gets back to the IDE
>and shows the CPU-Window when I'm entering a minus-sign('-') in one
>of my several TEdits. Why? How to prevent?

Hmmm. There's probably several possible reasons but one is a hardcoded
breakpoint. This occasionally bites me because my HP printer drivers
have breakpoints and at certain times (not always when I'm printing)
the CPU wanders into the HP driver code and hits the breakpoint.
erm, when the CPU-Window appears i press just F9 and it continues running
cleanly.
Quote

What version of Builder are you using? IIRC BCB3 had an annoying habit
of bringing the CPU window up when an AV occurred. In that case you
can hit Ctrl+V or right click the execution pain and select 'View
Source'.
I'm using BCB5

Of course if it's the hardcode breakpoint issue then you won't have
the source and all you can do is continue running.
What is a hardcoded breakpoint? i've never heard of it not to mentoin used
it.
 

{smallsort}

Re:CPU-Window on minus-sign

Ron Eggler @ work wrote:
Quote
erm, when the CPU-Window appears i press just F9 and it continues
running cleanly.
A hardcoded breakpoint is a CPU instruction to the OS to activate the
currently registered de{*word*81} at the current instruction. There are
several CPU instructions which cause the CPU to break off and do other
things (they are used for entering Kernel mode and other low level
stuff that). I don't know offhand if one of them specifically means
"activate the de{*word*81}" but I think it does.
Assuming the Builder IDE is the registered de{*word*81} it will stop
execution, bring the CPU window up and wait just as if it had hit one
of your breakpoints but without the normal breakpoint set highlighting.
If you press [F9] then execution will continue as it would for one of
your own breakpoints.
As I noted in my other reply some vendors leave these instructions in
place. Normally they don't cause a problem because people aren't
normally running a de{*word*81} but I think that by having the de{*word*81}
running you are activating this feature.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:CPU-Window on minus-sign

"Ron Eggler @ work" < XXXX@XXXXX.COM >wrote in message
Quote
When I'm running my Application in the IDE it gets back to the
IDE and shows the CPU-Window when I'm entering a minus-sign('-')
in one of my several TEdits. Why? How to prevent? Thanks!
Is your code doing any validation of the user's input while it is still
being typed? For example, checking that the user is typing only numbers.
If you were using something like StrToInt() in the TEDit's OnChange event,
it would throw an exception since "-" is not a valid number.
Gambit
 

Re:CPU-Window on minus-sign

Remy Lebeau (TeamB) wrote:
Quote
"Ron Eggler @ work" < XXXX@XXXXX.COM >wrote in message
news:4277594a$ XXXX@XXXXX.COM ...

>When I'm running my Application in the IDE it gets back to the
>IDE and shows the CPU-Window when I'm entering a minus-sign('-')
>in one of my several TEdits. Why? How to prevent? Thanks!

Is your code doing any validation of the user's input while it is
still being typed? For example, checking that the user is typing
only numbers. If you were using something like StrToInt() in the
TEDit's OnChange event, it would throw an exception since "-" is not
a valid number.
no, I don't use such functions in any OnChange-event.
 

Re:CPU-Window on minus-sign

Quote
A hardcoded breakpoint is a CPU instruction to the OS to activate the
currently registered de{*word*81} at the current instruction. There are
several CPU instructions which cause the CPU to break off and do other
things (they are used for entering Kernel mode and other low level
stuff that). I don't know offhand if one of them specifically means
"activate the de{*word*81}" but I think it does.
ah okay...
Quote
Assuming the Builder IDE is the registered de{*word*81} it will stop
execution, bring the CPU window up and wait just as if it had hit one
of your breakpoints but without the normal breakpoint set
highlighting.

If you press [F9] then execution will continue as it would for one of
your own breakpoints.

As I noted in my other reply some vendors leave these instructions in
place. Normally they don't cause a problem because people aren't
normally running a de{*word*81} but I think that by having the de{*word*81}
running you are activating this feature.
should i disable this feature? how do I do it?
 

Re:CPU-Window on minus-sign

Ron Eggler @ work wrote:
Quote
>A hardcoded breakpoint is a CPU instruction to the OS to activate the
>currently registered de{*word*81} at the current instruction. There are
>several CPU instructions which cause the CPU to break off and do
>other things (they are used for entering Kernel mode and other low
>level stuff that). I don't know offhand if one of them specifically
>means "activate the de{*word*81}" but I think it does.

ah okay...

>Assuming the Builder IDE is the registered de{*word*81} it will stop
>execution, bring the CPU window up and wait just as if it had hit one
>of your breakpoints but without the normal breakpoint set
>highlighting.
>
>If you press [F9] then execution will continue as it would for one of
>your own breakpoints.
>
>As I noted in my other reply some vendors leave these instructions in
>place. Normally they don't cause a problem because people aren't
>normally running a de{*word*81} but I think that by having the de{*word*81}
>running you are activating this feature.

should i disable this feature? how do I do it?
 

Re:CPU-Window on minus-sign

Ron Eggler @ work wrote:
Quote
Remy Lebeau (TeamB) wrote:
>"Ron Eggler @ work" < XXXX@XXXXX.COM >wrote in message
>news:4277594a$ XXXX@XXXXX.COM ...
>
>>When I'm running my Application in the IDE it gets back to the
>>IDE and shows the CPU-Window when I'm entering a minus-sign('-')
>>in one of my several TEdits. Why? How to prevent? Thanks!
>
>Is your code doing any validation of the user's input while it is
>still being typed? For example, checking that the user is typing
>only numbers. If you were using something like StrToInt() in the
>TEDit's OnChange event, it would throw an exception since "-" is not
>a valid number.

no, I don't use such functions in any OnChange-event.
 

Re:CPU-Window on minus-sign

Ron Eggler @ work wrote:
Quote
Ron Eggler @ work wrote:
>Remy Lebeau (TeamB) wrote:
>>"Ron Eggler @ work" < XXXX@XXXXX.COM >wrote in message
>>news:4277594a$ XXXX@XXXXX.COM ...
>>
>>>When I'm running my Application in the IDE it gets back to the
>>>IDE and shows the CPU-Window when I'm entering a minus-sign('-')
>>>in one of my several TEdits. Why? How to prevent? Thanks!
>>
>>Is your code doing any validation of the user's input while it is
>>still being typed? For example, checking that the user is typing
>>only numbers. If you were using something like StrToInt() in the
>>TEDit's OnChange event, it would throw an exception since "-" is not
>>a valid number.
>
>no, I don't use such functions in any OnChange-event.
hOOOOOOOOOOOOps, my Quting didn't work, sorry... :(
 

Re:CPU-Window on minus-sign

Ron Eggler @ work wrote:
Quote
>As I noted in my other reply some vendors leave these instructions
>in place. Normally they don't cause a problem because people aren't
>normally running a de{*word*81} but I think that by having the de{*word*81}
>running you are activating this feature.
should i disable this feature? how do I do it?
I don't know if you can. I don't of course know that this is the cause
either. It seems odd that pressing '-' would trigger a hardcoded
breakpoint so I only floated the suggestion as a possibility.
Where does the call stack indicate that you are when the program stops?
What are the module names of the last few functions on the stack?
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:CPU-Window on minus-sign

Andrue Cope [TeamB] wrote:
Quote
Ron Eggler @ work wrote:

>>As I noted in my other reply some vendors leave these instructions
>>in place. Normally they don't cause a problem because people aren't
>>normally running a de{*word*81} but I think that by having the de{*word*81}
>>running you are activating this feature.

>should i disable this feature? how do I do it?

I don't know if you can. I don't of course know that this is the cause
either. It seems odd that pressing '-' would trigger a hardcoded
breakpoint so I only floated the suggestion as a possibility.
it's kinda strange because it only happens when the app is running in the
ide, if I start just the compiled *.exe, I don't get the 'error'.
 

Re:CPU-Window on minus-sign

Ron Eggler @ work wrote:
Quote
it's kinda strange because it only happens when the app is running in
the ide, if I start just the compiled *.exe, I don't get the 'error'.
Well TBH that fits in with the hard breakpoint theory. The breakpoints
only cause a break if a de{*word*81} has registered an interest in that
executable. This would be a logical feature for Microsoft/Intel to have
implemented as it allows code to be shipped with breakpoints without
fear of the EXE stopping.
--
Andrue Cope [TeamB]
[Bicester, Uk]
info.borland.com/newsgroups/guide.html
 

Re:CPU-Window on minus-sign

Andrue Cope [TeamB] wrote:
Quote
Ron Eggler @ work wrote:

>it's kinda strange because it only happens when the app is running in
>the ide, if I start just the compiled *.exe, I don't get the 'error'.

Well TBH that fits in with the hard breakpoint theory. The breakpoints
only cause a break if a de{*word*81} has registered an interest in that
executable. This would be a logical feature for Microsoft/Intel to
have implemented as it allows code to be shipped with breakpoints
without fear of the EXE stopping.
So, I'm not able to avoid that 'problem'?