Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Rigidbody2D has an invalid movement state index during remova (Unity 2019.1.0)

Discussion in 'Physics' started by massiveminiteam, May 8, 2019.

  1. massiveminiteam

    massiveminiteam

    Joined:
    Aug 28, 2018
    Posts:
    29
    Hi,

    we are receiving the error "Rigidbody2D has an invalid movement state index during removal" while playing in the editor.

    Has someone else the same problem and maybe a fix for it?

    Thanks
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,004
    First time I've seen that reported. It would be good if you could submit a bug report with a simple reproduction case so it can be looked at.
     
  3. Ziya

    Ziya

    Joined:
    Aug 30, 2013
    Posts:
    61
    First time I've seen that happened to me.
    It happened right after my first update from Unity 2018.3.8f1 (64-bit) to Unity 2019.1.9f1 (64-bit).

    I do have multiple components of Rigidbody2D set to:
    Body Type - Static
    Simulated - Checked
    Sleep State - Asleep

    It happens when I destroy gameObjects with Rigidbody2D.
     
    Last edited: Jul 10, 2019
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,004
    Unfortunately we've not seen a single bug report on this either.
     
  5. Romain-Macre

    Romain-Macre

    Joined:
    Dec 26, 2015
    Posts:
    5
    This bug happens for me in that scenario:
    - First, a RigidBody2D has its interpolation changed BY CODE, from RigidbodyInterpolation2D.Interpolate to RigidbodyInterpolation2D.None.
    - Then: Changing the scene (the RigidBody2D gets destroyed)

    Note: it looks like it doesn't matter which way the RigidbodyInterpolation2D is changed by code (from None to Interpolate, or the other way around). It then triggers the error about 30% of the time when restarting the scene.
     
    Last edited: Aug 2, 2019
  6. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,004
    I cannot duplicate this so would you mind creating a bug report and posting the case number so I can look at it? Either that or upload a test project here with reproduction instructions.

    I cannot fix what I cannot reproduce and there's been no bug reports so far.
     
    Last edited: Aug 2, 2019
  7. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,004
  8. Romain-Macre

    Romain-Macre

    Joined:
    Dec 26, 2015
    Posts:
    5
    I'm on 2019.1.7. Very weird, because that bug report says that 'Interpolation does not work when it is set during runtime', but for me it does work (apart from that error that is) and my version is older than the fixed version.
    I'll create a bug report. Thanks.
     
  9. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,004
    That's because the bug report titles submitted are often terrible descriptions of the actual issue.

    If you provide the case number I can take a look at it otherwise I might not see it for a fair while.
     
    Last edited: Aug 2, 2019
  10. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,004
    I just wanted to stop by again and reiterate that I've yet to see a bug report.
     
  11. j1mmie

    j1mmie

    Joined:
    Oct 31, 2013
    Posts:
    3
    Also seeing this after changing a Rigidbody2d's Interpolate mode to "Interpolate". Using Unity 2019.2.6f1

    https://i.imgur.com/YW14NgS.png

    Note that I've made this change in the EDITOR. Not changing programmatically at runtime.

    Will submit a bug report.
     
  12. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,004
    Could you please try 2019.3 to see if the issue persists there. It might be that the previously fixed bug above needs backporting.