7 Stack Overflow Error
Contents |
Method java.lang Class StackOverflowError
Fix Stack Overflow Error
java.lang.Object java.lang.Throwable java.lang.Error java.lang.VirtualMachineError java.lang.StackOverflowError All Implemented Interfaces: Serializable public class
Stack Overflow Error Windows Xp
StackOverflowError extends VirtualMachineError Thrown when a stack overflow occurs because an application recurses too deeply. Since: JDK1.0 See Also:Serialized Form Constructor Summary Constructors stack overflow javascript error Constructor and Description StackOverflowError() Constructs a StackOverflowError with no detail message. StackOverflowError(Strings) Constructs a StackOverflowError with the specified detail message. Method Summary Methods inherited from classjava.lang.Throwable addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString Methods inherited from classjava.lang.Object clone, equals, Stack Overflow Line Error the company Business Learn more about hiring developers or posting ads with us Stack Overflow stack overflow line 0 error Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 stack overflow error java million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up What is a StackOverflowError? up vote 219 down vote favorite 73 What is a StackOverflowError, what causes it, and https://docs.oracle.com/javase/7/docs/api/java/lang/StackOverflowError.html how should I deal with them? java exception-handling stack-overflow share|improve this question edited Jun 19 '15 at 4:55 asked Oct 18 '08 at 8:13 Ziggy 7,339165374 add a comment| 11 Answers 11 active oldest votes up vote 229 down vote accepted Parameters and local variables are allocated on the stack (with reference types the object lives on the heap and a variable references that object). The stack typically lives at the upper http://stackoverflow.com/questions/214741/what-is-a-stackoverflowerror end of your address space and as it is used up it heads towards the bottom of the address space (i.e. towards zero). Your process also has a heap, which lives at the bottom end of your process. As you allocate memory this heap can grow towards the upper end of your address space. As you can see, there is the potential for the heap to "collide" with the stack (a bit like tectonic plates!!!). The common cause for a stack overflow is a bad recursive call. Typically this is caused when your recursive functions doesn't have the correct termination condition, so it ends up calling itself forever. However, with GUI programming it's possible to generate indirect recursion. For example, your app may be handling paint messages and whilst processing them it may call a function that causes the system to send another paint message. Here you've not explicitly called yourself, but the OS/VM has done it for you. To deal with them you'll need to examine your code. If you've got functions that call themselves then check that you've got a terminating condition. If you have then check than when calling the function you have at least modified one of the arguments, otherwise there'll be no visible change for the recursively called function and the of Norton Internet Security. I had no such problems before. Should I go back to my 2005 problem-free version of Norton? • I've now received a couple of reports of stack overflow problems after people have upgraded to Norton Internet Security http://ask-leo.com/whats_a_stack_overflow.html 2006. Here's what I know so far. • One reader ran into this problem after upgrading Norton Internet Security to the 2006 version. After a lot of effort and patience on his part, apparently Symantec admitted there was an issue, and advised him to revert to the 2005 version until the issue was addressed. Unfortunately, I've been unable to confirm any of this independently - I don't doubt my reader at all, but I do like to independently corroborate if stack overflow at all possible. Unfortunately I've found nothing on the Symantec website. Yet. I'm hopeful that it will eventually be addressed there. Keep track of the comments to this article as readers report in, and I'll also update it as soon as I find out anything. As to your original question, "what's a stack overflow?" - well, for a simple phrase, it's a fairly deeply technical answer. It has to do with how the computer itself manages data, and how stack overflow error the programs running on it utilize it. Conceptually, a stack is just that ... a stack of information. You can put things on the stack, and take things off of the stack. It sounds kinda useless, but you'll have to trust me that it's fundamental and incredibly useful on microprocessors. Each program running has it's own stack somewhere in the computer's memory. But because there's so much else going on in memory, each stack is only allocated so much room. Hopefully each program will a) allocate enough room to begin with, and b) not have a bug that would cause it to keep putting things onto the stack without taking them off. If you put too much on the stack ... it overflows. What happens when you overflow a stack varies based on how the software is written. What causes a stack overflow? Again, it varies a lot. It all depends on how the software in question was written. Ultimately, any stack overflow that you see is a bug, somewhere. Article C2489 - December 14, 2005 « » Share this article with your friends: Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More abo