OK, that's really weird. Somehow you're getting an error from code that is trying to detect the mode of a layer, except you shouldn't be hitting that code doing the things you mention.
And I don't immediately see how that code could get hit.
Alright, time to do some debugging.
(the first 2 errors come from an automation plugin or Flash Panel doing something wrong)