#1 2019-01-29 17:31

FlyQLox1ng
Member
From: Sweden
Registered: 2019-01-29
Posts: 5

System crash, access violation and performance counters

start shutter -> message box -> cant add event (access violation) & Invalid Registry Data type

* Shutter Lite 4.3
* Windows 7
* x64
* 6.1.7601 Service Pack 1 Build 7601
* hardware the same, nothing changed
        --> See pictures below  <--


Short:
After PC Crash -> Startup shutter -> message box ->

* Invalid Registry Data type:  "disable performance counters"
* cant add event (access violation


Long:
Has used shutter for several month with very excellent results to turn off the monitors on time.

Today, windows 7 froze and crashed when I did a couple of other things related to hard drive check a faulty wd-disc. (wd-Data Lifeguard Diagnostics windows)

Shutter was OFF and Not involved in the crash^

Now that I restarted the computer everything works except Shutter..
which shows error message on startup and error reporting box (access violation) when I am adding an event. See pictures below.

* uninstalled v 4.2
* Reboot
* Installed v 4.3
* Reboot
* uninstalled v 4.3
* Reboot
* tried portable version 4.3

Registry key "disable performance counters" manually changed from 0 to 1

no difference, same message error when starting shutter,  help;)


Someone who can guide me in the right direction?:)
---

1
.
2
.
3

Offline

#2 2019-01-30 02:06

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: System crash, access violation and performance counters

Thank you for a detailed report!

First, please try the latest development version, i.e. Shutter 4.3.0.2 Beta.

The checking of the performance counters has been moved out of the application initialization stage and into the event frame show stage. This should avoid the crash of the application when the performance counters are broken. Try navigating to the Hard Disk Usage event configuration, this is where that check is performed now.

It appears that your performance counters got broken/corrupted, probably as a result of your recent system crash.

See these topics for information on how to fix your performance counters:

1. "Planner failed to start: Invalid Query" when monitoring HD Usage
2. "Planner failed to start: Invalid Query" when monitoring HD Usage (#2)

Note that performance counters are currently used only by the Hard Disk Usage event. So if you don't need this event, you can just continue using Shutter without fixing the performance counters.

Last edited by den4b (2019-01-30 02:08)

Offline

#3 2019-01-30 03:48

FlyQLox1ng
Member
From: Sweden
Registered: 2019-01-29
Posts: 5

Re: System crash, access violation and performance counters

Great and thanks for this new beta build v. 4302
Seems like this new release are working just fine.. exept for..

* Hardisk Usage
  This event still give me; Invalid Registry Data type:  "disable performance counters"

  Its fine, im not using that Event:)


Quote:
* It appears that your performance counters got broken/corrupted, probably as a result of your recent system crash"
* Try navigating to the Hard Disk Usage event configuration, this is where that check is performed now"


Question:
if I dont fix/rebuild my performance counters..
Does this make my FDE Encrypted Hard Drives (SSD/SAS) and Raidcard LSi-9361-8i or Windows-7 itself unstable?


I will look into those other 2 planner topics url when i have some spare time over:)

Thanks a lot;)


4

Offline

#4 2019-01-31 19:23

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: System crash, access violation and performance counters

FlyQLox1ng wrote:

if I dont fix/rebuild my performance counters..
Does this make my FDE Encrypted Hard Drives (SSD/SAS) and Raidcard LSi-9361-8i or Windows-7 itself unstable?

It is hard to say what the effects might be. Anything can happen when a file system corruption occurs, but, you may also never experience any other issues. You should check the file system for integrity, and get Windows to check its system files too.

As for the performance counters, you should at least run the "wmiadap.exe /f" command in an attempt to refresh performance counters data.

Offline

#5 2019-02-03 16:57

FlyQLox1ng
Member
From: Sweden
Registered: 2019-01-29
Posts: 5

Re: System crash, access violation and performance counters

den4b wrote:

You should check the file system for integrity, and get Windows to check its system files too.
As for the performance counters, you should at least run the "wmiadap.exe /f" command in an attempt to refresh performance counters data.

Problem solved: (see picture below)
I Renamed the registry key "Disable Performance Counters"

* Value 1 = disable
* Value 0 = enabled    <- works No
* del-key = enabled    <- works Yes
* ren-key = enabled    <- works Yes


* How I Reproduce the Error in my Win7 / Raid-10 Environment .
  Add key "Disable Performance Counters" with value "0" to registry PerfDisk\PerfOS
 
  Shutter v4.302
  Invalid Registry Data type:  "disable performance counters" (only with: Hard Disk Usage event)
 
  Shutter v4.30 & below
  Invalid Registry Data type:  "disable performance counters"  +  cant add event (access violation)
 
   Quick Fix ;)
* Rename the key to ".disable performance counters_offline" with value "0"
  Shutter v4.302 and below works excellent with Hard Disk Usage event


@ den4b
Hey, Does shutter contain a bug?
because, the value "0" and key "disable performance counters"
doesent seems to work along with shutter -> Hard Disk Usage event? altleast not for my unique win7 computer:)
-
key-offline
.
.
key inside



The long story:

I reviewed the Event Viewer very carefully and found absolutely nothing of value for the Shutter to scream out loud.

I have tried to Reproduce the error in several other programs that use hard disk information in addition to shutter.
Without result. Performance Counters seems to work as they should in all other programs, except when I activate HDD event in shutter v.4302 & below.

