It is currently July 10th, 2020, 6:37 am

Custom Skin freezes Rainmeter entirely

Help with creating, editing & fixing problems with skins
InterFelix
Posts: 2
Joined: May 25th, 2020, 9:25 pm

Custom Skin freezes Rainmeter entirely

Post by InterFelix »

Hello,

I am currently working on porting TJ Markham's Win10Widgets' Spotify Widget to WebNowPlaying, so it can work with modern versions of the Spotify app. It all worked reasonably well, until I experienced some very weird behaviour. I'm working on implementing a function so that the entire skin is hidden if Spotify is not running. However, I also have a "Setting" for the skin where the user can choose if he actually wishes this behaviour or wants to see the widget no matter what. It kind of works. It definitely disappears when I close Spotify now, but I can't test if the user can switch, because Rainmeter in its entirety freezes whenever my skin is shown. When it's hidden because Spotify is closed, everything works fine. But when it's shown because Spotify is open, rainmeter and all other skins freeze. Has anyone experienced something like that? If you want, I can post my sourcecode, since I plan on releasing this skin to the public once it's finished anyways.

I am trying to fix this problem now without throwing away my added functionality, but don't really know what to do anymore.
I highly appreciate any help regarding this!

Thanks a lot!
InterFelix
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4040
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Custom Skin freezes Rainmeter entirely

Post by eclectic-tech »

Generally, a skin will cause a "Freeze" due to something in the way it is coded; It can be a "typo", a "continuously looping operation", etc.
So we would need to see your code to be able to help.

I realize that the suite in question uses multiple includes and "core" files, but seeing your code may give us a place to start helping.
InterFelix
Posts: 2
Joined: May 25th, 2020, 9:25 pm

Re: Custom Skin freezes Rainmeter entirely

Post by InterFelix »

Nevermind, I got it working. I think the freeze had to do with a missing IfTrueAction. So there was a IfCondition with no corresponding IfTrueAction or IfFalseAction.
There were some additional mistakes that might have caused this, which I didn't spot even though they were fairly obvious looking back, probably because it was way too late when I posted this yesterday.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 4040
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Custom Skin freezes Rainmeter entirely

Post by eclectic-tech »

Glad you found the issue. :welcome:
User avatar
balala
Rainmeter Sage
Posts: 10998
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Custom Skin freezes Rainmeter entirely

Post by balala »

InterFelix wrote:
May 26th, 2020, 6:09 am
Nevermind, I got it working. I think the freeze had to do with a missing IfTrueAction. So there was a IfCondition with no corresponding IfTrueAction or IfFalseAction.
There were some additional mistakes that might have caused this, which I didn't spot even though they were fairly obvious looking back, probably because it was way too late when I posted this yesterday.
I doubt an IfCondition with no corresponding IfTrueAction or IfFalseAction could cause any trouble, or could freeze Rainmeter.
Rather the additional mistakes, however it depends on what those mistakes are.
User avatar
Mor3bane
Posts: 856
Joined: May 7th, 2016, 7:32 am

Re: Custom Skin freezes Rainmeter entirely

Post by Mor3bane »

heh.

I've frozen Rainmeter for missing a semicolon, or colon in weird places. So whatever those other mistakes were, glad you nailed them.
My DevArt Gallery

There are many ways to be different - there is only one way to be yourself - be amazing at it

The law of averages says what it means; even if you get everything right, you will get something wrong. Therefore; self managing error trapping initiates another set of averages - amongst the errors, some of them will not be errors, instead those instances will appear to be "luck". One cannot complain of the 'appearance' of 'infinite regress of causation', even if it does not have a predictable pattern, only that is requires luck to achieve.