RM4: Cannot pop() an empty List on line 5607 (delayedActsCancel)

Got this error in one of my rules this morning. It's a new rule. RM4

2019-09-04 07:11:47.481 am [error]( Cannot pop() an empty List on line 5607 (delayedActsCancel)

Created a new rule from scratch since I had edited that one many times. Hoping that would resolve the issue. It didn't.

Also noticed the "delay with cancel" seems off. An 8 minute delay triggered after 1 minute.

Same error came back.

New rule is exactly same as the rule above. I just deleted the first one and re-created.

You have the delay subject to a cancel but there is no Cancel delayed actions in your rule.

Thanks, sorry maybe something new in RM4 that I'm not understanding. In the routine above do I need to put the "Cancel Delayed Actions" in the first part of the IF? What if I just put a delay on the OFF statement? Would I still have to put a "Cancelled Delayed Actions" somewhere?

Also, why the one minute before triggering? Do I also have something else wrong?

If you want to cancel turning off the fan if the humidity goes back up, you just have to put a cancel delayed actions in the rule. However, your if part has a condition that the fan is off. So, that won't fire if the fan is on. So, you would have to break up the if part into two if parts.

This seems to be working:


Still seeing these errors:

It looks like even though that ELSE-IF is false it's still somehow running the Actions. I also see the repeated "OFF" events on the switch device. Is this rule still wrong?

Other than the errors and the repeated OFFs, It's working as expected. And no errors while it's running...only after the humidity has dropped and the fan is off and it gets subsequent humidity updates.

Can't pop() is a sign that there are multiple simultaneous instances of the rule running. With nested IF-THENs, this doesn't work. You must rethink how this rule is structured to avoid that problem.

Since all of the actions in the first part of your main IF-THEN only happen when two sets of conditions are true, you could combine these into a single IF-THEN instead of two that are nested. Then, instead of ELSE-IF, you could just use an independent second IF-THEN (assuming that changing the main IF-THEN changes the logic around ELSE-IF).


Apparently I'm still doing something wrong.

Can you not repeat ELSE-IFs? Or should I just be breaking this into multiple rules?

Something is wonky with this. Please try to get me more logs, as what you show doesn't start at the beginning of the sequence. Send by PM. I need to dig into what is going on with this rule, but will have to do so later this evening or tomorrow morning.

The problem still is from multiple simultaneous instances of this running. That sensor is reporting multiple times during the delay, and I suspect the rule is scheduling simultaneous overlapping delays. Need more study of a complete sequence.

I have the same error in a rule that doesn't have multiple If-Then statements


Update: Looks like mine might be due to having 2 similar rules firing at the same time. The one above runs anytime between 9:00pm and 7:00am, which it did, the other one that showed the error only runs 7:00am-9:00pm. I'll have to investigate further and find a better way to build this rule

"Cannot pop() an empty List" is always a sign of colliding instances of the same rule running at the same time. It can't happen between two different rules.

Turn on full rule logging and you can see the immediate cause.

5 posts were split to a new topic: Question about logging