Usually, the main reason for such a lock is an infinite loop, usually from a function or 'While' condition, etc.
You can try to run it in debug or use the browser addon to write debug info to the console.
Last resort would be to post your project so others can test and help.