Recently I change the FeatureLayer.DefinitionExpression(set FeatureLayer.DefinitionExpression="*****" then FeatureLayer.DefinitionExpression="") it will catch a exception with message "write protected memory. This usually indicates that other memory has been damaged" showed.