Animation fails in frame()

Since you are not getting any responses to your original question, consider the advice in

particularly: quote your code, provide an MWE, with version information