| View previous topic :: View next topic |
| Author |
Message |
Martin Guest
|
Posted: Thu Feb 23, 2006 7:03 pm Post subject: EStackOverflow at program start |
|
|
Hello,
I was working on my program and added a variable (unsigned int) and a
component on the form and then tried to run it but it raised an exception
EStackOverflow. I placed a breakpoint in the first line of
mainform::FormCreate but it was not reached.
the component is third party, but I had several of it on the form before, so
it should not be the problem.
I tried these things:
build back all latest changes
rebuild the project
restart BCB
restart Win and BCB
change compiler options from debug to final and back
create a new application in BCB and run this (no problems)
I still have this error.
Anybody have an idea what could be the problem?
Can I do some debugging in the code before my stuff starts?
When I look at the CPU window and scroll up some lines it shows
ntdll.strchr:
Thank you for any help
Martin |
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Thu Feb 23, 2006 10:03 pm Post subject: Re: EStackOverflow at program start |
|
|
Martin wrote:
| Quote: | I was working on my program and added a variable (unsigned int)
|
You mean an extra parameter to a constructor ?
Add another dummy one or place that int as first parameter.
Hans. |
|
| Back to top |
|
 |
Martin Guest
|
Posted: Fri Feb 24, 2006 9:03 am Post subject: Re: EStackOverflow at program start |
|
|
"Hans Galema" <notused (AT) notused (DOT) nl> schrieb im Newsbeitrag
news:43fe2432$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Martin wrote:
I was working on my program and added a variable (unsigned int)
You mean an extra parameter to a constructor ?
|
no, just a normal global variable. I really did nothing special, only things
I have done many times before in this project.
| Quote: | Add another dummy one or place that int as first parameter.
Hans. |
|
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Fri Feb 24, 2006 11:03 am Post subject: Re: EStackOverflow at program start |
|
|
Martin wrote:
| Quote: | ... I tried this with a very small new
application and it is the same proceeding, but without exception.
|
What is a very small application more then starting a new application
and just pressing the run button ?
Does such a default application overflow too ?
Hans. |
|
| Back to top |
|
 |
Martin Guest
|
Posted: Fri Feb 24, 2006 11:03 am Post subject: Re: EStackOverflow at program start |
|
|
"Hans Galema" <notused (AT) notused (DOT) nl> schrieb im Newsbeitrag
news:43fe2432$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Martin wrote:
I was working on my program and added a variable (unsigned int)
You mean an extra parameter to a constructor ?
Add another dummy one or place that int as first parameter.
Hans.
|
Hello Hans,
after my latest tries I think your answer might be interesting.
Now I started degugging with a breakpoint at
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize(); // breakpoint here
Application->CreateForm(__classid(TFHaupt), &FHaupt); // this is my
mainform
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
return 0;
}
With single stepit does not enter the breakpoint line, but the next one,
leading to this code (in file forms.hpp):
class PASCALIMPLEMENTATION TForm : public TCustomForm
{
typedef TCustomForm inherited;
...................
public:
#pragma option push -w-inl
/* TCustomForm.Create */ inline __fastcall virtual
TForm(Classes::TComponent* AOwner) : TCustomForm(
AOwner) { }
#pragma option pop
#pragma option push -w-inl
/* TCustomForm.CreateNew */ inline __fastcall virtual
TForm(Classes::TComponent* AOwner, int Dummy)
: TCustomForm(AOwner, Dummy) { }
..............
It continues at the first constructor and then goes to the second one and
then the EStackOverflow raises. I tried this with a very small new
application and it is the same proceeding, but without exception.
Do you think something is wrong there?
thank you
Martin |
|
| Back to top |
|
 |
Hans Galema Guest
|
Posted: Fri Feb 24, 2006 11:03 am Post subject: Re: EStackOverflow at program start |
|
|
Martin wrote:
| Quote: | mainform::FormCreate but it was not reached.
|
You are not useing FormCreate is it ? Well do not do that. Place the code you
have there in the constructor.
Hans. |
|
| Back to top |
|
 |
Liz Albin Guest
|
Posted: Fri Feb 24, 2006 3:03 pm Post subject: Re: EStackOverflow at program start |
|
|
On Thu, 23 Feb 2006 18:45:57 +0100, Martin wrote:
| Quote: | mainform::FormCreate but it was not reached.
|
For one thing, don't use FormCreate() use the constructor.
--
liz |
|
| Back to top |
|
 |
Martin Guest
|
Posted: Sat Feb 25, 2006 12:03 am Post subject: Re: EStackOverflow at program start |
|
|
Hello anybody who contributed to this thread,
after hours of searching and trying I found out that it is a bug in the
third party component I use. A certain combination of property values causes
the exception.
For the archive:
It is SDLs V8.2 NumIO under BCB5, WinXP
It happens when you use FixPoint and a range that does not include zero,
both entered in the IDE.
But confirmation of SDLs programmers is still open.
thanks to all
Martin |
|
| Back to top |
|
 |
|