0
Answered

Animator crashing when Rewinding

Matt 6 months ago • updated 6 months ago 7

Hello, I have been using Chronos for a days and I am implementing into a 3D platformer. I am very much a hobbyist so please excuse any daft questions :)

When Rewinding, Unity will crash. Not all the time; sometimes it happens the first time I activate Rewind, other times it may take 10 minutes. The only way to stop the crashing is to disable the Animator when activating Rewind, and the Stack Trace seems to confirm this.

If I remove all my animations except the most basic "Running" animation, things seem stable, although as I say I cannot always replicate the crashing and just when I think it's gone, it will re-occur.

What should I be looking at to resolve this? Are there known "things not to do with the Animator" for Chronos?


Thanks in advance, I have been working on this the last 3 days with no success and it's starting to get annoying :(


Thanks,


Matt

Chronos Version:
Unity Version:
5.5.1p4

Answer

Answer

Thank you for looking at it. I did raise a report with Unity, and was advised it's a duplicate of this one:

https://issuetracker.unity3d.com/issues/animationclipplayable-setclip-crashes-unity-when-animation-is-recorded-and-replayed

Which I'm not entirely convinced off, but OK.

I had already tried removing Final IK and Puppet Master and any IK code I had running, but that did not resolve the issue.

I have, however, significantly reduced the frequency of crashing - I updated to 5.6.1f1, and gave all my animations a tidy (removed any curves, and ensured all animations start and end on an int, rather than a floating point), and also reset all animation bools before starting to Rewind.

I've not seen a crash for a day, but I'm hesitant to say it's Fixed as I cannot repeat the issue.

May I ask one last question while I am here, I have looked through the documentation but have not found an answer. When Rewinding, is there a way to tell how much "rewind time" there is left? I could do it manually but it would be easier if it was already there, particularly when you do two quick rewinds :)

Thank you,


Matt

GOOD, I'M SATISFIED
Satisfaction mark by Matt 6 months ago
Under Review

Hi Matt,

You mention the stack trace. Can you send me a log that occurs before the crash? Otherwise it's very hard to debug.

Hello Lazio, thank you for replying so quickly :)

Please find a log file linked below:

crash.log

If you need me to run or do anything, please just let me know, but remember I'm a hobbyist and learning as I go :)


Thank you,


Matt

And here is a second log I have just created. The stack trace shows a different animation related call at the top.

crash2.log

Thank you.

Answered

Unfortunately, I can't see anything Chronos-related from these logs. 

I see from the logs that you also have Final IK and Puppetmaster installed. Could these be the source of the problem? They interact with the animator component much more than Chronos does.

In the end Chronos is only calling Recorder methods on the animator, like this: https://docs.unity3d.com/ScriptReference/Animator.StartRecording.html

It's not doing any black magic behind the scenes that would be prone to a crash.

If you can isolate it to Chronos only, please send me a small project where I can reproduce the issue.

If the issue persists, perhaps you'll have to submit a bug report to Unity.

Answer

Thank you for looking at it. I did raise a report with Unity, and was advised it's a duplicate of this one:

https://issuetracker.unity3d.com/issues/animationclipplayable-setclip-crashes-unity-when-animation-is-recorded-and-replayed

Which I'm not entirely convinced off, but OK.

I had already tried removing Final IK and Puppet Master and any IK code I had running, but that did not resolve the issue.

I have, however, significantly reduced the frequency of crashing - I updated to 5.6.1f1, and gave all my animations a tidy (removed any curves, and ensured all animations start and end on an int, rather than a floating point), and also reset all animation bools before starting to Rewind.

I've not seen a crash for a day, but I'm hesitant to say it's Fixed as I cannot repeat the issue.

May I ask one last question while I am here, I have looked through the documentation but have not found an answer. When Rewinding, is there a way to tell how much "rewind time" there is left? I could do it manually but it would be easier if it was already there, particularly when you do two quick rewinds :)

Thank you,


Matt

Hi Matt,

That seems like it could be it!

Please post a separate a feature request for the available rewind duration idea. :) In the mean time, you could make the protected List<float> times  in RecorderTimeline.cs public and subtracting:

var availableRewind = timeline.time - timeline.transform.times[0]

Cheers!

Thank you, I will take a look at it and raise a new feature request :)