StackOverflowException [SOLVED] [modified]
-
...in a method called by a property within an object that is one of over 68,000... In my 30 years of programming, I've never once experienced a stack overflow, until today. Each time I run the program, the exception is thrown at a different spot. I'm in hell. EDIT ============ I moved about 60 lines of code from within a property to its own method, and had neglected to change some variable names to coincide with the move. The property was doing something like this:
Public Property Total As Decimal
Get
'do some stuff
Total = Total + x
End GetEvery time it referred to
Total
on the right side of the = operator, it ran through this property code again. In essence, it was a recursive method..45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001modified on Tuesday, January 5, 2010 4:43 PM
-
...in a method called by a property within an object that is one of over 68,000... In my 30 years of programming, I've never once experienced a stack overflow, until today. Each time I run the program, the exception is thrown at a different spot. I'm in hell. EDIT ============ I moved about 60 lines of code from within a property to its own method, and had neglected to change some variable names to coincide with the move. The property was doing something like this:
Public Property Total As Decimal
Get
'do some stuff
Total = Total + x
End GetEvery time it referred to
Total
on the right side of the = operator, it ran through this property code again. In essence, it was a recursive method..45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001modified on Tuesday, January 5, 2010 4:43 PM
Was this meant as a question or a comment?
John Simmons / outlaw programmer wrote:
In my 30 years of programming, I've never once experienced a stack overflow, until today.
Wow, either you're a really good programmer or you must not have written many recursive functions in that time.
-
Was this meant as a question or a comment?
John Simmons / outlaw programmer wrote:
In my 30 years of programming, I've never once experienced a stack overflow, until today.
Wow, either you're a really good programmer or you must not have written many recursive functions in that time.
I think it's more luck than anything else. And yes, I've done my fair share of recursive functions.
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001