2008-12-07 45 views
0

我遇到了一个很奇怪的错误,我不明白。我创建了一个C#控制台应用程序,该应用程序仅用于测试我的Web服务是否可以从我的网络外部工作。它所做的只是尝试连接到web服务,将每个阶段输出到控制台并将其写入文本文件,以便他们可以将日志发送给我。NTVDM CPU遇到非法指令

它在3台XP机器(一个在我的网络内,2个在外面)完美工作。一台Vista机器(有一个清单文件),但在我的老板XP机器上(他是一个IT人员,所以知道他在做什么),它抛出了一个非常奇怪的错误。

C:\ TEMP \ testwe〜1.EXE 的NTVDM CPU遇到非法指令

http://www.houseofhawkins.com/roger.jpg“>

我做了一些谷歌搜索看起来他的NTVDM似乎有可能被篡改,或者有病毒或其他东西,这些都不是这种情况,我看不到会发生什么情况,导致这种失败。 using System; using System.Collections.Generic; using System.Text; using System.IO;

命名空间testwebservice { 类节目 { 的FileStream theFile = NULL; StreamWriter writer = null;

static void Main(string[] args) 
    { 
     Program p = new Program(); 
     p.testMe(); 
    } 

    private void testMe() 
    { 
     Console.WriteLine("Entered main method about to create stream");    
     try 
     { 
      theFile = File.Create(@"jonTestWebService.log"); 
      writer = new StreamWriter(theFile); 
      writer.AutoFlush = true; 

      try 
      { 
       message("Starting test at: " + DateTime.Now.ToLongTimeString()); 

       Random rand = new Random(); 

       message("creating new instance of webservice"); 
       houseofhawkins.testweb webServ = new testwebservice.houseofhawkins.testweb(); 

       message("calling hello world"); 
       String helloResult = webServ.HelloWorld(); 
       message("hello world result = " + helloResult); 

       int one = rand.Next(999); 
       int two = rand.Next(999); 
       message("calling maths method with " + one + " + " + two); 
       String mathResult = webServ.mytestMethod(one, two); 
       message("Math result is: " + mathResult); 



       message("Creating instance of CSJawbreaker"); 
       CSJawbreaker.InformationService csj = new testwebservice.CSJawbreaker.InformationService(); 

       message("trying to get the latest version number"); 
       float version = csj.latestVersionNumber(); 
       message("Version number: " + version.ToString()); 

       message(""); 
       message("Finished all processing at: " + DateTime.Now.ToLongTimeString()); 
      } 
      catch (Exception ex) 
      { 
       writer.WriteLine(""); 
       writer.WriteLine(ex.Message); 
       writer.WriteLine(""); 
      } 
     } 
     catch (Exception ex) 
     { 
      Console.WriteLine("could not create stream Writer, " + ex.Message); 
     } 

     message(""); 
     message("Press return to exit"); 
     Console.ReadLine(); 

     writer.Close(); 
     theFile.Close(); 
    } 

    private void message(String message) 
    { 
     if (theFile != null && writer != null) 
     { 
      Console.WriteLine(message); 
      writer.WriteLine(message); 
     } 
    } 
} 

}

我很卡为什么上面的代码可以/会做到这一点。这只是我想知道的一部分,这可能发生在一个真正的客户端机器上,或者只是我的老板机器感染了什么。

谢谢

+0

看起来像EXE文件已损坏。 – Chris 2008-12-08 04:58:42

回答

1

东西是非常错误的,如果你在NTVDM结束了,因为这是XP的16位DOS仿真层。如果在重新复制EXE后再次发生这种情况,我会调查安装在老板PC上的软件(.NET框架版本等)。

我也试着在WinDbg中运行这个命令,看看你最终得到了什么,当它出现故障时得到一个调用栈等,我打赌你会在堆栈中找到一个奇怪的模块(间谍软件等)。

+0

我认为他已经尝试了一个具有相同效果的EXE副本(不同的版本,更多的日志记录被添加到试图获得答案)。我会给调试位一个去。谢谢 – Jon 2008-12-08 10:30:40