Skip to main content
Known Participant
April 12, 2016
Question

After Effects error: Time argument is out of range. What causes this?

  • April 12, 2016
  • 1 reply
  • 1735 views

hi,all,my plugin delete and insert keyframes in a stream,but sometimes it causes "After Effects error: Time argument is out of range.",i checked the time argument carefully and don't find the time is out of range.so what causes this?my plugin need good stability and need to eliminate AE's errors.who knows the reason?any suggestions would be appreciated.

This topic has been closed for replies.

1 reply

Known Participant
April 29, 2016

hi,all,i find that before the error "Time argument is out of range​" occurs,i click the button "add or remove keyframe at the current time" the error also occur.it looks like that the error is caused not only by adding keyframes in code(and set keyframes info.like value\InterpolationType),and also cuased by UI interaction.

Inspiring
April 29, 2016

Well, I'm not sure if I'm right, but I ran into some wired issues when interacting with UI before. In my case, I found that the problem is calling After Effects functions from UI thread.(which seems wired to me, After Effects call are not thread safe, should only be called on main thread, but UI thread should be main thread, right?)

And the solution is to move all your After Effects calls into idle hook, then use AEGP_RegisterIdleHook to fire them, maybe you can give it a try

Known Participant
May 3, 2016

to Zhiqiang_Li:thank you for your reply.the effect plugin's entrypoint function and AEGP plugin's entrypoint function and Idlehook is in the same thread.so my plugin calls AEGP APIs in the same thread too,i tried your advice in my code and it seems nothings changed.