Subj : Re: EStack overflow during form initialisation To : borland.public.cpp.borlandcpp From : Bruce Salzman Date : Fri Aug 06 2004 09:40 am > I have a small application in BCB6.0 version and the application has two > forms. One with default constructor and the other with extra patameter as > below. As soon as I run the application it gets into a recursive loop during > form initialisation and I get stack overflow. Forums for Builder have cppbuilder in their name. Try one of these in the future for the most helpful response :^) > Any one knows why? > > __fastcall TForm2::TForm2(TComponent* Owner,int i) > : TForm(Owner) > { > > } This is a much discussed problem. TForm already has a constructor with that signature that is called during initialization, causing yours to be called, causing the other to be called, etc. The solution is to change your signature to something besides TForm2(TComponent*, int). Perhaps TForm2(int, Component*). Regards, Bruce .