I have a complicated project where this problem occurs. I so far haven't been able to isolate it in a minimal project but I wondered if there was a known scenario that would trigger an execution time out error when calling array.clear(). If I use array = []; there is no error.