
[BUG] Script.lua code has errors; some parts require null checks.
Closed this issue · 3 comments
Before You Begin
- I confirm that I have downloaded the latest version of the addon.
- I am not playing on a private server.
- I checked for an existing, open ticket for this issue and was not able to find one.
- I edited the title of this bug report (above) so that it describes the issue I am reporting.
Describe the Issue
Since the recent version 11.2.1.0.1d, in the ConvertScript function at line 1591 of the script.lua file, the following code:
modifiers[ "error:" .. m ] = e .. "\n - " .. emulated
has the potential for e to be nil or for emulated to be false. Under these circumstances, concatenating the strings would cause problems, as there was previously no validation check for the legitimacy of e and
How to Reproduce
NA
Player Information (Link)
NA
Error Messages (Link)
NA
Additional Information
No response
Contact Information
No response
There was one time when it got particularly laggy. I checked and found that Hekili was using high CPU. After tracing, I identified the issue was with these two lines, and the key values for 'e' were nil. However, it was later resolved after cleaning up the environment. Even just from the perspective of expression robustness, we shouldn't concatenate a value that could be nil or false into a string.
After tracing, I identified the issue was with these two lines, and the key values for 'e' were nil.
It is extremely unlikely that these lines, associated with (essentially) one-time compilation of priorities and not used to calculate recommendations, have any performance impact outside the initial thread.
Even just from the perspective of expression robustness, we shouldn't concatenate a value that could be nil or false into a string.
Sure. But from a "this is causing a problem I've experienced" standpoint, actual errors and data are requested in the ticket, so any complicating factors can also be identified (if needed).