Steps to reproduce:
1. Create a function `test` in a datapack that calls itself over and over again.
/function test/function test2. Run /debug function test
3. now observe a debug file being created that keeps growing in size, quickly exceeding the GBs
4. If you are running a server, it will time you out, who knows what will happen on single player.
5. If you don't soon terminate the server process, your entire harddrive will either fill up or you will encounter a stack overflow exception. Whichever comes first.
Expected:
The
/debug function test/debug function testcommand respects the maxCommandChainLimit and terminates after 65536 commands just like regularly calling the function through
/function test/function testActual:
Keeps on going until a stack overflow occurs.
A snippet of the debug log is also included, but just pretend it goes on for another X Gigabytes or so...
I could not reproduce in 1.17.1. After the file had traced 65536 commands, the command finished running. The trace file still ended up being 8.59 GB, but at least it stopped eventually. 🙂