I executed these commands without positive results.
* wbemtest -> Show MOF = no error
* winmgmt / resyncperf
* wmiadap / f
* wmiadap / r
* diskperf –n
* discperf –y

lodctr /R:  Before I recreated\rebuild the Performance Counter with command "lodctr"
I mounted a old complete OS-mirror-image *.spi (shadow protect)

I fired up the remote virtual registry and searched for The key "Disable Performance Counters"
This was -Not- included in my OS-Backup registry folder PerfDisk & PerfOS

Well, almost too easy to be true:) 
lets give it a shot..

I Renamed 4 keys to "OFFLiNE" and .DOT as the .first .character  (see picture above^)

Now Shutter works perfectly  <--  Thumbs UP;)


Well, what was the cause of this?
me thinks; I did a hard drive check due to a faulty WD-Disc and the Program I used for this
probably added the KEY "Disable Performance Counters" Value "0" to Force performance counters to work.

The computer halted and freezed - after 30min I rebooted and continue to check the
faulty HDD with some other live cd unix & win proggs and come to a solution that the wd-disc was ready for recyclebin

After PC Crash I started Shutter ->
Invalid Registry Data type:  "disable performance counters"

Rest is history, Thanks:)


.

Last edited by FlyQLox1ng (2019-02-04 18:00)

Offline

#6 2019-02-03 16:59

FlyQLox1ng
Member
From: Sweden
Registered: 2019-01-29
Posts: 5

Re: System crash, access violation and performance counters

I found a couple of threads that might be of interest..
> All creeds to them <


The Repair List for WMI problems:
https://www.myfavoritegadgets.info/coun … enWMI.html


The WMI Diagnosis Utility V 2.2  (WMIDiag.exe) is a VBScript based-tool for testing, validating,
and analyzing WMI installation/issues.  "cscript WMIDiag.vbs" the *.log(s) will output alot of intresting stuff
https://blogs.technet.microsoft.com/ask … 2-is-here/
https://www.microsoft.com/en-us/downloa … px?id=7684
https://www.itprotoday.com/devops-and-s … ly-wmidiag


Enable/Disable Performance Counter via windows cmd DISKPERF
full syntax of this command, type diskperf /?
diskperf –n and reboot. This Disable the disk performance counters.   (1)
diskperf –y and reboot. This Enable the disk performance counters.    (0)
http://www.thenetworkencyclopedia.com/e … f-command/


The Extensible Counter List tool, or Exctrlst.exe.
This tool shows a list of all installed performance counters, sorted either by DLL name, service or Counter ID. With this,
you can easily see if a counter is enabled or disabled, and set them however you wish. This utility is part of the Windows 2000 resource kit,
http://www.xtremesystems.org/forums/sho … ctrlst-exe
https://blogs.technet.microsoft.com/ask … trlst-exe/


Rebuilding Windows Performance Counters
https://support.uptimesoftware.com/article.php?id=162


@ den4b
if you think any URL or Text is not related or can create more trouble than good, please edit & clean up :)


have fun;)

Last edited by FlyQLox1ng (2019-02-14 01:53)

Offline

#7 2019-02-04 23:32

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: System crash, access violation and performance counters

There is a subtle inconsistency in your registry entries.

The data type of the "Disable Performance Counters" value is expected to be REG_DWORD (integer), but it your case it is REG_SZ (text) for the "PerfDisk" key. That is in accordance with the Microsoft's documentation on Disable Performance Counters. You can also see from your screenshots that the rest of "Disable Performance Counters" values are of type REG_DWORD, except for the "PerfDisk" key.

Shutter attempts to read the value as an integer, but the returned data type does not match the expected type, so it raises an exception.

If this value was created by a 3rd party application, then I guess it is at fault for inappropriate use of the registry. This raises a question - does "Disable Performance Counters" value with REG_SZ data type has any effect for the operating system, or perhaps it is ignored due to incorrect data type?

It is not clear how Shutter should handle such case. It currently raises an exception due to incorrect data type, but it could silently ignore the value instead.

Last edited by den4b (2019-02-04 23:34)

Offline

#8 2019-02-05 21:55

FlyQLox1ng
Member
From: Sweden
Registered: 2019-01-29
Posts: 5

Re: System crash, access violation and performance counters

den4b wrote:

The data type of the "Disable Performance Counters" value is expected to be REG_DWORD (integer), but it your case it is REG_SZ (text) for the "PerfDisk" key

If this value was created by a 3rd party application, then I guess it is at fault for inappropriate use of the registry.
Shutter attempts to read the value as an integer, but the returned data type does not match the expected type, so it raises an exception.

I missed this completely hmm and didn't check with microsoft either if the Registry Value Type
would be REG_DWORD (integer) or REG_SZ (text). I assumed that it would be REG_SZ in the "PerfDisk"

Its true, this Value REG_SZ was created by a 3:rd party application
as my backup-image doesent got any key at all exept for the SQL part that has Value "1" (integer)


Note:
For future readers, I want to clarify one thing regarding this problem and the OS I run (Windows 7 64x)
"Disable Performance Counters" value "0" REG_DWORD (enable) is correct Registry Value Type at "PerfDisk"


Now my problem is solved and shutter works well
Thanks a lot for pointing me in the right direction wink

Last edited by FlyQLox1ng (2019-02-06 13:24)

Offline

Board footer

Powered by FluxBB