Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

IsFinite (m_CachedRange.first) && IsFinite (m_CachedRange.second)

Discussion in '5.4 Beta' started by Hyp-X, Apr 7, 2016.

  1. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    432
    I get this error periodically in 5.4.0b13:
    "IsFinite (m_CachedRange.first) && IsFinite (m_CachedRange.second)"
    There's no callstack.
    It is not in our code.

    Where is this error coming from and what is the appropriate cause of action?
     
  2. Alex-Lian

    Alex-Lian

    Guest

    It's in the animationclip::getrange function under the covers.
    Asking the animation team to come look.
     
  3. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    This is almost always caused by an animation clip that has invalid (NaN) keyframes. In all the cases I've seen, either there were additional curves that were invalid, or the FBX contained invalid information. We've been adding safeguards so that those get stripped, and you shouldn't see those errors.But If you are using the latest beta and you still see those, please file a bug with your file, post there number here, and we'll address this ASAP.
     
    Darkriver-Veda and dreinzy like this.
  4. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    432
    Thanks for the reply.
    Would it be possible to add more information to the error message to find out what asset is causing the problem? Our characters have a lot of animations so it's a bit hard to find which animation is buggy.
    We'll try regardless.
     
  5. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Even though it's logged as an error, this is not actually an error. This is a failed assertion. At this point in the code, we have very little information to offer.

    We could keep it for internal use only, but it's used as a last line of defense right now. If this happens (and it should never happen), your animation is not going to playback correctly.

    If our things were working correctly, you should already have (or have had) an error at import time.

    Odds are, this is a case that will warrant a new error, and more sanitizing at import time.
     
  6. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    Also, if you go through your animations clips, I think the previewer should generate this error, so it would be a fairly good way of identifying which file is causing this issue.

    Filtering files on t: AnimationClip, and clicking on them one by one should be the simplest.
     
  7. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    In my case i had a valid animation but on the wrong object so the animation did not find the correct parameter to modify and throw the error.
     
  8. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    If you still have the Animation file causing the error (with the curves causing the error intact), it would be nice if you could file a bug and paste the number here
     
  9. ProtonOne

    ProtonOne

    Joined:
    Mar 8, 2008
    Posts:
    406
    I submitted a bug with reproduction steps a couple months ago, it was closed as a duplicate, but it has a project where you can get this error with just 3 UGUI buttons sharing the same animation controller.

    Its bug 794993

    You need only 2 buttons to get the error in DX9 Editor mode, but you need 3 buttons in DX11 Editor mode.

    I just tested and it still happens in RC1

    So it seems that sharing animation controllers can cause this.
     
    Last edited: Jul 25, 2016
  10. Hyp-X

    Hyp-X

    Joined:
    Jun 24, 2015
    Posts:
    432
    Good to know. We tested all our assets but haven't found which one is bad...
    It would be good if the error message would include the name of the asset to blame.
     
  11. DavidGeoffroy

    DavidGeoffroy

    Unity Technologies

    Joined:
    Sep 9, 2014
    Posts:
    542
    >Its bug 794993
    Thanks, I'll look at it.

    >It would be good if the error message would include the name of the asset to blame.
    I agree. but at the point in the code where this error occurs, we don't have access to the name, or pretty much anything.
    We've been adding safeguards earlier in the code to give meaningful errors before this one happens, so in most cases you should get an informative message instead of this one.