Page 1 of 2

[Bug] UsageMonitor crash with unhandled null exception

Posted: June 22nd, 2018, 2:01 pm
by Sky YoNG
As stated.

Rainmeter just quit without any error dialog when this happened. Also I running 3 monitor setup and this issue occurred mostly when my monitor going into sleep mode.

Windown Event Viewer
Untitled.png
Untitled1.png
Untitled2.png
Untitled3.png
Rainmeter Version
4.2.0 beta r3088 64-bit (Jun 15 2018) - English (1033)
Windows 10 Pro 1803 64-bit (build 17134) - English (1033)

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 23rd, 2018, 3:19 pm
by tjhrulz
Fixed as of Rainmeter 4.2 Beta Release - r3101.

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 24th, 2018, 10:34 pm
by ManiusNG
I suppose it's not fully fixed (happened with 3104)

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 26th, 2018, 3:34 am
by tjhrulz
ManiusNG wrote:I suppose it's not fully fixed (happened with 3104)
You know what this is a different error than the one I fixed, odd that GetString is causing a crash because there is not much in there that should have the potential to cause a crash.

I have attached a version with special debug logging added to it, do you mind trying that and seeing what it says in the Rainmeter log (Turn on debugging in the settings and in the log as well so you can see the full stacktrace and message so you wont need another program)?

To install it just go into the plugins folder where you installed Rainmeter (Typically C:\Program Files\Rainmeter\Plugins\) and replace the UsageMonitor.dll with the one in the included zip

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 26th, 2018, 11:13 pm
by ManiusNG
tjhrulz wrote:You know what this is a different error than the one I fixed, odd that GetString is causing a crash because there is not much in there that should have the potential to cause a crash.

I have attached a version with special debug logging added to it, do you mind trying that and seeing what it says in the Rainmeter log (Turn on debugging in the settings and in the log as well so you can see the full stacktrace and message so you wont need another program)?

To install it just go into the plugins folder where you installed Rainmeter (Typically C:\Program Files\Rainmeter\Plugins\) and replace the UsageMonitor.dll with the one in the included zip
Hi,

I've installed the supplied version and turned on debugging. As soon as I get crash, I'll keep You updated.

Cheers,
Rafal

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 26th, 2018, 11:24 pm
by tjhrulz
ManiusNG wrote:Hi,

I've installed the supplied version and turned on debugging. As soon as I get crash, I'll keep You updated.

Cheers,
Rafal
It actually should stop rainmeter from crashing and instead it will just log it if a crash *would* have happened. You can log it to a file you have that active or just to the console if you don't. So I would check that for an error that says something like "UsageMonitor crashed trying to return the new String value of this measure"

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 29th, 2018, 5:11 pm
by jsmorley
Rafal,

If we can get you to take a minute to test what tjhrulz has provided and give us some feedback, it would be a huge help.

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 29th, 2018, 9:43 pm
by SilverAzide
jsmorley wrote:If we can get you to take a minute to test what tjhrulz has provided and give us some feedback, it would be a huge help.
Today I got the APPCRASH issue, which I've been getting for a while but on very rare occasions. It seems to always happen when the machine has been idle (monitor asleep, screensaver active). Symptom are the same as the original poster's, in that Rainmeter is just gone (no error message dialog). I don't have much useful to give you, my event log just indicates a crash in the CLR. I installed TJHrulz's debug DLL and I get a humongous dump of errors. I've attached a zip containing the following:

Rainmeter.log
Event1.txt (EventViewer event #1)
Event2.txt (EventViewer event #2)
Event3.txt (EventViewer event #3)
Report.wer (Windows error report)

One oddity about the Rainmeter log... the massive unending stream of debug messages about being "Could not find a counter..." are happening on measures that are disabled as well as ones that are enabled.

P.S.: The log file was collected after the crash (the Windows events are for the crash), the log is for when I installed the debug DLL, so the two things are not necessarily related.

4.2.0 beta r3104 64-bit (Jun 23 2018) - English (1033)
Windows 10 Pro 1803 64-bit (build 17134) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\...\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\...\AppData\Roaming\Rainmeter\
IniFile: C:\Users\ripsn\AppData\Roaming\Rainmeter\Rainmeter.ini

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 30th, 2018, 3:06 am
by tjhrulz
SilverAzide wrote:Today I got the APPCRASH issue, which I've been getting for a while but on very rare occasions. It seems to always happen when the machine has been idle (monitor asleep, screensaver active). Symptom are the same as the original poster's, in that Rainmeter is just gone (no error message dialog). I don't have much useful to give you, my event log just indicates a crash in the CLR. I installed TJHrulz's debug DLL and I get a humongous dump of errors. I've attached a zip containing the following:

Rainmeter.log
Event1.txt (EventViewer event #1)
Event2.txt (EventViewer event #2)
Event3.txt (EventViewer event #3)
Report.wer (Windows error report)

One oddity about the Rainmeter log... the massive unending stream of debug messages about being "Could not find a counter..." are happening on measures that are disabled as well as ones that are enabled.

P.S.: The log file was collected after the crash (the Windows events are for the crash), the log is for when I installed the debug DLL, so the two things are not necessarily related.

4.2.0 beta r3104 64-bit (Jun 23 2018) - English (1033)
Windows 10 Pro 1803 64-bit (build 17134) - English (1033)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\...\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\...\AppData\Roaming\Rainmeter\
IniFile: C:\Users\ripsn\AppData\Roaming\Rainmeter\Rainmeter.ini

Oops went a little overkill on the logging and had left in some bad code I was testing in that one. I reattached a new version that should better log everything if that crash happens again.

Ill try some extra testing with a screensaver. I have seen no random crashes myself though but I will try a screensaver. (Also are we talking actual sleep mode ever or just pure screensaver relate (It may be crashing while it is happening too and you just don't see it till you come back too I guess)

Re: [Bug] UsageMonitor crash with unhandled null exception

Posted: June 30th, 2018, 4:25 am
by SilverAzide
tjhrulz wrote:Ill try some extra testing with a screensaver. I have seen no random crashes myself though but I will try a screensaver. (Also are we talking actual sleep mode ever or just pure screensaver relate (It may be crashing while it is happening too and you just don't see it till you come back too I guess)
To clarify my comment, I don't have my machine configured to actually go into sleep mode. Basically, after 10 minutes or so of being idle, the normal Windows screensaver (slideshow, in my case) will kick in, and after about a half-hour the PC will turn off the monitor. When I eventually log back into the machine, I sometimes -- admittedly very rarely -- will see that Rainmeter has been killed.

I'll try the new DLL and let you know if anything crops up...