An "infinite loop" is a loop in which the exit criteria are never satisfied; such a loop would perform a potentially infinite number of iterations of the loop body. The general problem of determining whether the execution of a loop with given preconditions will result in an infinite loop is undecidable; in other words, there is no algorithm to determine whether an execution of a loop will eventually terminate. This is known as the halting problem.
Questions tagged [infinite-loop]
3528 questions
1
vote
1 answer
What causes Hibernate infinite loop at EntityType.java:677?
Running Hibernate 4.3.5, I get an infinite loop here, leading to a StackOverflowError:
org.hibernate.type.EntityType.getIdentifierOrUniqueKeyType(EntityType.java:677)
The method in question is:
public final Type getIdentifierOrUniqueKeyType(Mapping…

user2800708
- 1,890
- 2
- 18
- 31
1
vote
1 answer
Makefile loops endless
My makefile loops endless but can't figure out why? Here is it further informations at sf.net/p/ags
AUTOMAKE_OPTIONS = foreign
top_srcdir = $(shell pwd)/src/ags
SUBDIRS = src/ags \
doc
-include ./src/ags/Makefile.am…

h3lix
- 31
- 5
1
vote
1 answer
What happens if a bean attempts to load the Spring application context in its constructor?
Given the following Spring application context and class A, what happens when you run class A?
applicationContext.xml (in classpath):

Derek Mahar
- 27,608
- 43
- 124
- 174
1
vote
1 answer
Memory leak in infinite loop
What are the damages in your computer if you run a program which continuously generates memory leaks ?
For example:
while(true)
{
char* c = malloc(sizeof(char));
c = NULL;
}
then let that code execute for hours or days?

Brainless
- 1,522
- 1
- 16
- 30
1
vote
6 answers
Why while(true) is an infinite loop?
I have tried to search this question in stackoverflow but did not find it. Feel free to delete this post (please link me too...) if this is posted elsewhere.
I just started programming with C and learnt that
while(true)
{
}
forms an infinite…

Bryan Shih
- 187
- 1
- 1
- 5
1
vote
0 answers
Can an infinite loop cause a StackOverflow Exception in Java
I am working with a textbook right now and one of the answers to the 'test' questions seems wrong to me. They have the following code example:
while(true){
doStuff();
}
static void doStuff(){
for (int i = 10; i > 5; i++){
…

PGMacDesign
- 6,092
- 8
- 41
- 78
1
vote
2 answers
How to stop infinite loop after the end of post list? Wordpress
I build custom infinite loop for my blog. Everything is working great but if there is no posts to show then also my infinite loop is loading again and again with the other design parts. How to add conditions in my infinite loop so it can stop if…

Ramesh Pardhi
- 407
- 5
- 18
1
vote
1 answer
How to fix infinite loop error?
I have a script, and it is preventing me from accessing urls such as example.com/hi that are not part of the script.
How can I add an exception so that these urls work? This is my htaccess right now.
Options -MultiViews
…

Jones Lonson
- 23
- 3
1
vote
2 answers
Infinite loop when calling the stack print function
This program should takes a postfix arithmetic expression then compiles the values of that expression.. Each time an integer is read, its gonna get pushed into the stack.. Otherwise, Two integers would be popped if +,-,* is read.
class Stack {
…

Raghad
- 53
- 1
- 1
- 12
1
vote
1 answer
Flooding RAM using an infinite loop in Python
I've created an infinite loop to try and flood the RAM with a string. However, I get the "Memory Exceeded" error very quickly and I assume this is some preventative method in Python to stop this happening. Is there a way to change this infinite loop…
user4358169
1
vote
1 answer
Stack level too deep error - what's wrong with this code?
I've a bit of repeated code in a controller I'm using, which I thought I'd drop into a method. However, doing so raises a 'stack level too deep' error. I understand this means there's an infinite loop in there somewhere, though I can't see it (I'm…

SRack
- 11,495
- 5
- 47
- 60
1
vote
2 answers
Infinite loop without accepting input
I am writing a simple C++ Program which allocates dynamic memory to my Program and then deletes this memory. Here is my Program:
#include
#include
using namespace std;
int main ()
{
int i,n;
int * p;
cout << "How many numbers…

Prabhash Rathore
- 709
- 10
- 18
1
vote
2 answers
cin infinite loop when reading in a non-numeric value
I had a strange behavior in a program and I spent long time trying to deduce why. it was an infinite loop with no sense. Testing these lines of code(under suspicion) i got the same result. Every time I type in a non-numeric value such a symbol, the…
user3477273
1
vote
2 answers
Infinite loop in cobol program
I am new to old COBOL. I am trying an example on online compiler. But, the code I am using is entering an infinite loop. The code is :
IDENTIFICATION DIVISION.
PROGRAM-ID. Conditions.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 Char …

Coding man
- 957
- 1
- 18
- 44
1
vote
4 answers
Help! I got a runaway PHP script. My server is down
I got a PHP script that is looping and will continue to do so for about another hour. How do I stop it. The script explicitly overrides the time out and the memory buffer. It's on a shared hosting server with cPanel installed. The entire website is…

HyderA
- 20,651
- 42
- 112
- 180