My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 9: Unhanded Exception
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  maciakl
Closed:  Jul 2007
Type-Defect
Priority-High
Component-Logic
Usability


Sign in to add a comment
 
Reported by maciakl, Jun 29, 2007
Finally downloaded Perfmon glad you're having fun with it and got some help :)

But i get the error message below. pressing continue just repeats the
message. The program tho is  on the screen and working the whole time till
i hit quit. thought ya might wanna know about it.

starhawk


My system:

Dell Computer Corporation Dimension 8200
1.80 gigahertz Intel Pentium 4
512 Megabytes Installed Memory


Windows 2000 Professional Service Pack 4 (build 2195)


Microsoft® .NET Framework Version 2.0.50727.42 *


message:

An unhandled exception has occurred in your application. If you click
continue, the application will ignore this error and attempt to continue.
If you click Quit, the application will be shut down immediately,

category does not exist.



See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidOperationException: Category does not exist.
   at System.Diagnostics.PerformanceCounterLib.CounterExists(String
machine, String category,

String counter)
   at System.Diagnostics.PerformanceCounter.Initialize()
   at System.Diagnostics.PerformanceCounter.NextSample()
   at System.Diagnostics.PerformanceCounter.NextValue()
   at PerformanceMonitor.getDisk()
   at PerfMonG.PerfMonG.TimeTrigger(Object sender, EventArgs args)
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.Callback(IntPtr hWnd, Int32 msg, IntPtr
idEvent, IntPtr dwTime)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
PerfMonG
    Assembly Version: 1.0.2730.2215
    Win32 Version: 1.0.2730.2215
    CodeBase: file:///C:/Program%20Files/PerfMonG/PerfMonG.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase:

file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.fo

rms.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase:
file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.2032
    CodeBase:

file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true"
/>
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.




Comment 1 by maciakl, Jun 29, 2007
Accepted. Need to set up test environment with Windows 2000 box and .NET .NET
Framework Version 2.0.50727.42

Must look closely at:

PerformanceMonitor.getDisk()
PerfMonG.PerfMonG.TimeTrigger(Object sender, EventArgs args)

Comment 2 by maciakl, Jun 29, 2007
I found the issue:

1. Go to Control Panel
2. Administrative Tools
3. Performance
4. Click on the + icon to add a new counter
5. Look through the items listed in the "Performance Object" box

You will note that:

1. Windows 2000 does not have an object labeled LogicalDisk
2. Windows XP has it

PerfMonG obtains the total amount of free disk space from the LogicalDisk object - or
Category. Since it doesn't exist on Windows 2000 it doesn't seem to be possible to
obtain the Total free disk space.

Suggested courses of action is to disable this feature in Windows 2000.

Easiest fix:

1. catch the exception in the getDisk() method in PerformanceMonitor.
2. set the value of the counter to some flag value (like -1)
3. detect the flag value in the GUI and set the display counter to N/A

This will be fixed in 0.2.6 but I will try to release a patch for the interested
parties today or tomorrow when I get a chance to fix the code and recompile.
Status: Started
Comment 3 by maciakl, Jun 29, 2007
Here is a patch for Windows 2000. This is an immediate release, untested, use at your
own risk, yadda, yadda, etc...

*PerfMonG 0.2.6-rc*

How to use this thing:

1. download the PerfMonG.exe file
2. drop it into Program Files\PerfMonG
3. overwriting the file that is already there
4. run PerfMonG and enjoy
PerfMonG.exe
60.0 KB   Download
Comment 4 by maciakl, Jul 11, 2007
Fix included in 0.2.6
Comment 5 by maciakl, Jul 11, 2007
(No comment was entered for this change.)
Status: Fixed
Sign in to add a comment

Hosted by Google Code