奇怪的调试错误信息.......... 我使用多条线程测试Lucene的搜索.....但经常会弹出"System.ExecutionEngineException"的错误提示,且捕获不到错误的代码...如不用多线程或只一条线程则没事... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 出错的信息描述:未处理的“System.ExecutionEngineException”类型的异常出现在 未知模块 中。 for(int i=0;i<15;i++) { threads++; new Thread(new ThreadStart(TestAll)).Start(); //ThreadPool.QueueUserWorkItem(new WaitCallback(TestAll)); } public void TestAll() { for(int i=0;i<600;i++) { TestSearch("翁源",3); } } public void TestSearch(string target,int count) { string ss=""; for(int i=0;i<count;i++) { //int start=Environment.TickCount; //Console.WriteLine(i); ss=ic.RunSearch(target,0,"TOP",@"C:\whole-Index"); threadCount++; all++; int ticks=Environment.TickCount-st; double per=(double)(all/(ticks/1000.0)); Console.WriteLine("counts : "+threadCount.ToString()+"\t\tThreads : "+threads.ToString()+"\t\t"+i.ToString()+"\t\t"+per.ToString("F2")); } } 执行引擎错误是致命错误,决不应该发生。此类错误主要是在执行引擎被破坏或丢失数据时发生的。系统会随时引发此异常。在可能的情况下,系统将引发比 ExecutionEngineException 异常能提供更多信息的异常。应用程序不应引发 ExecutionEngineException。--MSDN的解释我猜想应该是你的RunSearch函数有问题你看看存不存在线程死锁的问题 关于FileDialog.DefaultExt vs2008 如何改变初始化窗口 contextMenuStrip 怎么禁用某一项? 替换word中字符,并将字符加上下划线。 求救:C#如何使文本框输入数字和小数点,且小数点只有一位呢 方法可以执行到半路上切断吗? 末考要考到的题,求解.......急 求助,关于文件夹操作,看看我的问题出在哪里? C# 继承窗体问题 javascript验证不用alert,当输入正确的时候怎么把错误提示隐藏了 散分,顺便问点问题 在存储过程中的循环问题,我头都要爆了,在线跪求解决方法
未处理的“System.ExecutionEngineException”类型的异常出现在 未知模块 中。
{
threads++;
new Thread(new ThreadStart(TestAll)).Start();
//ThreadPool.QueueUserWorkItem(new WaitCallback(TestAll));
} public void TestAll()
{
for(int i=0;i<600;i++)
{
TestSearch("翁源",3);
}
} public void TestSearch(string target,int count)
{
string ss=""; for(int i=0;i<count;i++)
{
//int start=Environment.TickCount; //Console.WriteLine(i);
ss=ic.RunSearch(target,0,"TOP",@"C:\whole-Index");
threadCount++;
all++;
int ticks=Environment.TickCount-st;
double per=(double)(all/(ticks/1000.0));
Console.WriteLine("counts : "+threadCount.ToString()+"\t\tThreads : "+threads.ToString()+"\t\t"+i.ToString()+"\t\t"+per.ToString("F2"));
}
}
你看看存不存在线程死锁的问题