The cause is that a manager class has two sets, a collection is a collection of templates, and B is a collection of instances from the template.
But something in the B collection is always called in the A collection, causing an error.
The initial consideration of the improper use of clone, but after the examination did not find any problems, and later found that the problem is on the lambda
void Fsmconfig () {= c= = C.change (envobjstate.none, Envobjaction.none) ; = (Oldstate, arg) = { mstateowner.triggerstateimple (envobjstate.burning); };
This code, Mstateowner, is empty. Cause an error
Later found that you are not clone, the creation of a good lambda link to the object is old, when the clone is good, the address has changed, but the link in the lambda address has not changed.
Summarize:
1. When using clone, confirm that the code that walks the constructor calls the process, because clone does not call the constructor
2.lambda try not to nest, as far as possible as a parameter in the
A small problem and solution for Lambda