It sounds like the ASL service (which is where print statements go in normal mode) is failling sporadically, probably when there is a lot of output to stdout.
The simple solution is probably just not to print lots of stuff when not in debug mode. Or alternatively use a wrapper for the print function that ignores failures silently.
|