Regarding ExecuteEngineException, there is this description in the .net framework SDK:
"Execution engine errors are fatal errors and should never occur. Such errors mainly occur when the execution engine is damaged or data is lost. The system will throw this exception at any time When possible, the system will throw an exception that provides more information than the ExecutionEngineException.
Applications should not throw ExecutionEngineException.
As can be seen from this description, the ExecutionEngineException should not be possible in a normal program. , fatal error. However, today I encountered this anomaly many times.
The specific situation is roughly like this: a COM control with viewer function, used in .net. This Viewer has a feature that when certain changes occur in the current visual area, two events will be triggered. In more specific cases, the time difference between the triggering of these two events may be very small, almost happening at the same time. At this time, the possibility that the outer .net program will cause an ExecutionEngineException becomes very high. Basically, it will be encountered at least once in every operation, and of course it can only be encountered once, because once it is encountered, it will almost crash.
It should still be a problem that occurs when .net interacts with COM. Although I don’t know the specific process, you can roughly guess: when the first event occurs, .net starts to process it, and before the processing is completed, the second event The incident happened again, and the anomaly was born.
It's easier to handle if you know the reason. Add an event suspension mechanism so that the triggering time interval of any two events will not be too small to avoid the recurrence of two events triggering almost at the same time. Sure enough, after one try, this abnormality no longer occurred. If you encounter a similar phenomenon, you might as well try this idea.
PS, the environment I am using here is .net framework 1.1. It is not yet known whether the same phenomenon occurs under .net framework 2.0.
http://www.cnblogs.com/sunwaywei/archive/2006/08/21/482674.html