This could be caused by modules not properly cleaning up between simulation runs, and starting the next session with invalid parameters.
Can you reproduce the problem without using any modules, and if not, can you identify the module(s) that cause the problem?
In particular legacy (2006) addons might be prone to this problem, because the default shutdown behaviour for the 2006 edition was "terminate and respawn", which would have masked many cleanup-related bugs. You should be able to work around the problem by switching the shutdown method (under Extras/Debug/Shutdown) from "De-allocate memory" to "terminate and respawn".
Can I remind addon developers that you should always test your addons under as many different simulation conditions as possible, to eliminate obvious bugs. This includes:
- Testing multiple consecutive simulation runs both with "de-allocate memory" and with "terminate and respawn" shutdown options
- MFD modules should be robust to vessels being deleted (e.g. while targetted in any way by the MFD)
- Likewise, vessel modules should tolerate instances being deleted and created during the simulation
- Vessel modules should allow a (nominally) unlimited number of instances being created, and there should be no unintentional crosstalk between them (e.g. due to shared variables).
- etc.
Obviously, this is only a small selection of potential problem spots. The more different situations you test your addon under, the more reliable it will be when released in the wild (a good idea if you don't want to be swamped with bug reports afterwards).