it turns out that some bug in MWM or WCL produces
spontaneous (unsolicited) calls to callback function
installed in many of our C agents with the call
XmpAddMwmCloseCallback( appShell, DeleteWindowCB, NULL );
Since the default DeleteWindowCB() callback generated by
the agent development tools calls app_done(), it may be that
app_done() is being called at random times during the execution
of your program, which can produce disasterous results in
certain cases (for example, the speech agent shuts down the speech
server).
THE FIX:
Please remove the call to XmpAddMwmCloseCallback in any of
your C-XWindows agents that use it, and delete the function
DeleteWindowCB(), which is really not necessary.
Thanks Harry!
-- Adam.