c#Timer - 此系统上的.NET性能计数器已损坏 [英] c# Timer -- .NET performance counters on this system are corrupt

查看:111
本文介绍了c#Timer - 此系统上的.NET性能计数器已损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Timer类创建了一个程序,我用

Timer.Start()启动计时器,但是不能用Timer.Stop()来阻止它,我假设这个

还可以,但是,Process Explorer通知我,运行它大约10或

20次:


--- ------------------------

Process Explorer

-------- -------------------

此系统上的.NET性能计数器已损坏。

从中运行Exctrlst用于修复它们的Microsoft Windows资源工具包。

---------------------------

好的

---------------------------


是这是因为Timer无法自我清理? (我不知道是什么

Exctrlst是。)


Zytan

I made a program using the Timer class, and I start the timer with
Timer.Start(), but don''t stop it with Timer.Stop(), and I assumed this
was ok, but, Process Explorer informs me, after running it about 10 or
20 times:

---------------------------
Process Explorer
---------------------------
The .NET performance counters on this system are corrupt.
Run Exctrlst from the Microsoft Windows Resource Kit to repair them.
---------------------------
OK
---------------------------

Is this because Timer can''t clean itself up? (And I have no idea what
Exctrlst is.)

Zytan

推荐答案

2008年6月27日星期五15:00:35 -0700,Zytan< zy ********** @ gmail.comwrote:
On Fri, 27 Jun 2008 15:00:35 -0700, Zytan <zy**********@gmail.comwrote:

我使用Timer类创建了一个程序,我用

Timer.Start()启动计时器,但是不能用Timer.Stop()来阻止它,我假设这个

还可以,但是,Process Explorer在运行它大约10或

20次后通知我:


---- -----------------------

Process Explorer

--------- ------------------

此系统上的.NET性能计数器已损坏。

从Microsoft运行Exctrlst Windows资源工具包来修复它们。
I made a program using the Timer class, and I start the timer with
Timer.Start(), but don''t stop it with Timer.Stop(), and I assumed this
was ok, but, Process Explorer informs me, after running it about 10 or
20 times:

---------------------------
Process Explorer
---------------------------
The .NET performance counters on this system are corrupt.
Run Exctrlst from the Microsoft Windows Resource Kit to repair them.



问题自行解决了吗?例如,如果你重启?或者它是b $ b持续吗?


如果它是持久的,你可能想要阅读这些链接:

< a rel =nofollowhref =http://blogs.msdn.com/mikedodd/archive/2004/10/17/243799.aspx\"target =_ blank> http://blogs.msdn.com/mikedodd /archi...17/243799.aspx

(注意日期...你会想要在你的.NET安装中查看

最新的.ini文件,以博客条目为指导)

http://channel9.msdn.com/forums/Tech...are-corrupted/

http://support.microsoft.com/kb/300956


也许那里的东西会有所帮助。


无论哪种方式,如果你把你的性能指示器固定好,你可以

随意重现问题?你对使用哪个Timer类

很模糊,但我真的不明白为什么没有停止

的实例任何Timer类都会破坏你的表现计数器。那个

对我来说听起来像个错误(在.NET中)。


Pete

Does the problem resolve itself? For example, if you reboot? Or is it
persistent?

If it''s persistent, you may want to read through these links:

http://blogs.msdn.com/mikedodd/archi...17/243799.aspx
(Note the date...you''ll want to look in your .NET installation for the
most up-to-date .ini file, using the blog entry as a guide)

http://channel9.msdn.com/forums/Tech...are-corrupted/

http://support.microsoft.com/kb/300956

Maybe something in there will help.

Either way, if and when you get your perf counters fixed, can you
reproduce the problem at will? You are vague about which Timer class
you''re using, but I don''t really see why failing to stop an instance of
any of the Timer classes would corrupt your performance counters. That
sounds like a bug to me (in .NET).

Pete


谢谢对于答复,Pete。

Thanks for the reply, Pete.


问题是否自行解决?例如,如果你重启?或者它是b $ b持续存在吗?
Does the problem resolve itself? For example, if you reboot? Or is it
persistent?



错误只出现一次,我重新启动了,我没有看到它

。虽然,我从那以后没有做太多的开发,所以这个

并不意味着什么。


我应该注意我已经使用过系统了.Windows.Forms.Timer之前,

多次,以这种方式(让表格破坏它没有

告诉它明确停止),我从未见过这个错误

之前。


然而,看起来很奇怪它出现在我大约20或

30测试运行之后一个非常非常简单的应用程序,除了制作System.Windows.Forms.Timer之外什么都不做,而且用它来更新一个

富文本框。请注意,它并没有马上出现,而是仅在运行程序开发和测试的30分钟或60分钟后才开始。

The error only appeared once, and I rebooted, and I have not seen it
since. Although, I have not done much development since, so this
doesn''t mean much.

I should NOTE that I''ve used the System.Windows.Forms.Timer before,
many times, in this exact manner (letting the form destruct it without
telling it to stop explicitly), and I have never seen this error
before.

However, it seemed strange that it appears right after I about 20 or
30 test runs of a really, really simple application that does nothing
more than making a System.Windows.Forms.Timer, and uses it to update a
rich text box. Note that it didn''t appear right away, but only after
30 or 60 minutes of development and test running the program.


如果它是持久的,你可能想要阅读这些链接:

http://blogs.msdn.com/mikedodd/archi...17/243799.aspx

(注意日期......你会想要在你的.NET安装中查看

最新的.ini文件,使用博客条目作为指南) />
http:// channel9.msdn.com/forums/Tech...ounters-are-co ...

http://support.microsoft.com/kb/300956



感谢您使用这些链接。如果问题

继续,我将更新此帖子,并提供更多信息。到目前为止,我特意在表单关闭之前停止

计时器,看看这是否会解决

的情况。

Thanks for these links. I will update this thread if the problem
continues, with further information. As of yet, I specifically stop
the timer before the form closes, to see if this will resolve the
situation.


无论哪种方式,如果你的perf计数器都固定好了,你能否b / b
随意重现问题?
Either way, if and when you get your perf counters fixed, can you
reproduce the problem at will?



不,我不能。我会搞砸这个,看看我是否可以这样做,让你知道



No, I cannot. I will mess with this and see if I can do this, and let
you know.


你是模糊的哪个Timer类

你正在使用,
You are vague about which Timer class
you''re using,



System.Windows.Forms.Timer

System.Windows.Forms.Timer


但我真的不明白为什么没有停止

的实例任何Timer类都会破坏你的性能计数器。那个

对我来说听起来像个错误(在.NET中)。
but I don''t really see why failing to stop an instance of
any of the Timer classes would corrupt your performance counters. That
sounds like a bug to me (in .NET).



我同意。


Zytan

I agree.

Zytan


无论哪种方式,如果你的perf计数器得到修复,你可以
Either way, if and when you get your perf counters fixed, can you

随意重现问题?
reproduce the problem at will?



不,我不能。我会搞砸这个,看看我能不能这样做,让你知道。


No, I cannot. I will mess with this and see if I can do this, and let
you know.



我无法重现这个问题。可能需要一些时间才能过程

资源管理器发现它,我不确定。我会回复任何

的调查结果。


Zytan

I cannot repro the issue. Perhaps it takes some time before Process
Explorer discovers it, I am not sure. I''ll post back with any
findings.

Zytan


这篇关于c#Timer - 此系统上的.NET性能计数器已损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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