Rule 5.1 Crash / Can't Reopen after local variable deletion

Wasn't sure if this was the right place for bug reports...

Was creating a 5.1 Rule. Deleted an unused local variable and got "Unexpected Error" - Error: String index out of range: 10.


After the error the rule can not be reopened / edited.

Here's the specific log entries:

I ran into a slightly different version of this same crash while editing a Rule 5.1.

Was able to delete 2 local variables. On the attempt to delete the 3rd local, I got the following error / crash -- which renders the rule uneditable from then on:

java.lang.NullPointerException: Cannot invoke method startsWith() on null object on line 9814 (method selectActions)

Did a few more attempts to get the first type of crash and was successful there as well, with a slightly different Java error:

java.lang.StringIndexOutOfBoundsException: String index out of range: 10 on line 10147 (method mainPage)

Hope this helps clean up the error for a future release.

Evidently these DateTime variables and had been used in a Condition of Between Two Times, right?

When you say 'unused', had you removed the condition? It appears to me that the condition was still in place.

At any rate, this will be fixed in the next release to not blow up when this happens.

1 Like

They were comparing two dates when I was playing around / tuning the rule. I removed all action references to the variables, saved the rule, then tried to remove the two DateTime variables. If I start with deleting one of the two datetime variables, I can delete 1 of the 2 before it crashes. If I start with deleting other non-datetime variables, it crashes on deleting either of the subsequent 2 datetime variables.

To hopefully make it clearer, here's a view of the rule with the two datetime variables shown.

Thank you for your help / the upcoming updates.

I'm pretty sure the issue arose because you still had a Condition referencing those DateTime variables. In my testing, when there was such a Condition, even with no corresponding actions, it threw the error. When I removed the Condition first, it did not. In any event, that will be fixed with respect to the error you showed above, which were specifically related to the Between Two Times condition you had.

I just tried to delete the Auto_Scene_Restore_Time variable in the above shown rule just now. When I do so, I got:

I had a very similar thing happen to me and it is like bravenel was saying. I deleted a Global Variable that was still being used in my rule and it blew up when I tried to open the rule again. Luckily I remembered what I just did and added the Variable back and then the rule was fine again.

Good to hear this will be fixed that the rule won't blow up when this happens and we can get back in and correct any issues with the rule.

I need to see the text from the Logs, where it shows the line number for this error. That may just be the same error, or it may be a different similar one. You can look at Past Logs to see it.

Sure thing... Here it is:

FYI - I rec'd an email notification of the user's message before yours but don't get such notifications when you reply to my posts... I looked into the notification settings on my account and don't see a problem. Any setting I should look for to fix it?

Yeah, that's the same error as your original post. Fixed in next release. Thanks.

1 Like

Thanks.... Got that email notification.

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