9
votes
7answers
18k views

StackOverflowException without recursion or infinite loop?

Background I have a DataGridView control which I am using, and I added my handler below to the DataGridView.CellFormatting event so the values in some cells can be made more human-readable. This ...
7
votes
3answers
211 views

StackOverflowException caused by Recursion

I am currently writing a program to help write Lore. Every Book Object can be a parent and have children. Which means that every child can have children etc. into infinity. I was working on a ...
6
votes
4answers
490 views

how to deliberately trigger a StackOverflowException without using recursion?

I was told that every method has a stack the size of 1mb. So I assumed that initializing 256 integer values in one method will cause a StackOverflowException. I tried that in code, but no exception ...
6
votes
3answers
594 views

Flood fill recursive algorithm

I'm trying to make an algorithm that could fill an int array in c#. Basically, as the fill tool in MS Paint, I have a color and if I choose (x,y) coordinates in the array, it replaces all the ...
6
votes
4answers
1k views

Is there a way to check available stack size before recursive call? (C#)

For a C# AI program I use a recursive call to find the best next move (using a 30x30 Array to store the current board state). For each move I make, I want to see which of the possible moves I can make ...
5
votes
3answers
6k views

Suggestion for chkstk.asm stackoverflow exception in C++ with Visual Studio 2010

I am working with an implementation of merge sort. I am doing C++ Visual Studio 2010. But when I took a array of 300000 integers for timing, it is showing an unhandled stackoverflow exception and ...
5
votes
4answers
727 views

How to avoid this stackoverflow exception?

Here is the situation, I am developing a binary search tree and in each node of the tree I intend to store the height of its own for further balancing the tree during avl tree formation. Previously I ...
4
votes
1answer
156 views

StackOverflowException thrown on x64 systems; works properly on x86

this is just a "to be sure" question here. Are there any known special limitations/bugs on recursion / loops for the x64 systems in .NET 4? My case is pretty simple - a program runs fine on any x86 ...
3
votes
1answer
46 views

How to handle deep recursion when working with ArrayLists?

So earlier today I ran into an issue and now it's evening-time and all I've successfully done is identify the source of the issue. I have a bunch of nodes that make up a figure. These nodes can ...
2
votes
2answers
104 views

StackOverflowError with Recursion

Can anyone tell me why I am getting this error? It is really bugging me. What I am trying to do is find the sum of the expression 2^k +1 as k ranges from 1 through n. import java.util.*; public ...
2
votes
1answer
638 views

pagerank: how to resolve java.lang.StackOverflowError?

I'm trying to implement a pagerank algorithm with 1 million nodes as input. However, I've got this error. I'm quite sure it's because an open recursive call problem, from generateParamList(). I've ...
1
vote
1answer
745 views

why do i get java.lang.StackOverflowError here?

_The following program of the below question gives series of exceptions Exception in thread "main" java.lang.StackOverflowError at testing_package.Compute.factorial(Compute.java:105) I don't ...
1
vote
1answer
79 views

StackOverflowException on recursive anonymous functions

I'm trying to write a function to check whether a string is a palindrome, and using this example, I'm trying to reverse the string using a recursive anonymous function: static Boolean ...
1
vote
3answers
3k views

Stackoverflow Exception caused by property

I have a User class that has a property called Creator which is of type User (the user who created this user) public class User { public User() { UserName = ""; EmailAddress ...
1
vote
1answer
256 views

javascript recursive function: Uncaught RangeError: Maximum call stack size exceeded

I have a recurent function that traverses a ul li nested hierarchy. It bubbles up from a certain node, until reaches the ul with class tree-0 (which is the root of the hierarchy). The function: ...
1
vote
1answer
82 views

stack overflow unless printf under recursion

This code below is the code for finding the determinant for 3x3 matrix (this code is intended for nxn matrix, but for the sample, I used 3x3), using recursive The result is working fine, but I wonder ...
1
vote
1answer
283 views

VB.NET My class properties ends up in Circular references and thus StackOverflow exception

I have 2 classess. Role and User like this Role Public Class Role Public Property RoleID As Integer Public Property CreatedBy As User Sub New() If Me.CreatedBy Is Nothing ...
1
vote
2answers
54 views

How to handle recursion?

A 2D array represent an image, each pixel has a color, this recursive function job is to transform a region of the same color (c) surrounding pixel (x,y) to a new color (newC).The function is working ...
0
votes
5answers
1k views

Recursive loop on List<> causing stackoverflow

I have a List<> of objects containing two strings and a DateTime. I want to build another list of the same objects containing only the last unique items using the two strings as keys and the ...
0
votes
2answers
32 views

java catching stack overflow, getting msg display and return issues

So I'm using this recursive method to calculate the product of two numbers by recursive addition. I know that big numbers overflow the stack and my intention is to catch the stack overflow exception ...
0
votes
2answers
95 views

Stackoverflow Exception in Recursion

Today I wanted to write a program that solves a sudoku. When my approach didn't quite work I resorted to a solution found here: http://www.heimetli.ch/ffh/simplifiedsudoku.html But for some reason, I ...
0
votes
2answers
59 views

How to solve this StackOverflowError in this bad recursion example?

I'm having a programming issue related to bad recursion and StackOverflowError. I've got this case in a separate thread: public void subscribe(final String channel) { try { // blocking ...
0
votes
2answers
777 views

solving stackoverflowException in a recursive method

I have written a method for my homework to compute all of the permutations of a array of integer numbers with recursion. ( I am trying to implement backtracking algorithm). but it cause ...
0
votes
1answer
51 views

c# How to handle Stackoverflow exception in recursive function

Hi I am making my web scraping tool, and I need to have a recursive function in milliseconds to view offer availability. But I can't handle the stackoverflow exception because i keep calling the ...
0
votes
1answer
439 views

Recursion with maze solver

The project is to code a maze solver in Java using recursion and a tree (I'm using my own linked list, not exactly sure if it's a tree but I don't mind that). The lecturer never explains anything, so ...
0
votes
1answer
60 views

Stack Over Flow Error When generating form dynamically in android

I have a class for creating all views dynamically from json.As follows class Widget{ public static View createEditText(Context ctx,String hint,String hint_color,String ...
0
votes
3answers
128 views

Stack overflows although there is enough memory available

In my class our teacher wanted us to write a quicksort algorithm in C which will work on an array of 10000 int. My friends and I have written the code as seen on pseudocode. It works okay when ...