Clue: we have a timer that runs and send JSON to the shell. This timer was set to a 1000ms interval. When we set the timer to a 500ms interval, the app hung in just over half the time. Is there some sort of buffer that may be overflowing?
What's strange is that in order to reproduce this hang, we have to send a particular command to the Shell that change the behavior of the shell app. Further, the command needs to be sent at a particular time. If we don't send the command, the hang does not occur. If we send it earlier or later, the hang does not occur. If we send it at the right time, the hang occurs after some number of additional commands are sent to the shell. The timer I mentioned above control the frequency at which those additional commands are sent. The faster those additional commands are sent, the faster the hang will occur. So it seems that a particular command puts the app in state where it's going to eventually hang, and then sending some number of additional commands triggers the hang. All commands are JSON strings sent via Shell.WriteLine().
@Thomas E Just create an empty Xcode project and attach to the running process. Now press the pause button and you can look where it hangs. It works well.
Can you elaborate on "... and attach to the running process"?
This sounds like a good trick to have in the bag, but I'm not entirely sure how to do what you suggest.