It is currently March 28th, 2024, 11:25 pm

[Bug?] UsageMonitor plugin error

Report bugs with the Rainmeter application and suggest features.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: [Bug?] UsageMonitor plugin error

Post by pul53dr1v3r »

tjhrulz wrote: July 31st, 2020, 4:51 am Alright so I have been looking into this issue and had it running for about a week now using a prototype version of the plugin I was working on months ago to try to fix the over 100% bug before ultimately giving up on it due to realizing that the issue lies with Microsoft CPU performance counters actually not scaling the way Microsoft says they do in their own documentation and that Task Manager's detail pane lies to you but I never figured out how they lie to you as it is not exactly divided by thread count from my testing (I actually thing it stems from the SIMD commands that are baked into modern processors as I can almost guarantee the bug happens when using a program that takes advantage of them) but that is a story for another day.

However when working on this I also built the system to better handle collision with other threads and counters getting purged which is my bet what is happening here since I have yet to encounter an error thrown after using my skin built to thrash this for a week.

Given though that bugs like this that are infrequent are easier to confirm with friends testing as well I figure I will upload this to have you guys test as well. Do note that this being a plugin built into Rainmeter needs to go into your C:\Program Files\Rainmeter\Plugins folder and also if you notice a small performance hit over normal usage monitor ignore that as this version still has debugging symbols left in it since I did not want to have to kill my test to build it for release.


Edit: Forgot to upload the file, also due note that this is for the x86-64 version of Rainmeter since that is what 99.99% of you should be running anyways
Hello tjh. i've replaced the plugin with the one you provided and still haven't got the error, from yesterday. Will see later. With the old the error occured at least once in 3 days.
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: [Bug?] UsageMonitor plugin error

Post by pul53dr1v3r »

tjhrulz wrote: July 31st, 2020, 4:51 am
got two errors today testing it with a Modern Gadgets skin and ofc with your "new" UsageMonitor plugin.

ERRO (10:59:23.808) ModernGadgets\ProcessMeter\ProcessMeter.ini - [MeasureProcess6Cpu]: UsageMonitor crashed trying to return the new String value of this measure
DBUG (10:59:23.809) : Object reference not set to an instance of an object.
DBUG (10:59:23.813) : at UsageMonitor.Plugin.GetString(IntPtr data)


ERRO (12:14:07.355) ModernGadgets\ProcessMeter\ProcessMeter.ini - [MeasureProcess8Gpu]: UsageMonitor crashed trying to return the new String value of this measure
DBUG (12:14:07.356) : Object reference not set to an instance of an object.
DBUG (12:14:07.356) : at UsageMonitor.Plugin.GetString(IntPtr data)


Could Windows 10 version be the culprit for this as some users, like you, don't get the error at least during the test period?
i'm on version 1909 build 18363.628. - not updated for a while...
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Bug?] UsageMonitor plugin error

Post by Yincognito »

I'm on 1803 and didn't experience the issue (official UsageMonitor plugin, not the one posted earlier).
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
tjhrulz
Developer
Posts: 267
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: [Bug?] UsageMonitor plugin error

Post by tjhrulz »

pul53dr1v3r wrote: August 3rd, 2020, 3:15 pm got two errors today testing it with a Modern Gadgets skin and ofc with your "new" UsageMonitor plugin.

ERRO (10:59:23.808) ModernGadgets\ProcessMeter\ProcessMeter.ini - [MeasureProcess6Cpu]: UsageMonitor crashed trying to return the new String value of this measure
DBUG (10:59:23.809) : Object reference not set to an instance of an object.
DBUG (10:59:23.813) : at UsageMonitor.Plugin.GetString(IntPtr data)


ERRO (12:14:07.355) ModernGadgets\ProcessMeter\ProcessMeter.ini - [MeasureProcess8Gpu]: UsageMonitor crashed trying to return the new String value of this measure
DBUG (12:14:07.356) : Object reference not set to an instance of an object.
DBUG (12:14:07.356) : at UsageMonitor.Plugin.GetString(IntPtr data)


Could Windows 10 version be the culprit for this as some users, like you, don't get the error at least during the test period?
i'm on version 1909 build 18363.628. - not updated for a while...
I mean I wouldn't say it's impossible knowing the crazy bugs windows is managed to make but I doubt it has anything to do with your version of Windows. Likely this is being caused by either me releasing a lock too soon and something getting cleared out or some weird threading collision that I didn't catch. (Well I did catch it and prevent rainmeter from crashing but that doesn't really count)

I still have yet to have it come up after 5 days of testing on my two custom-made skins that are meant to thrash usage monitor. I'll try downloading that skin pack tonight and see if maybe that one I can get it to happen more often.
User avatar
raiguard
Posts: 660
Joined: June 25th, 2015, 7:02 pm
Location: The Sky, USA

Re: [Bug?] UsageMonitor plugin error

Post by raiguard »

While we're on the topic of MG, I had a user who tried loading Disks Meter and had Rainmeter immediately crash. Not only that, but he said that after that incident something went wrong in Windows and a lot of other programs started crashing. He had to completely reimage his PC to fix it.

My brother also had the crashing issue, but his system didn't get messed up. Disks Meter doesn't do anything particularly special, but it does have a lot of usage monitor measures. Might be worth looking into if you have time.
”We are pretty sure that r2922 resolves the regression in resolution caused by a reversion to a revision.” - jsmorley, 2017
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: [Bug?] UsageMonitor plugin error

Post by pul53dr1v3r »

tjhrulz wrote: August 3rd, 2020, 4:13 pm I mean I wouldn't say it's impossible knowing the crazy bugs windows is managed to make but I doubt it has anything to do with your version of Windows. Likely this is being caused by either me releasing a lock too soon and something getting cleared out or some weird threading collision that I didn't catch. (Well I did catch it and prevent rainmeter from crashing but that doesn't really count)

