The problem is that i tried to reuse existing code. and had some issues with proxies so some msg.post stop work for me. and when msg.post was inside coroutine. coroutine just stop working without any message. and sims like it’s not possible to catch this kind of errors.
Good point about local variables. I forget to add local modificator quite often because I’m new to lua. definitely i need to avoid using vars in global context.