No, no, that was an excellent piece of information - I had no idea of why that happened, just noticed that the 0 delay has an actual delay effect. Many thanks for making this clear, I truly appreciate it.
It is currently March 28th, 2024, 9:52 am
Animated GIF issue
- Yincognito
- Rainmeter Sage
- Posts: 7017
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
Yincognito wrote: ↑June 18th, 2020, 7:45 pm No, no, that was an excellent piece of information - I had no idea of why that happened, just noticed that the 0 delay has an actual delay effect. Many thanks for making this clear, I truly appreciate it.
Re: Animated GIF issue
I've made these changes:Yincognito wrote: ↑June 18th, 2020, 7:21 pm I wasn't able to reproduce the issue, just like the other folks who tried to help you with this, but I believe mak_kawa is correct, some operational timing is the cause of this. You might want to investigate:
- setting a Timeout in the RunCommand measure, to "kill" the task if it somehow continues being active even after the usage period
- make the process clearer and less "overlapping prone" by setting the measures / meters to update "on demand" with the help of the UpdateDivider=-1 & !UpdateMeasure/Meter combo
- make the leading zeros substitute simpler by using something like Substitute="^(.*)$":"0000\1","^.*(.{5})$":"\1"
- better separate the operations in your workflow to avoid their overlapping by using a small delay especially at the start of the FinishAction from MeasureExtract (even a [!Delay 0] produces a delay, despite what one may think due to the "0", i.e. non existent delay period)
Other than that, what I think it happens, given the fact that the entire image dissapears, is either:
- the operations somehow overlap each other at some random intervals
- the image meter is looking for a non-existent image once in a while
- the RunCommand operation doesn't finish properly before the next "session" begins, at various moments
- the image name being looked for is valid, but the contents of the actual .png image file is somehow invalid (unfinished extraction?)
Code: Select all
[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1
[MeasureAnimLoop]
Measure=Calc
Formula=(MeasureAnimLoop % 9) + 1
RegExpSubstitute=1
Substitute="^(.*)$":"0000\1","^.*(.{5})$":"\1"
;Substitute="^(\d\d\d\d)$":"0\1","^(\d\d\d)$":"00\1","^(\d\d)$":"000\1","^(\d)$":"0000\1"
FinishAction=[!Delay 100]
Disabled=1
[MeasureImage]
Measure=Plugin
Plugin=WebParser
URL=https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=500&width=500&extension=gif&renderBackground=True&renderBranding=False&renderText=True&history=3&forecast=6&skip=1
Download=1
DownloadFile=current.gif
ForceReload=1
FinishAction=[!CommandMeasure MeasureExtract "Run" ][!log "Download"]
[MeasureExtract]
Measure=Plugin
Plugin=RunCommand
Parameter=gif2frames.exe current.gif
StartInFolder=#CURRENTPATH#DownloadFile
FinishAction=[!Delay 100][!SetOption MeterAnimLoop ImageName current[*MeasureAnimLoop*].png][!log "Extract"][!Delay 100][!EnableMeasure MeasureAnimLoop]
Disabled=1
[MeterAnimLoop]
Meter=Image
ImagePath=#CURRENTPATH#DownloadFile
DynamicVariables=1
x=0
Y=0
W=534
H=534
PreserveAspectRatio=1
I added a {!Delay 100] bang at [MeasureExtract] like FinishAction=[!Delay 100][!SetOption MeterAnimLoop ImageName current[*MeasureAnimLoop*].png][!log "Extract"][!Delay 100][!EnableMeasure MeasureAnimLoop]
I added a {!Delay 100] bang at [MeasureAnimLoop] just to be sure
[MeasureExtract] is already "on demand" since Disabled=1
After 7 updates the image disappeared.
After twice pressing the refresh button the images appeared again.
Question: why do I have to press 2 times the refresh button?
Any ideas left?
- Yincognito
- Rainmeter Sage
- Posts: 7017
- Joined: February 27th, 2015, 2:38 pm
- Location: Terra Yincognita
Re: Animated GIF issue
Regarding the "on demand" thing, a small note: since the measure once enabled stays enabled, it's not exactly what I would call "on demand" (it's only "on demand" at the start). Anyway, that was just to make the workflow clearer and try to make each step of the process happen only after the previous one finished. I'll rewrite the skin tomorrow trying to cover all the angles that I believe could cause the issue you're experiencing, but obviously it's hard to fix something that you can't reproduce for the time being. Since the problem seems to happen after downloading / extracting, I'm not sure how I could increase the update rate of the WebParser (to hopefully reproduce the issue) without polling the site too often and getting blocked / banned / etc, because I wouldn't like to wait for hours until the "bug" finally happens. I could try to work locally instead, but if the whole thing is related to getting the data online, that approach might not prove relevant enough.JamX wrote: ↑June 18th, 2020, 9:12 pm I've made these changes:I replaces the substitute like advised.Code: Select all
[Rainmeter] Update=1000 DynamicWindowSize=1 AccurateText=1 [MeasureAnimLoop] Measure=Calc Formula=(MeasureAnimLoop % 9) + 1 RegExpSubstitute=1 Substitute="^(.*)$":"0000\1","^.*(.{5})$":"\1" ;Substitute="^(\d\d\d\d)$":"0\1","^(\d\d\d)$":"00\1","^(\d\d)$":"000\1","^(\d)$":"0000\1" FinishAction=[!Delay 100] Disabled=1 [MeasureImage] Measure=Plugin Plugin=WebParser URL=https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=500&width=500&extension=gif&renderBackground=True&renderBranding=False&renderText=True&history=3&forecast=6&skip=1 Download=1 DownloadFile=current.gif ForceReload=1 FinishAction=[!CommandMeasure MeasureExtract "Run" ][!log "Download"] [MeasureExtract] Measure=Plugin Plugin=RunCommand Parameter=gif2frames.exe current.gif StartInFolder=#CURRENTPATH#DownloadFile FinishAction=[!Delay 100][!SetOption MeterAnimLoop ImageName current[*MeasureAnimLoop*].png][!log "Extract"][!Delay 100][!EnableMeasure MeasureAnimLoop] Disabled=1 [MeterAnimLoop] Meter=Image ImagePath=#CURRENTPATH#DownloadFile DynamicVariables=1 x=0 Y=0 W=534 H=534 PreserveAspectRatio=1
I added a {!Delay 100] bang at [MeasureExtract] like FinishAction=[!Delay 100][!SetOption MeterAnimLoop ImageName current[*MeasureAnimLoop*].png][!log "Extract"][!Delay 100][!EnableMeasure MeasureAnimLoop]
I added a {!Delay 100] bang at [MeasureAnimLoop] just to be sure
[MeasureExtract] is already "on demand" since Disabled=1
After 7 updates the image disappeared.
After twice pressing the refresh button the images appeared again.
Question: why do I have to press 2 times the refresh button?
Any ideas left?
Let me see what I can do tomorrow. Now it's past midnight here and while I don't have a problem going deeper in the night in the awake state, so to speak, this has been a busy day for me and I feel like I need some relax time watching some movie or something for a while.
By the way, don't give up on this just yet. It's some nice thing you do there in your skin, and setting the update of the skin to lower values (while taking care to avoid a too short update rate in the WebParser) makes the visuals look like watching a live simulation of the atmospheric front movement or the original GIF itself.
Re: Animated GIF issue
Thanks for your support.
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
Although in the code of the FinishAction option, the !Delay bang is used properly, take care not use the bang as have you posted it ({!Delay 100]), but correctly, with brackets: [!Delay 100]. I suppose this was just a typo, but since you've posted it twice the same way maybe it worth a check.JamX wrote: ↑June 18th, 2020, 9:12 pm I added a {!Delay 100] bang at [MeasureExtract] like FinishAction=[!Delay 100][!SetOption MeterAnimLoop ImageName current[*MeasureAnimLoop*].png][!log "Extract"][!Delay 100][!EnableMeasure MeasureAnimLoop]
I added a {!Delay 100] bang at [MeasureAnimLoop] just to be sure
[MeasureExtract] is already "on demand" since Disabled=1
Let's clarify a minor (but probably important) detail: probably the Image meter disappears on the 7th update of the parent WebParser measure, not on the 7th update of the skin, or of the Image meter (not the same thing). Am I right (I suppose so, but just want to make sure)?
Re: Animated GIF issue
Yes, my mistake, it was a typo.balala wrote: ↑June 19th, 2020, 5:58 am Although in the code of the FinishAction option, the !Delay bang is used properly, take care not use the bang as have you posted it ({!Delay 100]), but correctly, with brackets: [!Delay 100]. I suppose this was just a typo, but since you've posted it twice the same way maybe it worth a check.
Let's clarify a minor (but probably important) detail: probably the Image meter disappears on the 7th update of the parent WebParser measure, not on the 7th update of the skin, or of the Image meter (not the same thing). Am I right (I suppose so, but just want to make sure)?
Yes update of the parent webparser
- balala
- Rainmeter Sage
- Posts: 16109
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: Animated GIF issue
Weird is that I see nothing which would justify this and for me (and it seems for others as well out there) such problem doesn't exist. I added a simple Calc measure to the code:
Code: Select all
[Measure]
Measure=Calc
Formula=( Measure + 1 )
There something strange is going on, I think. Although I'm not sure this gonna help, you might try removing the ForceReload=1 option from the [MeasureImage] measure. Did this help?