Is the program terminated when the output stops? I have noticed that sometimes a program will freeze when outputting a lot, especially when the output window has lost focus, but I think it starts again when the window regains focus. Could that be it? Maybe it works better if you redirect the output to a file.
you planned on testing it by inputting 50k numbers manually?