System.ExecutionEngineException失败 [英] System.ExecutionEngineException Failure

查看:148
本文介绍了System.ExecutionEngineException失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找出更多的关于这个问题,我没有多少运气。我继续阅读,应用程序不应该出现这个错误,虽然这是非常好的,但是,它并没有告诉我什么可以导致这个错误出现。



我知道这个问题是非常广泛的,因为我确定这个错误可能有多个原因,所以我会尽量缩小一点。



我是在VS2003中开发使用C ++ .NET的应用程序



该应用程序主要使用非托管代码和少量托管代码(由于垃圾收集器的严重干扰)。所以我会评价95%的非管理,5%的管理



我读过某个不稳定/错误/不正确的非托管代码可能会混乱部分CLR内存渲染它损坏并抛出此错误。



由于95%的应用程序是不管理的,我不知道从哪里开始查找。
可能是被管理和非托管之间交互的几个类?
将数据从管理编组到非托管?
可以使一个坏的空指针导致此失败?
还有什么其他问题可以导致这个?数组索引超出范围?一个空对象呢?



任何可以给System.ExecutionEngine失败的可能原因列表的信息/论文/文章将不胜感激!






根据答案,这种异常可能在多种情况下引起,提及htem在答案中更好地了解。



可能的原因/方案列表 -





可能的解决方法/解决方案 -




解决方案

这不应该太重视,但我设法得到这个例外,同时有一些有趣的反思:

 code> typeof(IntPtr).GetField(Zero)。SetValue(null,new IntPtr(666)); 


I've been trying to find out more about this problem and I'm not having much luck. I keep reading that applications should not have this error come up and although that's all fine and dandy, it doesn't tell me what can cause this error to show up.

I know this question is very broad as I'm sure there can be multiple causes for this error so I'll try to narrow it down a bit.

I'm working in VS2003 developing an application that uses C++.NET

The application uses mostly unmanaged code and little managed code (due to heavy interference by the garbage collector). So I'd rate it 95% unmanaged, 5% managed

I've read somewhere that unstable/buggy/incorrect unmanaged code can mess up parts of the CLR memory rendering it corrupt and throwing this error.

Since 95% of the application is unmanaged, I'm not sure where to start looking. Maybe the few classes that interact between managed and unmanaged? What about marshalling data from managed to unmanaged? Can a bad null pointer cause this failure? What other problems can cause this? Array Index out of bounds? What about a Null Object?

Any information/paper/article that can give a nice list of possible causes for the System.ExecutionEngine failure would be appreciated!


Based on answers this exception can be caused in multiple scenarios, mentioning htem in answer for better visibility.

List of possible causes/scenarios -

Possible workarounds/solutions -

解决方案

This should not be taken too seriously, but I managed to get this exception while having some fun with reflection:

typeof(IntPtr).GetField("Zero").SetValue(null, new IntPtr(666));

这篇关于System.ExecutionEngineException失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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