472,368 Members | 2,604 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,368 software developers and data experts.

Odd Exception Trying To Load Form

Dan
I am back yet again :)

I am encountering an Exception that has me scratching my
head. I have two forms. Form A launches Form B in response
to the user clicking a button. The Constructor for Form B
takes 5 parameters but none of them complicated ( three
short strings and two booleans ). Form B does have several
controls on it (around 148 when you count in group boxes,
labes and menus). However, I have forms with far more that
load without a problem.

The constructor simply sets 5 class values and of corse
the required InitializeComponent() call is there.
Everytime I attempt to load Form B I get the following
Exception

System.StackOverflowException: Exception of type
System.StackOverflowException was thrown

I can't figure out what the problem may be. If anyone has
any ideas I would greatly appreciate it. Thanks!

Dan
Nov 15 '05 #1
4 1528
"Dan" <dd*****@fnisolutions.com> wrote in message news:08****************************@phx.gbl...
Everytime I attempt to load Form B I get the following
Exception

System.StackOverflowException: Exception of type
System.StackOverflowException was thrown


Check the call stack, most likely a function is calling itself repeatedly.

--
Michael Culley
Nov 15 '05 #2
Tam
does the error happen when you call an empty constructor on the form? this
will elminate your parameters as the possible source

i.e. make a default

FormA()
{
InitializeComponent();
}

i'd also check to see if you are adding controls in a loop, that would cause
an error such as you are seeing.

just a couple of thoughts :)

"Dan" <dd*****@fnisolutions.com> wrote in message
news:08****************************@phx.gbl...
I am back yet again :)

I am encountering an Exception that has me scratching my
head. I have two forms. Form A launches Form B in response
to the user clicking a button. The Constructor for Form B
takes 5 parameters but none of them complicated ( three
short strings and two booleans ). Form B does have several
controls on it (around 148 when you count in group boxes,
labes and menus). However, I have forms with far more that
load without a problem.

The constructor simply sets 5 class values and of corse
the required InitializeComponent() call is there.
Everytime I attempt to load Form B I get the following
Exception

System.StackOverflowException: Exception of type
System.StackOverflowException was thrown

I can't figure out what the problem may be. If anyone has
any ideas I would greatly appreciate it. Thanks!

Dan

Nov 15 '05 #3
Dan
Tam and Michael,

Thanks for your quick respondes to my post. You put me in
the right direction and I was able to solve the problem.
It turns out that I was trying to pass in a null value on
one of my parameters. Once I fixed that it was running
great. Thanks again!

Dan
Nov 15 '05 #4
If passing a null param gives you a stack overflow then something still needs to be fixed.

--
Michael Culley
"Dan" <an*******@discussions.microsoft.com> wrote in message news:31****************************@phx.gbl...
Tam and Michael,

Thanks for your quick respondes to my post. You put me in
the right direction and I was able to solve the problem.
It turns out that I was trying to pass in a null value on
one of my parameters. Once I fixed that it was running
great. Thanks again!

Dan

Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
0
by: Darkoł | last post by:
I'm trying to do a simple web form with asp.net & C# but althoug the page is correctly compilated, when i load the page there is the following error message: System.Web.HttpException: External...
0
by: Eric Hudson | last post by:
Hi, I am using Visual C#.NET (2003 Env., Framework 1.1) I wrote a custom control which seems to work just fine except that if I try to add it to another form I get the following exception: ...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
6
by: Steve Long | last post by:
Help, I'm running VS.NET 2003 and when I try to start my application, I get the "unhandled exception" dialog instead of the IDE highlighting the offending line of code. The problem appears to be...
2
by: Raju Joseph | last post by:
Hi All, I am trying to implement some common services for DataGrid control by implementing IExtendee and providing users with some properties they can set. I need to process some code in the...
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
5
by: Mike | last post by:
Hello All, Please, if anyone can point me to the problem, I'd sure appreciate it! I am very new to VB programming and not a programmer to begin with. This is part of a Visual Basic 2005 Express...
0
by: brads745678 | last post by:
Hi, I am having a problem with my VB .NET application. I am trying to do the most simplest of things, and I've even achieved this task before. All I am trying to do is update an access DB from VB...
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.