473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

StackOverflowException

When I run my program, I get this error: "An unhandled exception of type
'System.StackOverflowException' occurred in mscorlib.dll". I have
isolated it to a single subroutine which involves several loops(they are
For loops, so they would not be infinitly repeating) and random numbers,
as well as manipulating strings. What exactly does this error mean. The
help file is not very clear (or maybe to complicated for me)

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #1
5 5934
Sorry to bother everyone. I managed to fix my problem. I was under the
assumption that this had something to do with too many strings open at
once, so I was not looking for the real problem (an infinite loop *not*
from a loop command).

Sorry again

*** Sent via Developersdex http://www.developersdex.com ***
Nov 21 '05 #2

I usually get this error when I have made a mistake in a "property"
function. For example:

Public Property SomeValue As Integer

Get
Return m_Value
End Get

Set ( ByVal theValue As Integer )
SomeValue = theValue
End Set

End Property

As you can see in the above, "Set", is setting the property, which is
setting the property, which is setting the property, etc. and will never
terminate (until the stack overflows). I should have written obviously:

Set (ByVal theValue As Integer)
m_Value = theValue
End Set

Anyway this is just an example of a stack overflow from a simple coding
error. Perhaps you could post your routine?

"A. Gaubatz" <an*******@gmail.com> wrote in message
news:eA**************@TK2MSFTNGP14.phx.gbl...
When I run my program, I get this error: "An unhandled exception of type
'System.StackOverflowException' occurred in mscorlib.dll". I have
isolated it to a single subroutine which involves several loops(they are
For loops, so they would not be infinitly repeating) and random numbers,
as well as manipulating strings. What exactly does this error mean. The
help file is not very clear (or maybe to complicated for me)

Thanks

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #3
If you show the code you'll get more responses

Greetz Peter
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning.

"A. Gaubatz" <an*******@gmail.com> schreef in bericht
news:eA**************@TK2MSFTNGP14.phx.gbl...
When I run my program, I get this error: "An unhandled exception of type
'System.StackOverflowException' occurred in mscorlib.dll". I have
isolated it to a single subroutine which involves several loops(they are
For loops, so they would not be infinitly repeating) and random numbers,
as well as manipulating strings. What exactly does this error mean. The
help file is not very clear (or maybe to complicated for me)

Thanks

*** Sent via Developersdex http://www.developersdex.com ***

Nov 21 '05 #4
"A. Gaubatz" <an*******@gmail.com> schrieb
When I run my program, I get this error: "An unhandled exception of
type 'System.StackOverflowException' occurred in mscorlib.dll". I
have isolated it to a single subroutine which involves several
loops(they are For loops, so they would not be infinitly repeating)
and random numbers, as well as manipulating strings. What exactly
does this error mean. The help file is not very clear (or maybe to
complicated for me)

It means that the stack is full. Too many local variables and/or nested
procedure calls. When the excpetion occurs, have a look at the callstack
window to find out what causes the problem.
Armin

Nov 21 '05 #5
In my experience, the call stack usually shows something like this:
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
Foo ( x )
..... ad nauseum.......
"Armin Zingler" <az*******@freenet.de> wrote in message
news:ee**************@TK2MSFTNGP09.phx.gbl...
"A. Gaubatz" <an*******@gmail.com> schrieb
When I run my program, I get this error: "An unhandled exception of
type 'System.StackOverflowException' occurred in mscorlib.dll". I
have isolated it to a single subroutine which involves several
loops(they are For loops, so they would not be infinitly repeating)
and random numbers, as well as manipulating strings. What exactly
does this error mean. The help file is not very clear (or maybe to
complicated for me)

It means that the stack is full. Too many local variables and/or nested
procedure calls. When the excpetion occurs, have a look at the callstack
window to find out what causes the problem.
Armin


Nov 21 '05 #6

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

Similar topics

5
by: Jesee | last post by:
I am reading Jeffrey Richter's book "Applied Microsoft .NET Framework programming",i came across "Exception handing". Page 405 says "If the stack overflow occurs within the CLR itself,your...
2
by: Anders Both | last post by:
In a system with asynkronius socket and different collection, there are some times throw a System.StackOverflowException . I cannot really figur out why , Can someone say something clever about...
0
by: Elizabeth | last post by:
I have C# dll which I compile using ComInterop True and generate tlb type library. When I call function from the C# dll using below code I get an error "StackOverflowException in mscorlib.dll" ...
3
by: Vladimir Arkhipov | last post by:
Hi, I noticed that finally block is not executed once I got StackOverflowException. Is that a known feature or a bug?
11
by: Alx Sharp | last post by:
Hello group... I've created a collection class that implements the following interfaces: IBindingList, IList, ICollection, IEnumerable and ITypedList: abstract class DataCollectionBase :...
20
by: zapov | last post by:
Hi! I'm having some wierd problems with this exception (error). If I use sql commands to insert data into sql server i get strange behaviour from my application. First I used a single...
3
by: Patrick.O.Ige | last post by:
Error:- System.StackOverflowException: Exception of type System.StackOverflowException was thrown. When is this thrown.. Any ideas
8
by: Lars-Erik Aabech | last post by:
Hi! I've got an asp.net page that works for all users except one and that one user only gets the error with a certain parameter set to a certain value. (Same value as the others, but for this...
10
by: Mae Lim | last post by:
Dear all, I'm new to C# WebServices. I compile the WebService project it return no errors "Build: 1 succeeded, 0 failed, 0 skipped". Basically I have 2 WebMethod, when I try to invoke the...
1
by: Thomee Wright | last post by:
I'm having a problem with a pair of applications I'm developing. I have a server application which interacts with several instruments, and a client app which connects to the server and provides a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.