C#的WinForms例外:第一次机会异常的类型'System.AccessViolationException“的 [英] C# WinForms exception: A first chance exception of type 'System.AccessViolationException'

查看:1280
本文介绍了C#的WinForms例外:第一次机会异常的类型'System.AccessViolationException“的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个基本的WinForms应用程序。我正在做一个调用外部API在产生以下异常:

I have a basic WinForms application. I'm making a call to an external API which is generating the following exception:

试图读取或写入受保护的内存。这通常表明其他内存已损坏。

A第一次机会异常的类型'System.AccessViolationException发生在UavController.exe

调用看起来是这样的:

outputBroker.SelectedObjectPaths.AddWithID(((AgAircraft)飞机)。路径,((AgAircraft)飞机).InstanceName);

我找不到任何迹象的问题。

I can't find any indication of the problem.

推荐答案

这个问题是由您的API生成。无论你是在传递错误的数据的API,可以通过您的电话或API有其自身的问题。下面是可能会帮助你,如果你有机会到你的API的code微软链接:

The issue is one generated by your API. Either you are passing in bad data to the API through your call or your API has an issue on its own. Here is a Microsoft link that might help you if you have access to the code of your API:

http://msdn.microsoft.com /en-us/library/ms164911(v=vs.80).aspx

另外,我想你可能需要使用您的API提供商合作,以弄清的问题是,如何解决它。

Otherwise, I think you might need to work with your API provider to figure out what the issue is and how to resolve it.

这篇关于C#的WinForms例外:第一次机会异常的类型'System.AccessViolationException“的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