기본 WinForms 응용 프로그램이 있습니다.C# WinForms 예외 : 'System.AccessViolationException'유형의 첫 번째 예외 예외
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
A first chance exception of type 'System.AccessViolationException' occurred in UavController.exe
호출은 다음과 같습니다 :
outputBroker.SelectedObjectPaths.AddWithID(((AgAircraft)aircraft).Path, ((AgAircraft)aircraft).InstanceName);
난 못해 나는 다음과 같은 예외를 생성하는 외부 API를 호출을 만들고있어 문제의 징후를 발견하십시오.
버그가 외부 API와 상호 작용할 수 있습니다. API에 null 참조를 전달하지 않고 내가 제공 한 정보로 얻을 수있는 조언이 많지 않습니다. – Gabe
@Gabe - null 참조를 확인했습니다. 문제가 아닙니다. 나는 out-of-proc COM을 통해 써드 파티 애플리케이션과의 인터페이스와 관련이 있다고 생각하기 시작했다. – wulfgarpro
'AccessViolationException'은 순전히 관리되는 코드에서 발생할 수 없으므로 문제는 타사 앱과의 인터페이스에 있어야합니다. – Gabe