Error java.lang.StackOverflowError

I was just checking the Logs for frequency of Zigbee Outlet events nd noticed I am getting a few of these errors -
57062023-01-08 11:47:17.213 AMerrorjava.lang.StackOverflowError: null on line 9759 (method ruleActionsP)
I notice the errors are coming from rules where the Restriction(s) are both true & false

They are coming from various simple Rule Machine rules.
I am running platform 2.3.4.130 on a C4.

Any ideas?

Also I notice the rule Machine is reporting an error in the Live Log as well -
2023-01-08 11:58:46.767 AMerrorjava.lang.StackOverflowError: null on line 222 (method ruleAct)

for what device?

For Rule Machine rules. And Rule Machine itself
I have noticed the Hub has needed regular reboots recently, last few days.
Are these linked? I have started rebooting every morning at 05:30 and using the Hub Info device every midday...
I have rebooted since these errors started appearing in Live Logs and now no errors for last 30 mins
What can I do to help better understand this?

What platform are you on?

I would at the very least do a soft reset. The quickest way to do this is to restore from yesterdays backup (settings>>back up and restore).

20 mins after last reboot I have just had this error message appear from 'Rule Machine' itself

I dod a soft reset, backup diagnosits-> Soft rest 2 days ago after the hub started being very unresponsive
So doing another Soft reset now

For a stack overflow, the culprit is almost always something that invokes itself, either directly or indirectly. Does this rule call itself, or another rule which might call back to this rule? Does it change a device which will trigger the rule to run again?

1 Like

Okies. I had a req expression that could be affected by the actions of the rule firing.
Req Exp is Room Lights (Group) is ON
Event Motion stays inactive for 60 secs
Turn individual room lights off
I have removed these req exps from the rules and will observe.
I have also commented out some of the rules calling other rules to test

Thanks for the pointers @mbishop as it seems to have sorted the issues

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.