The stack is mainly used to store local variables, so check for something that could be declaring an unintended amount. That’s about all I can tell without seeing your code.
No i don’t use .Changed events and the error comes from when im trying to create a snaphot in LuauHeap Client
The problem is that I don’t have one script, but many, so I don’t know where the error comes from.
Adding onto this, it could also be function calls (non-fastcall, more than 3 arguments), so you could also try looking for a function call with a large amount of arguments.
No, I don’t have any functions with more than 3 arguments.
Well the error you’re getting is pretty ambiguous, I’m not really sure how you could approach it either. Might even be an engine bug, so unless you get a solution here I’d suggest reporting it.
Ah, so not during normal gameplay but just when trying to take the heap snapshot?
If that’s the case it is possible it could be an engine bug. It does sound like they’ve had issues in the past. LuaHeap Server Snapshots Crashing Server
I did my research, and found out that it happens when you use too many variables. What is the biggest script you have on your game? Does it have lots of variables?
Yes my scripts have a lot of variables
Well, can you temporarily remove some of them, just to see if this error will disappear?
Uhm, if i remove some variables it will ofc error something
Yeah, but it won’t pop the error “Max lua stack size reached”. I know it will pop other ones, but it is only an experience that you could easily revert back to normal
i have just tried removing the 90% of the variables but it still pops the error “Max lua stack size reached”.
Oh, then I don’t know what the issue is.
Do you think we can see the script?
As I said, I don’t know which script is causing this issue.
Go around disabling scripts and see if it changes anything
I disabled all the scripts in the game, but it still gives the error.
If you hit “file > publish to roblox as” in studio, and reupload the game as a new place, does the issue continue?
I’m late, but I think I’ve found the problem. The issue was HD Admin, though I’m not sure why.