Tagged Questions
1
vote
5answers
452 views
java.util.Sublist throwing StackOverFlowError
We are getting occasional StackOverFlowError errors in production related to doing a SubList operation. Has anyone seen something like this before and know what could cause it?
This is the code that ...
-1
votes
1answer
57 views
While loop stack overflow
I use this method, and i get the while loop stack overflow.
No error message or crash. I got this in my log cat:
05-18 20:17:16.528: W/InputEventReceiver(19831): Attempted to finish an input event ...
2
votes
2answers
55 views
Stack overflow error with GUI
Alright so I am making a calculater, and I am getting a stack overflow error, i'm guessing because it's trying to handle to much data.
import java.awt.*;
import javax.swing.*;
import ...
1
vote
2answers
44 views
java.lang.StackOverflowError Recursive Directory
In my Android application I'm populating all of the paths of the external storage into an array.
A small number of devices are reporting a StackOverflowError.
I've read many linked posts regarding ...
5
votes
1answer
88 views
Why does the JDK implementation of quicksort risk a stack overflow?
I saw a presentation the other day in which the speaker had used the technique outlined in McIlroy's paper A Killer Adversary for Quicksort to generate an input to Arrays.sort for primitive types that ...
0
votes
1answer
60 views
Java Stackoverflow Error Recursion
This code I have written works great until a certain input size. If the input gets too large, I get a "java.lang.StackOverflowError". I have read some other entries on stackoverflow regarding this ...
0
votes
4answers
47 views
Effect of stackoverflow on application server [closed]
Was wondering if one of the requests to a web server results in StackOverflow error is the whole server shutdown or just the thread dies or an error is thrown back to the client?
1
vote
1answer
103 views
StackOverflowError while saving and loading my object in android
I'm writing an android program and i just ran into a problem.
My program serves to create graphs, run some specific algorithms on them (Dijsktra, BelmanFord, etc.), save the graphs to SD Card and ...
-2
votes
0answers
78 views
Jigsaw Puzzle Solver [duplicate]
Ok, so I have a 3 x 3 jig saw puzzle game that I am writing and I am stuck on the solution method.
public Piece[][] solve(int r, int c) {
if (isSolved())
return board;
board[r][c] = ...
-1
votes
0answers
50 views
Blackberry - calling super.sublayout causes stack overflow
Edit on Nate's request:
public class MainView extends MainScreen implements FieldChangeListener
{
private VerticalFieldManager vfm = new VerticalFieldManager(...);
private CustomField field1 ...
1
vote
1answer
68 views
Java concurrency: synchronized statements/methods causing StackOverflowError exception
I'm stress-testing an event callback handling framework in Java which makes heavy use of concurrency where possible, and thus makes use of synchronized methods and statements when data races are a ...
1
vote
9answers
94 views
Why do i get a StackOverflowError
I made a function that computes the sum of digits of an integer. Trying to make the code shorter, i put in comment the if statement to see if would still work so i can remove it but i get a ...
0
votes
1answer
60 views
Spring MVC Stack Over Flow Error - trying to get data from database
I have a form that inserts into a database however before i preform the insert i check if there are existing records. I am unable to insert the record and i am getting a StackOverFlow Error.
Can ...
-2
votes
1answer
66 views
Android minesweeper game causes stackoverflow [closed]
I'm trying to do simple minesweeper game in android platform.When i'm clicking a block tile it triggers this recursive function to reveal empty blocks around it.
private void openBlocks(int r,int ...
1
vote
1answer
25 views
how to rewrite the digamma funcition to nonrecursive
I ran a java program and got a stackoverflow error and this error was caused in a digamma function,the code is
public static double digamma(double x) {
if (x >= 0 && x < ...
1
vote
3answers
52 views
Check everything in one list again another, causing a stack overflow
Basically, I'm trying to check an arrayList of numbers against another ArrayList of numbers, As I want to see if anything in my TempPositionList, is in my Visited words list, however because Visisted ...
1
vote
4answers
75 views
Java dealing with stackoverflow and continue normal execution after stackoverflow error
I'm trying to do a recursion in Java. I just want to stop the recursion and continue normal prgram execution
void doit(){
try{
doit();
}
catch (StackOverflowError e) {
...
3
votes
3answers
127 views
Why do I get java.lang.StackOverflowError when using Flood Fill algorithm?
My program is supposed to fill in a non-regular shape with a color (black and white for the beginning) that I specify in the boundaryFill4 method. Here is the link to myImage.png: ...
1
vote
4answers
158 views
Quicksort Algorithm causing stack overflow
SOLVED: posted in the end of THIS comment.
I keep getting this error and I can't find any explanation to why it occurs.
Exception in thread "main" java.lang.StackOverflowError
at ...
1
vote
1answer
39 views
Can someone explain why I'm encountering stackoverflow?
I have a int, "count" that adds one after each recursion, but I also have an if statement that stops the recursion once the int is equal to, or greater than another integer. Somehow that if statement ...
0
votes
2answers
92 views
Why does this method cause an Infinite Recursive call?
I'm struggling to understand why this class is not functioning. It was part of an assignment for a course on Data Structures(EDIT: The deadline for the assignment has passed, I just want to figure it ...
2
votes
2answers
1k views
Quicksort (Java) causes StackOverFlow at array.length > 60k
My code works properly (to my knowledge) up until my input array size (a.length) is around 62,000 at which time I consistently get a StackOverFlowError. I previously had used 2 recursive calls to ...
0
votes
1answer
62 views
StackOverflowError on keyReleased, but mouseReleased works fine
Selecting with the mouse works fine, as can be seen in the below run-time logs:
init:
Deleting: /home/thufir/NetBeansProjects/gnumail-providers/build/built-jar.properties
deps-jar:
Updating property ...
7
votes
12answers
4k views
Stack overflow when calculating the 10,001st prime number in Java
I am doing problem 7 of Project Euler. What I am supposed to do is calculate the 10,001st prime number. (A prime number is an integer greater than one that is only divisible by itself and one.)
Here ...
-2
votes
3answers
56 views
Why Stack overflow error occurs on creating nonstatic instance within an instance? [duplicate]
Why Stack overflow error occurs on creating nonstatic instance within an instance of same class ??
public class ObjectTest {
ObjectTest instanceObj = new ObjectTest("Outside");
public ...
2
votes
3answers
97 views
Why do I still burn out the stack using tail recursive Fibonacci algorithm?
Stack overflows before n=1000. Is it because of the reference to the long[] parameter, that the JVM feels the need to hold on to every stack frame (wild guess), or am I doing something else wrong?
...
2
votes
4answers
130 views
StackOverFlow Error while handling input of size 100000 and more
I am using Collections.sort()in a List of size 100000 and getting StackOverFlow error. How can I scale this up? Here is the code:
This is a part of a big project. Collections.sort() is being called ...
1
vote
2answers
106 views
Stack Overflow Error in Java
I'm trying to code a program that finds the kth smallest element using recursion and quick sort like partitioning so as not to have to sort the entire array. I feel like my code should work, but I get ...
3
votes
3answers
1k views
Compiles in Eclipse but not with Javac from command line: StackOverFlow
I have a Java project that contains many very large source files and it compiles fine in Eclipse, however it will not compile with javac from the command line or within Ant.
When I try to compile it ...
70
votes
8answers
101k views
What is a stack overflow error?
I'm a complete beginner writing Breakout (the game) in Java. All was going well until I started to get a stack overflow error in the late game. Unfortunately I know that without actually putting the ...
0
votes
2answers
156 views
Url Shortener redirects to index.html
Yes, yet another url shortener written in java, because I wanted my own, and because why not. Currently everything works, just not they way I want to to. In short, there is only one servlet mapped ...
0
votes
3answers
55 views
The correct way to initialize classes and stack overflow errors
This may be a stupid question, but I'm getting sick of this. How do you properly initialize a class object so you can access methods and variables in it? Here's my code:
public class GenChunk {
...
0
votes
2answers
56 views
recursion method Stack Overflow error
In my code i am just trying to make a simple program that tells you if one number can divide into another number evenly (in this case that number is 3). right now I am saying that if x (the number ...
23
votes
7answers
674 views
Understanding java stack
There is a code:
public class Main {
public static void main(final String[] args) throws Exception {
System.out.print("1");
doAnything();
System.out.println("2");
}
...
0
votes
1answer
321 views
Recursive bin packing algorithm won't scale
I completed an assignment whose specs require:
Recursive solution
Capacity <= 100
values.length <= 25
Only parameters are capacity and index
Repetition of values is allowed
I've spent ...
0
votes
3answers
84 views
StackOverflowError when matching large input using RegEx
I got StackOverflowError when matching the result using a RegEx pattern.
The pattern is (\d\*?(;(?=\d))?)+. This regex is used to validate the input:
12345;4342;234*;123*;344324
The input is a ...
-2
votes
1answer
66 views
Analyze some html pages from StackOverflow
I need to extract answers from 500 stackoverflow questions at a time, but suddenly I read this error on Eclipse console:
Server returned HTTP response code: 503 for URL:
...
1
vote
2answers
56 views
Is that “StackOverflowError” on Java RegularExpressions always means necessity to optimise Regex?
To read CSV files, I have the following regular expression in Java:
Pattern csvline = Pattern.compile("((([^\\\"]|\\\"\\\")+|\\\"([^\\\"]|\\\"\\\")+\\\"))*", Pattern.DOTALL);
This expression passes ...
1
vote
3answers
1k views
Stackoverflow with Quicksort Java implementation
Having some problems implementing quicksort in java. I get a stackoverflow error when I run this program and I'm not exactly sure why. If anyone can point out the error, it would be great.
si is ...
-4
votes
1answer
117 views
StackOverFlowError when removing components from a JPanel [closed]
I have a JPanel that contains other panels with different GUI components including buttons with action listeners. At some point I want to remove some of the components and add new ones. So I try to ...
0
votes
2answers
204 views
Stackoverflow error while implementing insertion sort using recursion
public static void insertionSortRecursion(String a[], int first, int last) {
if (first < last) {
//sort all but last
insertionSortRecursion(a, first, last - 1);
...
0
votes
1answer
84 views
StackOverflowError No idea what is wrong
I'm continuously receiving this error when trying to run my program.
Exception in thread "main" java.lang.StackOverflowError
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at ...
1
vote
1answer
159 views
Mergesort - Stackoverflow when splitting array not in a half
I've a problem.
I have to edit the standard mergesort algorithm, changing the ratio between the two halves of the array. Standard mergesort splits array in 2. BUT I've to split it with a coefficient.
...
0
votes
5answers
44 views
how a class building its other instances while being constructor
I want to create a coordinate class while when I instantiate this class, it automatically build its 6 adjacent coordinate, however, when I was doing it, I always encountered stackoverflow problem and ...
0
votes
1answer
285 views
StackOverflowError in recursive binary search in file in java
The filepointer gets stuck at a point resulting in a StackOverflowError. Can you point me to what exactly is wrong here? The error exactly is: java.lang.StackOverflowError
I am doing a seek to find ...
3
votes
4answers
179 views
Stack Overflow error when constructing a new object in Java
I'm trying to construct a PackingCase object with a certain set of values. While the program shows no errors during coding, when running, I get this error;
Exception in thread "main" ...
2
votes
3answers
166 views
Why doesn't Java forkbomb cause a StackOverflowError?
I am new to programming, and I'm trying to teach myself what a StackOverflow is caused by. I played around with loops and caused the error, but a code for a forkbomb I tested doesn't cause the error. ...
0
votes
0answers
83 views
StackOverflowError when calling RuleGrammar.listRuleNames() using Sphinx
I am using Sphinx to parse grammar files.
I have a function that loads all the grammar files. This function is called at the start of the program and every time the user requests a reload. When ...
1
vote
2answers
123 views
Why does my recursion not return but end up in a stack overflow?
First off, this is part of an extra credit homework, so please do not give me the answer. Please just help me understand where I might have a problem with what is going on. It is a Tic-Tac-Toe ...
1
vote
1answer
109 views
Stack search causes stack overflow
I am trying to search a "hand of cards" (a queue) by inputting a search card, comparing the values (colour and rank) of the search card to the current card in the hand, and if a match is found, ...