Closed LuminescentMoon closed 8 years ago
It seems that a GC cycle runs before call to putValue. GC cleans out all shims inside t
, because they are stored only in weak tables - parent shims and tableAppearances
. Therefore, t[k]
in self:putValue(t[k])
triggers __index
shim metamethod, which returns a new table, not in tableAppearences
, and that causes the error later inside putValue
. A proper fix would be to not make tableAppearances
weak, so that parts of inspected table can't be collected during inspection.
Full error:
Code I used to produce this error:
Fixed by putting a guard in line 235: