Under some conditions simulations would pass but would show the following error in the log near the end:
[ERROR] 1234.567[0.000] || The simulation monitor has stopped unexpectedly!
This appears to be caused by the simulation monitor (this process) aborting in an un-controlled manner once the simulation has completed and been told to stop.
While the exact sequence of events to cause this is not understood, this patch will inhibit the error message being written if it occurs after the simulation has completed successfully and been told to stop.
Note that there are effectively two parallel implementations of this fix since OrigenSim currently works around the fact that the byebug debugger does not keep parallel threads running asynchronously at a breakpoint, and a forked process is used instead.
Communicating with such a forked process is tricky and achieved here by writing a temporary file to let it know that the simulation has finished and it should not display this meaningless error.
Under some conditions simulations would pass but would show the following error in the log near the end:
This appears to be caused by the simulation monitor (this process) aborting in an un-controlled manner once the simulation has completed and been told to stop.
While the exact sequence of events to cause this is not understood, this patch will inhibit the error message being written if it occurs after the simulation has completed successfully and been told to stop.
Note that there are effectively two parallel implementations of this fix since OrigenSim currently works around the fact that the byebug debugger does not keep parallel threads running asynchronously at a breakpoint, and a forked process is used instead. Communicating with such a forked process is tricky and achieved here by writing a temporary file to let it know that the simulation has finished and it should not display this meaningless error.