LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1172 when click on Processes tab in SimpleTaskMonitor.vi

Hi,

I'm trying to run the SimpleTaskMonitor .net example that comes with LabVIEW 7.0. When I click on the Processes tab while the vi is running I get the following error:

Error 1172 occurred at Exception has been thrown by the target of an invocation.>> Cannot read Instance :CSDispatcher. in SimpleTaskMonitor.vi Possible Reason(s): A .NET exception occurred.

How do I fix this problem?

I have Microsoft .NET Framework 1.1, Microsoft .NET Framework Hotfix (KB886903) and Microsoft .NET Framework SDK (English) 1.1 installed and am using LabVIEW 7.0.

I had been getting a message when I opened the vi that the System, Version 1.0.3300.0 assembly had not been referenced, but I found a link on NI's website that said to double-click the PerformanceCounter constructor nodes in the vi and select the appropriate constructors from System, Version 1.0.5000.0. I did that, which made the message when I open the vi go away, but I still get the above error when I go to the Processes tab while the vi is running.

Thank you for your assistance!!

JesseB
0 Kudos
Message 1 of 5
(2,893 Views)
Could you check your process list in the task manager and see if you have a process called CSDispatcher? My guess is that we are getting a security error or something when trying to get the process information from that. I searched the web and all I can find is a reference to a Delphi tool called CodeSite.

Past that, I am afraid I only have the "It works here". But we can try to isolate it more on your machine...
0 Kudos
Message 2 of 5
(2,886 Views)
Yes, I did have a process running called CSDispatcher! Once I stopped that process and a couple of other, related processes the SimpleTaskMonitor.vi works fine. Thanks!

Any idea why the vi wasn't able to "read" those processes though? If I use the GetProcesses.vi in a different vi is there a danger that the user is going to have some process running that causes this error? Is there a way to avoid this?

Thanks!

JesseB
0 Kudos
Message 3 of 5
(2,881 Views)
I am not sure, but I would guess it is something inside of .NET (either the Win32 or WMI underpinnings) and security. If you want, I can write a little test program to try to isolate down the problem. Just shoot me a mail if you do so I know where to send it.

Brian
0 Kudos
Message 4 of 5
(2,878 Views)
For those that might be interested, we've been able to isolate it down to a Win32 issue and CSDispatcher. Using a straight C# application, we get

Received an exception: System.InvalidOperationException: Cannot read Instance : CSDispatcher.
at System.Diagnostics.CounterDefinitionSample.GetInstanceValue(String instanceName)
at System.Diagnostics.PerformanceCounter.NextSample()
at System.Diagnostics.PerformanceCounter.NextValue()

when trying to read the "Private Bytes" value. I am not sure if it is a bug with the Win32 Perfmon provider or something that CSDispatcher has done to disable that counter.
0 Kudos
Message 5 of 5
(2,865 Views)