我已经寻找了一个星期以上,但我没有找到任何人遇到类似于我所看到的问题。
我正在处理一个在Windows XP上运行且使用Visual Studio 2003开发的旧应用程序。大约三周前,应用程序突然变得无响应,操作员必须按下Windows三指敬礼(CTRL-ALT-DEL)以启动任务管理器,终止应用程序进程(显示为未响应),并重新启动应用程序。
我设法在调试器中让它发生一次,并且当我暂停应用程序时,它正在等待系统从尝试设置System.Windows.Forms.Timer.Interval属性返回。
这是对象及其出现停顿的地方,这不是源代码中的写法
internal static System.Windows.Forms.Timer timerMtimeOut;
// This is in an initialization method.
timerMtimeOut = new System.Windows.Forms.Timer();
timerMtimeOut.Tick += new System.EventHandler(timerMtimeOut_Tick);
// this is how it's value is set.
timerMtimeOut.Interval = 1 * msec; // <-- This is where it was in the debugger
timerMtimeOut.Enabled = true;
private static void timerMtimeOut_Tick(object sender, System.EventArgs e)
{
mTimeOut +=timerMtimeOut.Interval/msec;
}
该应用程序基本上变得无响应,必须使用任务管理器将其关闭并重新启动。
它多年来一直运行良好,但在大约2-3周前开始出现这种情况。
有其他人看到过这种行为吗?