Questions tagged [stack-overflow]

NOT THIS WEBSITE! Use this tag for the error caused by pushing too many items onto the callstack. If you have a question regarding this website, please go to https://meta.stackoverflow.com

DO NOT USE THIS TAG TO REFER TO THE STACK OVERFLOW WEBSITE! If you have a question regarding the site, please go to Meta.


In software, a stack overflow occurs if the call stack pointer exceeds the stack bound. The call stack may consist of a limited amount of address space, often determined at the start of the program. The size of the call stack depends on many factors, including the programming language, machine architecture, multi-threading, and amount of available memory. When a program attempts to use more space than is available on the call stack (that is, when it attempts to access memory beyond the call stack's bounds, which is essentially a buffer overflow), the stack is said to overflow, typically resulting in a program crash.

(Wikipedia: Stack overflow)

See How does a “stack overflow” occur and how do you prevent it? for general advice on stack overflow exceptions, what they are, etc.

See also:

4171 questions
1
vote
3 answers

F# continuations goes on StackOverflowException

Hi guys I'm implementing an F# function that takes two lists of type : (int*float) list. These two lists have different lentgths. The int element of the couple is an increasing code. What I wanted to do is create a new list that will contain a…
Fr.Usai
  • 384
  • 2
  • 17
1
vote
1 answer

StackOverflowException in XNA Aiming Sample

Basically, I am getting this error "An unhandled exception of type 'System.StackOverflowException' occurred in Sortie.exe." I understand the reason for the error, that I'm getting a method to call another method that then calls the first method (or…
Kris
  • 11
  • 1
1
vote
2 answers

Resolve java.lang.StackOverflowError memory problem

I'm using a recursive function, and I'm getting this error when I execute : Exception in thread "main" java.lang.StackOverflowError at java.util.HashMap$Entry.(Unknown Source) at java.util.HashMap.addEntry(Unknown Source) at…
Wassim AZIRAR
  • 10,823
  • 38
  • 121
  • 174
1
vote
0 answers

Max call stack is greater in while loop

all. Would be grateful if someone could clarify the following. We have a basic factorial function and a for loop with a try catch block which runs the function until error "Maximum call stack size is exceeded" is thrown. When run in while loop max N…
1
vote
0 answers

Try to run C program, encounter "exited with code=3221225725" on my machine only

I'm trying to create a C program to measure how long it takes to copy a 2D array into another. When I run my code, I get: exited with code=3221225725 Now, this is code provided by the instructor, character for character, but it seems to work for…
Serif
  • 11
  • 2
1
vote
0 answers

java.lang.StackOverflowError when debugging non-recursive function call in new Thread

In Android Studio, I created a very small one-activity app: package com.musicslayer.crashrepro; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { public void…
Musicslayer
  • 29
  • 1
  • 1
1
vote
0 answers

Stack overflow occurs if I call an assembler routine too many times

I pruned everything to the min to show this problem In Compaq Visual Fortran I write Do 1 I =1,N CALL SUBNAM(A,B,100) 1 CONTINUE If "SUBNAM" is any routine written in Fortran , the DO loop count N can be as big as you like. N=100000 is…
Paul
  • 114
  • 3
1
vote
3 answers

Can modern computers make distinctions between data and instructions at the machine level?

I was reading this book called The Shellcoder's Handbook and then I came across this information: A modern computer makes no real distinction between instructions and data. If a processor can be fed instructions when it should be seeing data, it…
1
vote
1 answer

don't know how to prevent java.lang.StackOverflowError

I am supposed to write a recursive(!) method to count the amount of occurrences of a given integer in an integer array and return true if even and false if odd. This is my code so far: public static boolean evenNumberOf(int x, int[] arr) { if…
egg
  • 13
  • 2
1
vote
1 answer

Boost serialization with recursive data structure ends up in stack overflow

Problem I'm having trouble using Boost Serialization library with a recursive data structure. More precisely, I want to serialize a matrix which is represented by nodes containing a value, and where each node has access to its neighbors…
Wassim
  • 386
  • 2
  • 15
1
vote
2 answers

Python 0xC00000FD fix without thread

I have a program that needs to do very deep recursion. I increased the recursion limit to 10**6 using sys.setrecursionlimit(10**6). However, the process exited with this error code: Process finished with exit code -1073741571 (0xC00000FD) After…
1
vote
1 answer

Stack Overflow in Balanced Parenthesis

I am trying to write a program to check if a string of brackets is balanced or not. If balanced, I do not want any output. But if it is not balanced then I want it to return the brackets needed to balance it. For example '([])' should be balanced…
user15409086
1
vote
1 answer

PHP: Variable not getting interpreted correctly?

I'm not really sure what question to ask because I'm not really sure what is causing it. So here's what is happening..... I have a function that starts off like this: function core_stackoverflow_init($obj){ $options = $obj->options; …
Senica Gonzalez
  • 7,996
  • 16
  • 66
  • 108
1
vote
1 answer

Uncaught exception java.lang.stackoverflowerror using JMeter

I want to ask about the result when I execute JMeter using CLI mode. When I'm trying to execute with JMeter in my computer, it's fine, but when I try to execute in CLI mode, it shows this error: Until now, I still don't know what happened :( here's…
Antoni
  • 39
  • 6
1
vote
0 answers

What is best practice to map List without stack overflow

I have two entity TaskDTO and UserDTO @Data @AllArgsConstructor @NoArgsConstructor @EqualsAndHashCode @ToString @Builder public class TaskDTO { private Long id; private String name; private String description; private LocalDateTime…
1 2 3
99
100