功能评价禁用的,因为以前的功能评价超时 [英] Function evaluation disabled because a previous function evaluation timed out

查看:368
本文介绍了功能评价禁用的,因为以前的功能评价超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个C#应用程序中,我得到这个错误:

I have an C# application in which I am getting this error :

禁用的,因为以前的功能评价超时函数求你必须继续执行重新启用功能的评价。

"Function evaluation disabled because a previous function evaluation timed out. You must continue execution to reenable function evaluation."

我看到有关这个错误的计算器和MSDN上也有很多职位,但没有找到解决办法。大多数的人说,这个错误进来多线程应用程序,并可以通过删除所有断点来解决。
就我而言,我的应用程序是单线程的,我也删除了所有断点,但是当我调试应用程序还是我收到此错误。
当我运行应用程序。无需调试,我的应用程序只是挂起,我必须阻止它throught视觉工作室。
我试图找到它的地方越来越挂,我发现那里得到挂断行代码。以下是代码片段:

I saw many posts related to this error on stackoverflow and on msdn also but found no solution. Most of the people say that this error comes in multithreaded application and can be resolved by deleting all the breakpoints. In my case, my app is single threaded and I have deleted all the breakpoints also but still I am getting this error when I debug the app. When I run the app. without debugging, my application just hangs and I have to stop it throught visual studio. I tried to find the code where its getting hang and I found the line where it gets hang. Here is the code snippet :

MatchCollection matchesFound = Regex.Matches(content, 
                                             keywordPattern,
                                             RegexOptions.Multiline);
int matchCount = matchesFound.Count;

在执行来自于第二行,即当代码试图获得Count属性我的申请得到值挂。我的正则表达式是罚款,我在快报测试它,我相信,在执行matches()方法的应用是没有得到忌用。
。如果我是来该行通过调试,我得到上述错误。
有谁知道为什么这个错误出现,如何解决?

When execution comes at second line, i.e. when code tries to get the value of Count property my application gets hang. My regular expression is fine as I have tested it in Expresso and I am sure that application is not getting hanged while executing Matches() method. If I come to that line by debugging, I get the above mentioned error. Does anyone knows why this error comes and how to resolve it?

我使用Visual Studio 2005。

I am using Visual studio 2005.

推荐答案

挂起和此错误信息的原因是可能的相同:有一些东西需要花费大量的时间来计算。无论当你做它在代码和调试器。调试器不具有神奇的力量来计算的东西比你的应用程序速度更快。

The reasons of the hang and of this error message are probably the same: there is something that takes a lot of time to compute. Both when you do it in code and in debugger. Debugger has no magic power to calculate something faster than your app.

您可以尝试使用的Debug.WriteLine 来输出实际内容 keywordPattern 。我认为这很容易可能是两者都大到足以采取年龄进行。

You can try to use Debug.WriteLine to output actual content and keywordPattern. I think it easily might be that both are big enough to take ages to proceed.

这篇关于功能评价禁用的,因为以前的功能评价超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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