It is currently April 24th, 2024, 6:06 pm

New UsageMonitor plugin

Changes made during the Rainmeter 4.2 beta cycle.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2604
Joined: March 23rd, 2015, 5:26 pm

Re: New UsageMonitor plugin

Post by SilverAzide »

Hello,

One more feedback item... this one is the most severe one I've found. When using UsageMonitor with Alias=VRAM, Rainmeter will crash if DynamicVariables=1 is used on the measure. Additionally, if Name=[Measurename] is used (with or without DynamicVariables), RM will crash.

Code: Select all

[Rainmeter]
AccurateText=1
DynamicWindowSize=1
Update=1000

; get the top GPU process
[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=1
; work-around for Percent=1 not working
Percent=0
MinValue=0.0
MaxValue=100.0

; this measure will crash Rainmeter
[MeasureVRAM]
Measure=Plugin
Plugin=UsageMonitor
Alias=VRAM
Percent=0
Name=[MeasureGPU]
DynamicVariables=1

[MeterText]
Meter=String
SolidColor=0,0,0,255
FontColor=255,255,255,255
FontSize=20
Padding=8,8,8,8
X=0
Y=0
Text="Hello"
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New UsageMonitor plugin

Post by jsmorley »

Keep em coming! Thanks so much for beating this up and finding stuff.

The goal is obviously perfection the first time, but that's not how it is with code development. We really count on you guys, since we can't fix it if we don't know about it.
User avatar
tjhrulz
Developer
Posts: 268
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: New UsageMonitor plugin

Post by tjhrulz »

sephirotess wrote:It's already in debugging mode. Look at the picture here:

Journal.jpg

I will try the new version.

Edit.

I tried the new version but nothing. I have a big log file, but I do not know if that's what you want:
The log file like that is what I am looking, and it may have gave away why the log does not contain the info from that updated version.

It would seem that Rainmeter is installed at D:\Outils\Rainmeter\ so your plugin folder should be at D:\Outils\Rainmeter\Plugins\ so make sure rainmeter is closed and when you uncompress that .zip file copy the .dll file and make sure it overwrites that existing plugin that should be found there. Once you do that you should start seeing some extra stuff in the log that will likely be in french, post what that says.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: New UsageMonitor plugin

Post by jsmorley »

You might stop logging, delete the log file, and restart logging, so it isn't so big, and only has recent info in it.
User avatar
tjhrulz
Developer
Posts: 268
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: New UsageMonitor plugin

Post by tjhrulz »

SilverAzide wrote:Hello,

One more feedback item... this one is the most severe one I've found. When using UsageMonitor with Alias=VRAM, Rainmeter will crash if DynamicVariables=1 is used on the measure. Additionally, if Name=[Measurename] is used (with or without DynamicVariables), RM will crash.

Code: Select all

[Rainmeter]
AccurateText=1
DynamicWindowSize=1
Update=1000

; get the top GPU process
[MeasureGPU]
Measure=Plugin
Plugin=UsageMonitor
Alias=GPU
Index=1
; work-around for Percent=1 not working
Percent=0
MinValue=0.0
MaxValue=100.0

; this measure will crash Rainmeter
[MeasureVRAM]
Measure=Plugin
Plugin=UsageMonitor
Alias=VRAM
Percent=0
Name=[MeasureGPU]
DynamicVariables=1

[MeterText]
Meter=String
SolidColor=0,0,0,255
FontColor=255,255,255,255
FontSize=20
Padding=8,8,8,8
X=0
Y=0
Text="Hello"
You sure that with Name=[Measurename] and DV off that Rainmeter crashes (Or if it does does it not cause a crash when Alias=CPU)? Maybe I accidently fixed that crash already but when I try that I have no crashes since it just behaves like name was never set. It may be that the crash you got was unrelated to the option as a [MeasureName] and just related to the crash that caused the DV=1 issue (Any measure that had PIDToName=1 had a crash so it may just be that)

On the bright side I think all your other issues except the disabled/paused issue I have now written fixes for. That particular issue I can have a hotfix for so it does not affect UsageMonitor in the next beta but the cause is a much deeper "Quirk" in the way Rainmeter plugins works that I discovered a few months back (I will spare you the details).
User avatar
sephirotess
Posts: 332
Joined: December 8th, 2016, 6:45 am

Re: New UsageMonitor plugin

Post by sephirotess »

I have 2 Windows and I think I put the plugin in the wrong directory ... sorry. So here's the new message:

Code: Select all

NOTE (07:10:42.558) RainmeterProcess\RainmeterProcessNew.ini: Refreshing skin
DBUG (07:10:42.561) : Reading file: C:\Users\Sephi\AppData\Roaming\Rainmeter\Rainmeter.ini
DBUG (07:10:42.598) RainmeterProcess\RainmeterProcessNew.ini: Reading file: C:\Users\Sephi\Documents\Rainmeter\Skins\RainmeterProcess\RainmeterProcessNew.ini
ERRO (07:10:42.654) : UsageMonitor crashed trying to update the counters
DBUG (07:10:42.656) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:42.783) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)
ERRO (07:10:43.653) : UsageMonitor crashed trying to update the counters
DBUG (07:10:43.655) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:43.656) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)
ERRO (07:10:44.658) : UsageMonitor crashed trying to update the counters
DBUG (07:10:44.660) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:44.661) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)
ERRO (07:10:45.656) : UsageMonitor crashed trying to update the counters
DBUG (07:10:45.658) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:45.663) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)
User avatar
SilverAzide
Rainmeter Sage
Posts: 2604
Joined: March 23rd, 2015, 5:26 pm

