If an exit is called inside a taskfunc, the "epilogue" statements of the module (which reset the variables like sp, fp) never run, so the TCM memory pointers will start malfunctioning and hitting nonsense indices like negative numbers.
Pictured here from @mkruselj :

I feel like to fix this, if an exit is found in the taskfunc, these statements should always precede the exit as well, as many occurrences of exit are found.
If an exit is called inside a taskfunc, the "epilogue" statements of the module (which reset the variables like sp, fp) never run, so the TCM memory pointers will start malfunctioning and hitting nonsense indices like negative numbers.
Pictured here from @mkruselj :
I feel like to fix this, if an exit is found in the taskfunc, these statements should always precede the exit as well, as many occurrences of exit are found.