Sorry, this is way to vague to really help with. You might have memory leak, some driver problem, file space/sile access problem, 100% CPU usage, etc, etc.
You'd have to try to narrow this problem down further, you could try to take chunks out of your code and see if that runs on both machines, then you might be able to see what changed to cause it to hang?