Page 1 of 1

new error that idk wat means

Posted: Thu Jul 21, 2022 11:48 am
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'
]

Re: new error that idk wat means

Posted: Thu Jul 21, 2022 12:15 pm
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.

Re: new error that idk wat means

Posted: Thu Jul 21, 2022 12:42 pm
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 :)