Just adding to this: max stack size exceeded is virtually always indicative of an infinite loop of call backs.
The "Stack" is a collection of functions that are being run inside of each other. Think of it like an assembly line. When you make a new actor for instance, you call a constructor. That constructor then calls a setup function to get their name. The "stack" is now the setup function running inside (or on top) of the constructor. The setup script then calls a string function to generate the name. The stack is now the string function inside of the setup function inside of the constructor. When the string function finishes, it passes control back down the stack to the setup function, and the stack is now `setup` <- `constructor` again.
When you see a max stack size limit exceeded, it's usually because two or more functions keep calling each other back and forth without resolving any of their already running instances. You can fix this by terminating the circular reference or resolving the situation that creates it.
I hope this was helpful and not just me womansplaining nonsense. I really struggled with circular references when I first started developing professionally.
The "Stack" is a collection of functions that are being run inside of each other. Think of it like an assembly line. When you make a new actor for instance, you call a constructor. That constructor then calls a setup function to get their name. The "stack" is now the setup function running inside (or on top) of the constructor. The setup script then calls a string function to generate the name. The stack is now the string function inside of the setup function inside of the constructor. When the string function finishes, it passes control back down the stack to the setup function, and the stack is now `setup` <- `constructor` again.
When you see a max stack size limit exceeded, it's usually because two or more functions keep calling each other back and forth without resolving any of their already running instances. You can fix this by terminating the circular reference or resolving the situation that creates it.
I hope this was helpful and not just me womansplaining nonsense. I really struggled with circular references when I first started developing professionally.