Search Unity

pair.actors Error

Discussion in 'Editor & General Support' started by erudisill, Oct 4, 2010.

  1. erudisill

    erudisill

    Joined:
    Oct 4, 2010
    Posts:
    4
    I recently upgraded my 2.6 project to 3.0, and now I am receiving the following messages when playing an animation on one of my models. The animation was created in 2.6 using the Animation View. Does anyone know what could be causing this, and if so, how to fix it? I'd rather not delete the animation and recreate it - its for a spider, and it was tedious enough the first time! ;)

    Thanks!
    -Eric

    (Messages pulled from Editor log)


    pair.actors[0]->getNbShapes() == 0

    (Filename: ..\..\Runtime\Dynamics\PhysicsManager.cpp Line: 227)

    pair.actors[1]->getNbShapes() == 0

    (Filename: ..\..\Runtime\Dynamics\PhysicsManager.cpp Line: 230)
     
  2. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    173
    Im getting this when I'm destroying meshes too :)
     
  3. shawn

    shawn

    Unity Technologies

    Joined:
    Aug 4, 2007
    Posts:
    552
    If you haven't already!

    @erudisill: Please report a bug with the assets attached that are causing this assert.

    @Reapazor: Please report a bug with a repro case.
     
  4. erudisill

    erudisill

    Joined:
    Oct 4, 2010
    Posts:
    4
    Shawn,

    I've filed a bug report and attached a package that will reproduce the issue. It doesn't have anything to do with animations as I originally suspected. Rather, it is related to Destroy() called on Colliders that have Rigidbodies attached as well as OnCollision handlers. If I comment all of the OnCollision handlers out, the error goes away; but with just one handler active, the error presents itself.

    My goal is to just have the enemies become transparent to physics upon death, so I was cycling through the child colliders and calling Destroy() on each one. I'll try just turning isTrigger on to see if I that gives me what I want, or perhaps moving the object to a specialized "collide with nothing" layer will do the trick.

    Thanks!

    -Eric
     
  5. Reapazor

    Reapazor

    Joined:
    Jun 19, 2008
    Posts:
    173
    I definitely can easily reproduce this by removing a MeshCollider while its in use. I'll see about putting together a repro bug case for u.
     
  6. Razieln64

    Razieln64

    Joined:
    May 3, 2008
    Posts:
    129
    I have the same problem here. I always get the assert message when I destroy a collider. And I also use it for making my character immune to collisions when a level has been completed.

    Since upgrading from 2.6 to 3.0, I've had some troubles with imported animations crashing or imported scenes having corrupt gameObjects once. Some other crashes occurred which I thought were linked to this, but it seems it's the pair.actors[0] error that's the culprit, because 50% of the time my game crashes, not always. It happens when the log wants to display the error (at the bottom of the screen). I tried commenting Destroy(collider) and it didn't crash anymore! If I can't destroy colliders anymore I'll have to modify a big chunk of code since I heavily rely on this for my game to work.
     
    Last edited: Oct 13, 2010
  7. Django

    Django

    Joined:
    Nov 25, 2008
    Posts:
    120
    Hello,

    I have the same issue. It was working fine in 2.6 but now in 3.0 it gives this error and crashes the game. Please fix it !

    Thank you,

    Django
     
  8. Razieln64

    Razieln64

    Joined:
    May 3, 2008
    Posts:
    129
    Hey guys, why not make use of Unity 3's new layer-based collision detection? Just create a custom layer that doesn't collide with anything. Instead of destroying the collider creating the error, change its layer to the custom one you just created. The error won't appear and your game should run more smoothly if you make the right matches between the layers you want to collide. At first I was using tags to detect collisions with specific objects, but with the new layer-based collision system it was easier to set up which collisions are allowed and my game runs much more smoother.

    Here's the documentation link:
    http://unity3d.com/support/documentation/Components/Layer Based Collision detection.html
     
  9. scinfu

    scinfu

    Joined:
    Oct 23, 2008
    Posts:
    404
    there is other solutions ?

    i have the same issue and i can not change all my cades
     
  10. Deleted User

    Deleted User

    Guest

    The workaround I'm using is to just set isTrigger to true. Not the best solution but it will stop the collider from interfering with other objects and won't cause an error.
     
  11. SEG-Veenstra

    SEG-Veenstra

    Joined:
    Sep 3, 2010
    Posts:
    326
    I just had the same problem. I found out that I wanted to destroy Components that were already destroyed I think.