내 WPF C# 응용 프로그램에서 가끔 'System.ExecutionEngineException'유형의 예외가 발생했습니다. '라는 오류가 발생합니다. 오류가 OnPropertyChanged 이벤트의 중간에 발생하는 것 같습니다.WPF에서 'System.ExecutionEngineException'유형의 예외가 throw되었습니다.
예외 정보 : InnerException이 null입니다. 데이터는 {System.Collections.EmptyReadOnlyDictionaryInternal}
입니다 .Net 4.5.1을 사용하고 있습니다.
누구든지이 문제를 일으키는 아이디어가 있습니까?
protected void OnPropertyChanged(string propName)
{
VerifyProperty(propName);
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
try
{
handler(this, new PropertyChangedEventArgs(propName));
}
catch (Exception)
{
}
}
}
PropertyChangedEventArgs 호출 중에 예외가 발생하는 것 같습니다.
여기에는 속성 확인이 있습니다.
[Conditional("DEBUG")]
private void VerifyProperty(string property)
{
Type t = this.GetType();
System.Reflection.PropertyInfo info = t.GetProperty(property);
if (info == null)
throw new ArgumentException(string.Format("Property \"{0}\" does not exist in type {1}!", property, t.Name));
}
OnPropertyChanged 이벤트에서 코드를 게시하는 방법은 어떻습니까? 코드를 보지 않고는 아무 것도 말할 수 없습니다. 우린 독자가 아니에요. –
VerifyProperty 란 무엇입니까? null 또는 부정확 한 값을 처리 할 수 있습니까? – OmegaMan