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
1 answer

What can cause a Stack Overflow in this function?

I was writing a casual minesweeper, and wanted to realize a method to track an empty cells at the field, so I had wrote this algorothm: //bigger array was taken to prevent out of range,when init mines and numbers /*creating mines in 1 to FIELD_NUM…
1
vote
0 answers

tomcat startup throws stackoverflowerror because of cyclic inheritance dependencies

I deployed my application war to tomcat, threw StackOverflowError after startup, the stacktrace is shown in the picture below. According to the stacktrace tip and source code, i can find the cyclic inheritance dependencies…
Jadic
  • 33
  • 1
  • 7
1
vote
0 answers

Recursive type in Scala 3

Just trying to complete an exercise for flattening nested Lists which can contain Ints, nested Lists, or null. This is easy to do with List[Any] but I was wondering if it's possible to get compile-time checking on the inputs/test values. So test…
Luigi Plinge
  • 50,650
  • 20
  • 113
  • 180
1
vote
1 answer

Can I use a public field that refers itself in its setter method?

I have a class that looks like this: public class someClass { public someclass() { someString = "ABC"; } public string someString { get => someString; set => someString = value; } } I understand that…
SomeName
  • 27
  • 1
1
vote
0 answers

How to pass Maven compiler args via environment variable?

I have the issue that my mvn compile fails on an internal project for some reason. Two other colleagues tried it as well and it does not fail on their machines. We use Lombok there (I am not a fan but that was not my choice) and for some reason it…
Apollo
  • 1,296
  • 2
  • 11
  • 24
1
vote
2 answers

forrt1: severe (170): Program Exception - stack overflow

and thanks ahead of time for any help! I have compiled a program (which I did not write) and it works just fine on Mac's but when I try to execute the program on Windows I get the following error message shortly after execution of the program…
user869525
  • 769
  • 2
  • 12
  • 21
1
vote
2 answers

Why do I get a StackOverflowError on Android when I repeatedly perform OnListItemClick?

I have a list view. While clicking the listview an intent is called.. But when i repeatedly perform OnListItemClick, a StackOverflowError is thrown My code is : protected void onListItemClick(ListView l, View v, int position, long id) { // TODO…
jennifer
  • 8,133
  • 22
  • 69
  • 96
1
vote
0 answers

gcc linker, how to declare a region between HEAP and STACK, put a variable there to detect overflow (hard fault issue on Cortex M3)?

I am working on a Silabs ARm Cortex M3 (EFM32PG12) I want to declare a linker section XXX between heap and stack, put a variable there and see later on (hardware fault topic) if this variable gets dirty. .heap (COPY): { __HeapBase = .; …
yo3hcv
  • 1,531
  • 2
  • 17
  • 27
1
vote
1 answer

How can I catch a stack overflow in a Rust child thread?

I have an recursive algorithm which can be very deeply nested (it is part of a decompiler). I know that normally you wouldn't just increase the stack size, because a stack overflow normally indicates infinite recursion, but in this case the…
curiousdannii
  • 1,658
  • 1
  • 25
  • 40
1
vote
1 answer

Why do I get StackOverflowError

This is my parent class with two methods named toString. The one with the parameter is used in the child class. public abstract class Army { private String commander; private int soldiers; private int guns; private int horses; …
Monoxyd
  • 406
  • 1
  • 7
  • 18
1
vote
1 answer

remoteControlReceivedWithEvent method

Possible Duplicate: remoteControlReceivedWithEvent in AVAudio is not being called I am trying to get remote control events to start/stop some audio my app is playing, but -remoteControlReceivedWithEvent: is not getting called. My app has a tab…
user700083
  • 21
  • 4
1
vote
2 answers

Trouble reading memory

When I run my code through the debugger, after a series of steps it eventually gets lost and executes commands out of order. I'm not sure if the stack is overflowing or what. This is the error I usually get: MSP430: Trouble Reading Memory Block at…
Dustin
  • 89
  • 11
1
vote
0 answers

Java Application Stack Overflow on Linux Environment

I'm working with a vendor who has provided me a Java application which I'm trying to get up and running on a Linux OS (CentOS 7). The vendor builds, runs and tests the application on Windows. The application starts up just fine on my Linux system.…
azurepancake
  • 751
  • 1
  • 9
  • 15
1
vote
1 answer

need help exporting the users previous ou, description, and canomical name to the csv file so i can create a script to reverse it back for DR

here is my code, so im a sysadmin. 21, little coding exp... im trying to develop a script that will move inactive users to an ou, and export logs of their previous ou, description and principal name into a folder that i can then use for reverse…
1
vote
0 answers

Node.js stack-size silently crashing

I have a JavaScript commandline program that needs more stack space. The option for this is node --stack-size but it's not working for me. Test case: 'use strict' function f(...a) { console.log(a[0] + a[a.length - 1]) } var a = [] for (var i =…
rwallace
  • 31,405
  • 40
  • 123
  • 242
1 2 3
99
100