Re: New UsageMonitor plugin

Post by SilverAzide »

tjhrulz wrote:You sure that with Name=[Measurename] and DV off that Rainmeter crashes (Or if it does does it not cause a crash when Alias=CPU)? Maybe I accidently fixed that crash already but when I try that I have no crashes since it just behaves like name was never set. It may be that the crash you got was unrelated to the option as a [MeasureName] and just related to the crash that caused the DV=1 issue (Any measure that had PIDToName=1 had a crash so it may just be that)

On the bright side I think all your other issues except the disabled/paused issue I have now written fixes for. That particular issue I can have a hotfix for so it does not affect UsageMonitor in the next beta but the cause is a much deeper "Quirk" in the way Rainmeter plugins works that I discovered a few months back (I will spare you the details).
Yep, I tried with DV on and off and it crashed both ways. It's a little confusing because DV=1 crashed it whether the Name option was used or not, so perhaps there are multiple issues. But it sounds like you got a handle on these problems, so I'm looking forward to the next beta! :)
Gadgets Wiki GitHub More Gadgets...
User avatar
tjhrulz
Developer
Posts: 268
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: New UsageMonitor plugin

Post by tjhrulz »

sephirotess wrote:I have 2 Windows and I think I put the plugin in the wrong directory ... sorry. So here's the new message:

Code: Select all

NOTE (07:10:42.558) RainmeterProcess\RainmeterProcessNew.ini: Refreshing skin
DBUG (07:10:42.561) : Reading file: C:\Users\Sephi\AppData\Roaming\Rainmeter\Rainmeter.ini
DBUG (07:10:42.598) RainmeterProcess\RainmeterProcessNew.ini: Reading file: C:\Users\Sephi\Documents\Rainmeter\Skins\RainmeterProcess\RainmeterProcessNew.ini
ERRO (07:10:42.654) : UsageMonitor crashed trying to update the counters
DBUG (07:10:42.656) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:42.783) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)
ERRO (07:10:43.653) : UsageMonitor crashed trying to update the counters
DBUG (07:10:43.655) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:43.656) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)
ERRO (07:10:44.658) : UsageMonitor crashed trying to update the counters
DBUG (07:10:44.660) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:44.661) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)
ERRO (07:10:45.656) : UsageMonitor crashed trying to update the counters
DBUG (07:10:45.658) : L'élément a déjà été ajouté. Clé du dictionnaire : 'taille virtuelle (octets)'  Clé ajoutée : 'taille virtuelle (octets)'
DBUG (07:10:45.663) :    à System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

   à System.Collections.DictionaryBase.System.Collections.IDictionary.Add(Object key, Object value)

   à System.Diagnostics.CategorySample.ReadCategory()

   à UsageMonitor.Categories.Counters.UpdateCategory(String category)

Well that was about the least likely cause of the crash I was expecting. Somehow it would seem that you have two instances in every counter under the Processes (Processus in french) category that share the same key. Unfortunately while my code handles this just fine Microsoft's does not. Given that this is not in a codebase I can fix I am not sure there is too much I can do.

You can try to see if the new version I attached fixes this (In order to test this new version you need to have windows 10 Fall Creators Update or installed .Net 4.7.1 manually) but I doubt it will have any impact and this is more so just so I can send a bug report to Microsoft.
Also can you run this command in powershell and upload the .csv file it makes? Get-Counter "\Processus(*)\% temps processeur" | Export-Counter -FileFormat "csv" PerfMon.csv (If anyone is having this issue in english try Get-Counter "\Process(*)\% Processor Time" | Export-Counter -FileFormat "csv" PerfMon.csv

Also SilverAzide feel free to test this version as well as it should fix all of your crashes.
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2604
Joined: March 23rd, 2015, 5:26 pm

Re: New UsageMonitor plugin

Post by SilverAzide »

tjhrulz wrote:Also SilverAzide feel free to test this version as well as it should fix all of your crashes.
Confirmed: Crash issue fixed, and Percent=1 shows in the log as an invalid setting. The only issue that remains for me is the Disabled issue (measure is still "alive" and ticking...).
Gadgets Wiki GitHub More Gadgets...
User avatar
tjhrulz
Developer
Posts: 268
Joined: October 13th, 2016, 1:28 am
Location: Earth

Re: New UsageMonitor plugin

Post by tjhrulz »

SilverAzide wrote:Confirmed: Crash issue fixed, and Percent=1 shows in the log as an invalid setting. The only issue that remains for me is the Disabled issue (measure is still "alive" and ticking...).
Yeah somtimes Percent=1 can cause it to say it is invalid for the alias when it is not for a little bit when first loaded the skin so I still need to fix that. But yeah I will fix the disabled thing tonight.