It is currently January 22nd, 2021, 4:03 pm

ImageName bug, 4.4 Beta r3410

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

ImageName bug, 4.4 Beta r3410

Post by pul53dr1v3r »

i've just experienced a bug about ImageName when i updated Rainmeter to the currently latest beta r3410. The bug doesn't exist in r3408 or lower and not only related to Rainformer suite, but you can test it using it: http://fav.me/dd247z5
So, the Weather and Network skins are affected in this case. In the Network skin, there is not any use of Images at all but the error is in the log.

Image
User avatar
jsmorley
Developer
Posts: 21466
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ImageName bug, 4.4 Beta r3410

Post by jsmorley »

pul53dr1v3r wrote: December 17th, 2020, 5:59 pm i've just experienced a bug about ImageName when i updated Rainmeter to the currently latest beta r3410. The bug doesn't exist in r3408 or lower and not only related to Rainformer suite, but you can test it using it: http://fav.me/dd247z5
So, the Weather and Network skins are affected in this case. In the Network skin, there is not any use of Images at all but the error is in the log.

Image
The only change in r3410 that can impact this is that we now produce an error in the log when an image can't be found. I'm quite certain that the problem with the skin has existed long before r3410, but you just didn't see it.

You need to look through your skins and see why it is looking for images that don't exist.
User avatar
jsmorley
Developer
Posts: 21466
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ImageName bug, 4.4 Beta r3410

Post by jsmorley »

This meter looks like a culprit to me...

Code: Select all

[IconWLan]
Meter=Image
MeasureName=MeasureSSID
MeasureName2=MeasureWiFiBands
MeasureName3=MeasureEncryption
MeasureName4=MeasureWiFiAuthentication
MeasureName5=MeasureAdapterName
MeterStyle=StyleMouseRegion | StyleMouseRegionStringButtonHover
ToolTipIcon=Info
ToolTipTitle=WLAN-WiFi Connection
ToolTipText=%1 @%2 (%3:%4)#CRLF#%5
Hidden=1
Group=IconWlan
You are apparently using this Image meter for the sole purpose of providing a Tooltip on it, but I suspect this was always failing, and you are now seeing the error messages.

You can't possibly have enough images to have one named for each possible Adapter Name out there...

So you were taking advantage of a "bug" that had been around for a long time, where you are using the MeasureNameN options to drive the values for the %1, %2, etc. in the ToolTip, while not expecting any actual image to be displayed. That used to sorta be ok, since no error was logged. The errors are logged now, and you are going to have to come at this differently.
User avatar
jsmorley
Developer
Posts: 21466
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ImageName bug, 4.4 Beta r3410

Post by jsmorley »

I would do something like this instead:

Code: Select all

[IconWLan]
Meter=Image
MeterStyle=StyleMouseRegion | StyleMouseRegionStringButtonHover
ToolTipIcon=Info
ToolTipTitle=WLAN-WiFi Connection
ToolTipText=[MeasureSSID] @[MeasureWiFiBands] ([MeasureEncryption]:[MeasureWiFiAuthentication])#CRLF#[MeasureAdapterName]
DynamicVariables=1
Hidden=1
Group=IconWlan
And just be sure that the "styles" contain the appropriate X/Y/W/H and SolidColor settings to define a region to hover over.
User avatar
jsmorley
Developer
Posts: 21466
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ImageName bug, 4.4 Beta r3410

Post by jsmorley »

The intent of MeasureName on an Image meter is to point to an actual image name that exists in the skin folder or wherever you define as ImagePath on the meter.

The %1 token is supported to provide a way to define an image that is not the default .png image format.

MeasureName=MyMeasure
ImageName=%1.jpg

The reason it supports MeasureName2, MeasureName3 and the %2, %3 and so on is to allow you to "build" an ImageName option based on the results of multiple measures. Like this:

Code: Select all

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

[Variables]

[MeasureOne]
Measure=String
String=1

[MeasureTwo]
Measure=String
String=2

[MeasureThree]
Measure=String
String=3

[MeasureFour]
Measure=String
String=4

[MeterImage]
Meter=Image
MeasureName=MeasureOne
MeasureName2=MeasureTwo
MeasureName3=MeasureThree
MeasureName4=MeasureFour
ImagePath=#@#Images
ImageName=%1%2%3%4
And I have an actual image named "1234.png" that resides in the @Resources\Images folder of the config.

So the long and the short of it is that your skin was always getting tons of internal errors, but you just were not seeing them. You really need to fix this in all the places you might be doing it, as even if you don't see the errors in the log, it is very inefficient to have Rainmeter looking for images on the drive that it can't possibly find.
User avatar
pul53dr1v3r
Posts: 419
Joined: July 30th, 2014, 10:30 am

Re: ImageName bug, 4.4 Beta r3410

Post by pul53dr1v3r »

@Morley

Indeed, that's the culprit and using that approach all the bugs have disappeared. Thank you for the explanation! I saw some more skins with the issue, so this topic will be useful for them as well, just not sure it should stay in the Bugs section of the forum. :great:
User avatar
jsmorley
Developer
Posts: 21466
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: ImageName bug, 4.4 Beta r3410

Post by jsmorley »

pul53dr1v3r wrote: December 17th, 2020, 7:18 pm @Morley

Indeed, that's the culprit and using that approach all the bugs have disappeared. Thank you for the explanation! I saw some more skins with the issue, so this topic will be useful for them as well, just not sure it should stay in the Bugs section of the forum. :great:
Glad to help. I think this area is as good a place as any for the issue.