
The massive func must have been screwing with program stack somehow?
Solution:
I split the heavy functions main loops into state loops, so one iteration runs per frame.
I had to implement a register stack in AI vars.
It all works nicely now, with the added benefit of being an asynchronous function, you call it, it hashes and then calls you back with the result when its done. So FPS stays at 60.
Now to add a queue system so multiple calls can be made to it and they will be worked on in sequence.
