title: C# WinForms exception: A first chance exception of type 'System.AccessViolationException'
body: <p>I have a basic WinForms application. I'm making a call to an external API which is generating the following exception:</p>
  
  <p><code>Attempted to read or write protected memory. This is often an indication that other memory is corrupt.</code></p>
  
  <p><code>A first chance exception of type 'System.AccessViolationException' occurred in UavController.exe</code></p>
  
  <p>The call looks like this:</p>
  
  <p><code>outputBroker.SelectedObjectPaths.AddWithID(((AgAircraft)aircraft).Path, ((AgAircraft)aircraft).InstanceName);</code></p>
  
  <p>I can't find any indication of the problem.</p>