Visual Basic 编译器无法从以下错误中恢复:系统错误 &Hc0000005& (Visual Basic 内部编译器错误)
这个错误首先看起来是随机发生的。
重新创建的步骤:
- 打开 Visual Studio 并加载解决方案(某些文件自动打开) - 这是问题发生的时候
- 关闭所有打开的文件
- 重新启动 Visual Studio 并加载解决方案(没有问题)
- 再次打开完全相同的文件,重新启动 Visual Studio 并加载解决方案使文件自动打开(出现问题!)
因此问题似乎可以重现。
但是,当尝试将其缩小到单个文件(加载解决方案时自动打开)时,我无法重现该问题。现在再次打开所有文件,问题就不会发生了!所以看起来它已经修复了 - 尽管以前发生过这种情况,但最终问题又回来了。
我认为这与带有 DevExpress 控件的用户控件之一有关 - 当错误发生时,设计器会显示错误。尽管我目前无法复制它来确认这一点。
这种情况暂时停止发生,所以我无法重现它。
This error first appear to occur randomly.
Steps to recreate:
- Open Visual Studio and load a solution (some files automatically opened) - this is when the problem occurs
- Close all open files
- Restart visual studio and load solution (no issues)
- Open Exactly the same files again, restart visual studio and load solution so files open automatically (problem occurs!)
So the problem appears reproducible.
However, when trying to narrow it down to a single file (that is automatically opened when the solution is loaded), I couldn't reproduce the problem. Now with all the files open again the problem doesn't occur!!! So it looks like it is fixed - though this happened before and eventually the issue came back.
I think it is to do with one of the user controls with DevExpress controls on it - when the error occurs, the designer displays the error. Though I can't reproduce it at the moment to confirm that.
This has stopped happening for the time being, so I can't reproduce it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试捕获异常并在此处发布调用堆栈。要获取调用堆栈,请尝试使用 您需要什么信息中描述的方法需要解决您的产品在设计时出现的问题吗?。另外,请确保项目引用的 DevExpress 程序集的 CopyLocal 属性设置为 false。此外,应用程序的 bin 文件夹不应包含我们的程序集。也许,这将帮助您解决这个问题。
Try to catch the exception and post the callstack here. To grab the callstack, try to use the approach described in the What information do you need to fix a problem, which occurs with your products at design time?. Also, please make certain that the CopyLocal attribute for DevExpress assemblies referenced by your project is set to false. Also, the bin folder of your application should not contain our assemblies. Perhaps, this will help you to address this issue.
当您尝试将空指针传递给本机方法并且该方法尝试从该空指针读取数据时,就会发生这种类型的错误,从而引发此错误。在您的代码中查找您可能正在使用的某些 P/Invoke 或第 3 方 DLL(可能正在使用 P/Invoke)。
一旦找到可能的方法,只需检查参数以确保没有参数为空(或者在 VB.NET 中,没有任何参数)
This type of error occurs when you try to pass a null pointer to a native method and that method tries to read from that null pointer, which throws up this error. Look in your code for some P/Invoke or a 3rd party DLL you may be using which is possibly using P/Invoke.
Once you find the possible method, just put a check in the parameters to make sure no parameter is null (or in VB.NET, Nothing)