It is currently April 28th, 2024, 2:50 am

[BUG] Deactivate Config Crash

Report bugs with the Rainmeter application and suggest features.
Mr Random
Posts: 5
Joined: April 21st, 2012, 12:04 am

[BUG] Deactivate Config Crash

Post by Mr Random »

I have a skin in which there are two places to deactivate a certain configuration. One of them is an event on the config itself. When I deactivate the config from the second location while this first location is already queued, Rainmeter crashes. Here is a better interpretation.

A is queued to open a program and then deactivate.
B deactivates A.
A, trying to deactivate, crashes.
User avatar
jsmorley
Developer
Posts: 22631
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: [BUG] Deactivate Config Crash

Post by jsmorley »

What is meant by "queued"?
User avatar
KreAch3R
Posts: 608
Joined: February 7th, 2011, 7:27 pm
Location: Thessaloniki, GR

Re: [BUG] Deactivate Config Crash

Post by KreAch3R »

Maybe a counter? You should share your code. If Rainmeter is crashed because of your skin, then we can definitely help you when we see the code.
Inactive, due to life changes. Send me a PM for any question.

Desktop DeviartArt
Image
Mr Random
Posts: 5
Joined: April 21st, 2012, 12:04 am

Re: [BUG] Deactivate Config Crash

Post by Mr Random »

Sorry for the late response, I haven't been playing around with Rainmeter since I made this skin.

The issue is that there is a missing try-catch block in the code, for when a config attempts to disable an already-disabled config.

My code is all over the place, so I'll just give a summary of what my program does:
I have buttons that open to a menu of other buttons that each open a template configuration with a different include file. With this I am able to whittle the code down so that, for opening games and apps, the template opens with the corresponding include file to that game/app. However, I have two different ways to disable the template config:
1) By pressing one of the buttons on the template (run, go to location, and contextual).
2) By closing the menu of buttons from the original dock of buttons.
When I close the template while it is in the process of running a program, the template code within itself tries to disable itself again, causing Rainmeter to crash.

I hope that helps you guys decipher a solution. Thanks for your time.