I still have yet to have it come up after 5 days of testing on my two custom-made skins that are meant to thrash usage monitor. I'll try downloading that skin pack tonight and see if maybe that one I can get it to happen more often.
in the meanwhile i got one more with my suite:

ERRO (18:04:32.246) RainformerHWi\TopProcesses\TopGPU\TopGPU.ini - [MeasureTop5GPU]: UsageMonitor crashed trying to return the new String value of this measure
DBUG (18:04:32.246) : Object reference not set to an instance of an object.
DBUG (18:04:32.247) : at UsageMonitor.Plugin.GetString(IntPtr data)


i planned to install a new fresh Win 10 v2004 but as here is a mess on my PC, i put it off for the time being. But i'm very curious does that have anything to do with the error, just to be sure.
Yes, it's very hard to imagine what the bugs MS can produce, on purpose or not but it's simply fascinating. Like they compete who will make a more impressive-destructive one.
User avatar
tjhrulz
Developer
Posts: 267
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: [Bug?] UsageMonitor plugin error

Post by tjhrulz »

raiguard wrote: August 3rd, 2020, 5:16 pm While we're on the topic of MG, I had a user who tried loading Disks Meter and had Rainmeter immediately crash. Not only that, but he said that after that incident something went wrong in Windows and a lot of other programs started crashing. He had to completely reimage his PC to fix it.

My brother also had the crashing issue, but his system didn't get messed up. Disks Meter doesn't do anything particularly special, but it does have a lot of usage monitor measures. Might be worth looking into if you have time.
Given that Rainmeter only has read only I doubt that Rainmeter had anything to do with the system instability, likely the system was already unstable and his performance counters were corrupted and just accessing it a lot like that pushed to overboard and probably caused windows to corrupt itself in weird way (doing a sfc /scannow or chkdsk may have fixed his issue but who knows)

However given I already redownloaded the lastest version of your skin to work alongside my thrashing skin to see if I can recreate the bug I will also do some testing with your disk skin. Do you know does it only happen on certain drive configs (I have 2 SSD and 3 HDDs so hopefully that will trigger it)? Also does it happen always right away or does it only happen after a while? As for your brother if he is still having an issue (although I think you already know about this/will have tried this) would you mind rebuilding his performance counters and see if that fixes it?

If you dont recall the commands:

Code: Select all

winmgmt /resyncperf
wmiadap /f

cd %systemroot%\system32
lodctr /R




EDIT: Also it just hit me as something my test skin did not try, do your guys skins use DyanamicVariables often in them or use bangs like !SetOption often? Any specifically on UsageMonitor measures?

Also could you guys that have seen this list your CPUs you have in your systems as well?

EDIT2: Just got it to recreate it and I think have figured out what it is. Testing a new version now to see if that fixes it
User avatar
Yincognito
Rainmeter Sage
Posts: 7029
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: [Bug?] UsageMonitor plugin error

Post by Yincognito »

tjhrulz wrote: August 4th, 2020, 3:19 am Given that Rainmeter only has read only I doubt that Rainmeter had anything to do with the system instability, likely the system was already unstable and his performance counters were corrupted and just accessing it a lot like that pushed to overboard and probably caused windows to corrupt itself in weird way (doing a sfc /scannow or chkdsk may have fixed his issue but who knows)

However given I already redownloaded the lastest version of your skin to work alongside my thrashing skin to see if I can recreate the bug I will also do some testing with your disk skin. Do you know does it only happen on certain drive configs (I have 2 SSD and 3 HDDs so hopefully that will trigger it)? Also does it happen always right away or does it only happen after a while? As for your brother if he is still having an issue (although I think you already know about this/will have tried this) would you mind rebuilding his performance counters and see if that fixes it?

If you dont recall the commands:

Code: Select all

winmgmt /resyncperf
wmiadap /f

cd %systemroot%\system32
lodctr /R




EDIT: Also it just hit me as something my test skin did not try, do your guys skins use DyanamicVariables often in them or use bangs like !SetOption often? Any specifically on UsageMonitor measures?

Also could you guys that have seen this list your CPUs you have in your systems as well?

EDIT2: Just got it to recreate it and I think have figured out what it is. Testing a new version now to see if that fixes it
I have only one ST1000LM048 HDD (not SSD), I use DynamicVariables=1 on all my UsageMonitor measures (or meters for that matter) as I do scrolling between different aliases so I can have unlimited options in a limited space. I don't use !SetOption bangs though, just !SetVariable bangs on the Alias option. These dynamic changes happen either automatically on a predefined (but subject to change, if desired) time interval like 1 second or so, or manually through scrolling. My CPU is a (probably outdated by now) Intel Core i3-2350M CPU (2.30GHz, FSB 1333 MHz, CACHE 3072 MB) laptop processor.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
pul53dr1v3r
Posts: 442
Joined: July 30th, 2014, 10:30 am

Re: [Bug?] UsageMonitor plugin error

Post by pul53dr1v3r »

@tjh
i'm using a CPU that's ~10 years old (i3 540) combined with one SSD.
Also, DynamicVariables and SetOption have been used a lot.

So, if i understood well, you finally got the error and figured out what's the couse of it... :great:
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: [Bug?] UsageMonitor plugin error

Post by balala »

pul53dr1v3r wrote: August 5th, 2020, 2:05 pm Also, DynamicVariables and SetOption have been used a lot.
Recommend not to set dynamic variables, only when needed. For instance on measures or meters using dyanmically set variables (variables set with !SetVariable bangs) or section variables. The measures or meters having options set with !SetOption bangs don't require to set dynamic variables.