Bug creating rule from Basic Rule with Delay action

@support_team

I had a rule fail last night with this error:

java.lang.NullPointerException: Cannot invoke method tokenize() on null object on line 9195 (method allHandlerT)

This rule turns on several lights with a 1 second delay between some of the steps. I just transitioned this rule to Rule Machine from Basic Rules using the button in Rule Machine to automatically create it.

I was able to determine that the error was being thrown right after a "delay 1 second" action. There were several one second delays in the action list, and when I disabled one, the next one in the list would throw the error. When they were all disabled, the actions ran without error.

After deleting the delay actions and re-adding them, the rule ran without error.

I just tested on my other hub (both are C7, version 2.3.6.146) and can duplicate the issue.

Steps to reproduce:

  • Create a basic rule with a delay. I created: When time is sunset, wait one second, then turn off Kitchen Lights
  • Create a Rule Machine rule from the basic rule using "Create new Rule from Basic Rule "
  • Un-pause the Rule Machine rule
  • 'Run Actions' in the Rule Machine rule

Steps to remedy:

  • Delete delay actions that were automatically created in Rule Machine
  • Re-add delay actions within Rule Machine

Additional info:
If I add a new "Delay 1 second" action to the rule, it will run that action without error. Only the imported delays cause the error.

If I copy/paste an imported "Delay 1 second" action, the pasted delay will also throw the error.

The logs show "Action: Delay 0:00:01" before the error is logged. The error seems to come from whatever action follows the delay, and the part of the error in the parenthesis varies depending on what action is next. I've seen:

...on line 9195 (method delayedActs) when the delay was followed by another delay
...on line 9195 (method appButtonHandler) when the delay was followed by turning off a switch
and
...on line 9195 (method allHandlerT) which I think was when it was followed by a dim action (not sure)

I attempted to reproduce on [2.3.6.144] but I don't have a Delay option in Basic Rule so I used Wait

I imported the BR rule into RM and got the following

Running the action I get the following error