I’ve finally figured out why Manila Envelope occasionally gets stuck in spinning progress bar hell. It has to do with how I handled user notification in the code.
Basically, there are three types of function involved: one gets user input, one executes a series of Manila function calls, and one wraps a SOAP call to a particular part of the Manila API. Unfortunately, I was reporting user errors via dialog boxes in all three functions in the chain.
This sequence diagram shows the problem–I was letting the Manila handler do the notification to the user. This caused timing problems in the window controller that kept it from successfully stopping the progress indicator and returning control to the user.