We are getting some errors reported to us from a couple of different users. The error is the same and the stack trace we have points to the following function: -
local \_clearListLabel = function(name) for i = 1, #\_listValues do if \_listValues[i].name == name then if \_listValues[i].lbValue ~= nil then \_listValues[i].lbValue:removeSelf() \_listValues[i].lbValue = nil break end end end end
The error being report is in the “attempt to call method ‘removeSelf’ (a nil value)” on the line: -
\_listValues[i].lbValue:removeSelf()
Does anyone know how this could happen and if there is any other way to avoid it?
We cannot recreate the error. It is very infrequent. We have maybe 2,000 users of this App and we get this error reported 1 or 2 times a week, however it is very puzzling.
My only thought was maybe this function is being called twice. So we are somehow getting a clash… But the calling code does not support this…