 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
MR Guest
|
Posted: Thu Feb 02, 2006 8:44 am Post subject: Priviledged instruction at runtime at 'strange' location... |
|
|
While creating a larger VCL-application (with BCB5) I got a
priviledged instruction at runtime. I could get rid of it, when
recompilig the complete project, instead of actualizing, but later
this didn't help anymore.
Just when I thought I got rid of it yesterday (after excluding some
tests) it reappears after some very(!) small changes in a TMenuItem in
the source-code and long before it comes to the changed place.
The situation at BCB5 is that it now occurs before reaching WinMain()
at all. So how to debug, if one can't set a breakpoint, not even to
WinMain.
Displaying the stack-window the following appears:
Jconss::initialization
__Exception Handler
__Exception Handler
c:cppbuilderbincc3250mt.dll
c:windowssystem32kernel32.dll
When porting the project to BDS2006 the problem is mainly the same.
In BDS2006 it passes WinMain, but such a priviledged instruction
occurs when doing a trivial things like
AnsiString txt=...;
char *str=txt.c_str(); // here the priviledged instruction appears
So it seems that something has gone wrong before and the assignment is
where the problem shows up.
I suppose this is the worst case scenario: an error which occurs
sometimes or sometimes not (after changing some source-code anywhere)
and the position where it appears is another one that the position
where the real error occurs.
Is there a way how to find the real cause of this problem?
Thanks a lot,
Michael
|
|
| Back to top |
|
 |
Larry Griffiths Guest
|
Posted: Thu Feb 02, 2006 2:39 pm Post subject: Re: Priviledged instruction at runtime at 'strange' location |
|
|
We were having Priviledged instruction problems but it came down to the .tds
files being greater than around 27meg I think. One of our folks on the
Enterprise version of BCB5 can only set debugging on for two projects in the
project group at a time. You could turn off all debugging and do a build
all and see if the problem goes away.
I however have the pro version of the BCB5 and don't seem to have this
problem.
<MR> wrote
| Quote: | While creating a larger VCL-application (with BCB5) I got a
priviledged instruction at runtime. I could get rid of it, when
recompilig the complete project, instead of actualizing, but later
this didn't help anymore.
Just when I thought I got rid of it yesterday (after excluding some
tests) it reappears after some very(!) small changes in a TMenuItem in
the source-code and long before it comes to the changed place.
The situation at BCB5 is that it now occurs before reaching WinMain()
at all. So how to debug, if one can't set a breakpoint, not even to
WinMain.
Displaying the stack-window the following appears:
Jconss::initialization
__Exception Handler
__Exception Handler
c:cppbuilderbincc3250mt.dll
c:windowssystem32kernel32.dll
When porting the project to BDS2006 the problem is mainly the same.
In BDS2006 it passes WinMain, but such a priviledged instruction
occurs when doing a trivial things like
AnsiString txt=...;
char *str=txt.c_str(); // here the priviledged instruction appears
So it seems that something has gone wrong before and the assignment is
where the problem shows up.
I suppose this is the worst case scenario: an error which occurs
sometimes or sometimes not (after changing some source-code anywhere)
and the position where it appears is another one that the position
where the real error occurs.
Is there a way how to find the real cause of this problem?
Thanks a lot,
Michael
|
|
|
| Back to top |
|
 |
MR Guest
|
Posted: Fri Feb 03, 2006 10:12 am Post subject: Re: Priviledged instruction at runtime at 'strange' location |
|
|
"Larry Griffiths" <larry (AT) kalos-inc (DOT) com> schrieb:
| Quote: | We were having Priviledged instruction problems but it came down to the .tds
files being greater than around 27meg I think. One of our folks on the
Enterprise version of BCB5 can only set debugging on for two projects in the
project group at a time. You could turn off all debugging and do a build
all and see if the problem goes away.
I however have the pro version of the BCB5 and don't seem to have this
problem.
|
Thanks a lot for the answer...
When I first tried this compiling without debug-info in BDS2006 all
went fine. Trying to recompile it with the debug-info again kept this
exception away too. But not for long. It seems a little bit wicked to
be forced to recompile all without debug-info and than again with to
be able to debug, but to make a not-so-short story short, it seems the
problem is in the precompiled header. If I remember correctly, Borland
told that a problem with a defect precompiled header occurs in
BDS2006, Patch1 and suggests to delete it manually. The only problem
is the compiler did not find any problem: the problem occurs when the
program is running.
~~~~~~~
Trying not to use the precompiled header file in BCB5 leads in my
project also to an adress exception (even if it was no priviledget
error) and this is the one before WinMain...
Trying to compile it with all three debug-checkboxes excluded in the
project-options-Compiler-Debugging does not change the problem: the
stack at this point is only slightly different:
__setenvp
__Exception Handler
__Exception Handler
c:cppbuilderbincc3250mt.dll
c:windowssystem32kernel32.dll
~~~~~~~
So if someone has an idea about how to move on (in BCB5) it would be
highly appreciated (, but so far I am happy the problem does not occur
any more in BDS2006, when not using precompiled headers).
Thanks a lot,
Michael
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|