new error that idk wat means

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
A-lox
Prole
Posts: 43
Joined: Sun Apr 10, 2022 1:58 am

new error that idk wat means

Post by A-lox »

WHAT DOSE STACK OVERFLOW MEAN

Error[

human.lua:5: stack overflow


Traceback

[love "callbacks.lua"]:228: in function 'handler'
human.lua:25: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
...
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
human.lua:33: in function 'spawnhumans'
main.lua:14: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'
]
MrFariator
Party member
Posts: 563
Joined: Wed Oct 05, 2016 11:53 am

Re: new error that idk wat means

Post by MrFariator »

Wikipedia article:
The most-common cause of stack overflow is excessively deep or infinite recursion, in which a function calls itself so many times that the space needed to store the variables and information associated with each call is more than can fit on the stack.[2]
If you read the error message, you might spot that it's repeatedly calling the function "spawnHumans", in a recursive manner (spawnHumans calls spawnHumans calls spawnHumans...). If there's no way for this recursion to stop, this is an infinite loop that runs until the stack is overflown, resulting in a crash.

If you want help, post the relevant code from human.lua, or fix the recursion issue yourself.
A-lox
Prole
Posts: 43
Joined: Sun Apr 10, 2022 1:58 am

Re: new error that idk wat means

Post by A-lox »

MrFariator wrote: Thu Jul 21, 2022 12:15 pm Wikipedia article:
The most-common cause of stack overflow is excessively deep or infinite recursion, in which a function calls itself so many times that the space needed to store the variables and information associated with each call is more than can fit on the stack.[2]
If you read the error message, you might spot that it's repeatedly calling the function "spawnHumans", in a recursive manner (spawnHumans calls spawnHumans calls spawnHumans...). If there's no way for this recursion to stop, this is an infinite loop that runs until the stack is overflown, resulting in a crash.

If you want help, post the relevant code from human.lua, or fix the recursion issue yourself.
thank you have it all fixed :)
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests