Well it sounds like the program is waiting for terminal input just like the error says. If you run this thing from the command line will it finish (complete execution) without you having to enter a say "\n" or answer a question?
Perhaps this thing want to write to STDOUT. You can redirect that to the "bit bucket" your_program 2&1>null.