Cannot invoke method getDisplayName() on null object on line 6332 (method selectActions)

I have a Rule Machine rule that appears to load OK on the mainPage, but when I click on the Action section to edit it, I get the following:
image

And in the logs it shows:

java.lang.NullPointerException: Cannot invoke method getDisplayName() on null object on line 6332 (method selectActions)

Any ideas what's going on?

I've tried rebooting the Hub already once, and the issue persists.

I'm able to edit other aspects of this rule without issue (Triggers, Conditions) - just not Actions.

All my other Rules load fine and I can edit them with no issues (including rules that are very similar to this one).

EDIT: Hub is a C-8 running 2.3.9.201

Help? :slight_smile:

I don't know that I'll be of much help. But, can you post a screenshot of the rule actions? I'm curious.

Can you just recreate the rule; and delete the problematic one?

1 Like

It's identical to 3 other rules other than a different condition and a different value for the setLED() call (this is for a garage door control) - so I'm 99.999% sure it's not the actual actions in the rule causing the problems :slight_smile: It used to work (I used to be able to edit it), but then suddenly it stopped being able to be edited.
image

I'm sure I can, and it's not a very complex rule, but being a SWE myself, I prefer to report bugs and try to troubleshoot issues instead of just "bypassing" them :wink:

I appreciate the reply nonetheless!

I like your style!
Well, nothing comes to mind from the screenshot. Looks good to me.
Going back to the error... "cannot invoke method getDisplayName()"...
Is there perhaps a special character in the rule title?

I also know it's considered best practice to click "Done" whenever editing a rule. So using things like the back button is not recommended. Is it possible you've done this in the past and maybe it corrupted the rule somehow??

Or... a special character in the "Garage Control" name?

Do me a favor... and go to the apps page.
Expand the Rule Machine 5.1 to see all rules.
Find your rule; and click the cog wheel for that rule.

On the next page, near the top, click export/import/clone rule.
On the next page, click the "export" button.
Open the downloaded file with a code editor; or notepad++.

Let's see what the JSON for the rule looks like.
I'm guessing it's malformed somehow.

Well, heh... it's an empty file.... Perhaps why it's getting a NULL exception. Or something is silently failing in the background when trying to export it - I had the logs open when exporting and nothing was logged one way or another.

(Also, per your other post, yeah I have always used "Done" and never used the navigation :slight_smile: I didn't see any weird characters, and I tried retyping the name even - no dice)

Yeah... the rule got corrupted somehow.
I'm not sure exactly how or why... but it's not extremely uncommon.
The consensus seems to be just recreating the rule; and removing the problematic one.

Strange no error when attempting to export.
The ones I saw who had similar issues; did see an error message.

But in the end, I would just recreate and delete.
The issue should go away afterwards.

I guess I'm confused as to why the rule is even able to be displayed at all, then? Does that display not use the same underlying json for the rule? Seems odd to me is all...