To your process queue question:
It is not directly possible to give feedback to the user when a queued action is finished. The queued action is running in a system context. There is no connection to your user session.
You could build something dirty with the microflow timer widget. This widget can execute a microflow periodically from a page. After creating your queued action (or batch of queued actions), you could execute a microflow every second. This microflow could check if a finished flag on some JobHelper object you created is set. If so, it would show the message to the user.
You could also use a self refreshing template grid to show the progress of some action using a progress bar.
But be aware of the fact that this solution only works if your user stays on that page until the job is done.
did you find a solution for this problem ?
How to fix
Wrap your recursive function call into a -
Also, you can localize the issue by setting a breakpoint on RangeError type of exception , and then adjust the code appropriately. Moreover, you can managed to find the point that was causing the error by check the error details in the Chrome dev toolbar console , this will give you the functions in the call stack, and guide you towards the recursion that's causing the error.