Crash on swapping running models
System dynamics program with additional features for economics
Brought to you by:
hpcoder,
profstevekeen
This one was a doozy! The initial cause of the issue was VariableValue objects referencing out of bounds in the flowVectors array. The problem was, these objects should not be existing at that point in time, as they were present after a call to clearAllMaps, which should have destroyed all of them.
After much debugging, it turned out that the act of reading in a minsky file in Minsky::load reset the local minsky pointer to null, which caused the minsky() singleton accessor to return a reference to the wrong global object for the susbsequent call to Minsky::reset().