Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Physx crash on Android only (Physics_CUSTOM_INTERNAL_CALL_CheckCapsule)

Discussion in 'Physics' started by Poopypoo, Jun 5, 2015.

  1. Poopypoo

    Poopypoo

    Joined:
    Apr 18, 2015
    Posts:
    18
    Hi,

    I have an app running on iOS and Android, but only on Android do I get a physx crash occasionally... running in editor is also fine. Any ideas what this might be? Its pretty hard to make a test project as the app is quite large and I'm not sure what's causing it.

    Thanks

    I/DEBUG ( 2854): #00 pc 00233a7c /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (CastFilter::preFilter(physx::pxFilterData const&, physx::pxShape const*, physx::pxRigidActor const*, physx::pxFlags<physx::pxHitFlag::Enum, unsigned short>&)+96)

    I/DEBUG ( 2854): #01 pc 00a2a2bc /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (MultiQueryCallback<physx::pxOverlapHit>::invoke(float&, physx::Sq::prunerPayload const*, unsigned int)+940)

    I/DEBUG ( 2854): #02 pc 00b9a494 /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (_ZN28BucketPrunerOverlapTraversalI16OBBAABBTest_SIMDLb0EEclERKN5physx2Sq16BucketPrunerCoreERKS0_RNS3_14PrunerCallbackERKNS2_9PxBounds3E.part.26+2260)

    I/DEBUG ( 2854): #03 pc 00b9fc58 /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (physx::Sq::BucketPrunerCore::eek:verlap(physx::Sq::ShapeData const&, physx::Sq::prunerCallback&) const+2844)

    I/DEBUG ( 2854): #04 pc 00b929b4 /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (physx::Sq::AABBPruner::eek:verlap(physx::Sq::ShapeData const&, physx::Sq::prunerCallback&) const+228)

    I/DEBUG ( 2854): #05 pc 00a2bdc0 /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (bool physx::NpSceneQueries::multiQuery<physx::pxOverlapHit>(physx::MultiQueryInput const&, physx::pxHitCallback<physx::pxOverlapHit>&, physx::pxFlags<physx::pxHitFlag::Enum, unsigned short>, physx::pxQueryCache const*, physx::pxQueryFilterData const&, physx::pxQueryFilterCallback*, physx::BatchQueryFilterData*) const+1728)

    I/DEBUG ( 2854): #06 pc 00a2bf90 /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (physx::NpSceneQueries::eek:verlap(physx::pxGeometry const&, physx::pxTransform const&, physx::pxHitCallback<physx::pxOverlapHit>&, physx::pxQueryFilterData const&, physx::pxQueryFilterCallback*) const+144)

    I/DEBUG ( 2854): #07 pc 00210c14 /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (PhysicsManager::CapsuleTest(Vector3f, Vector3f, float, int)+276)

    I/DEBUG ( 2854): #08 pc 00568fc8 /data/app/com.tf.aquatest06-1/lib/arm/libunity.so (Physics_CUSTOM_INTERNAL_CALL_CheckCapsule(Vector3f const&, Vector3f const&, float, int)+104)
     
  2. Poopypoo

    Poopypoo

    Joined:
    Apr 18, 2015
    Posts:
    18
    If I change the tests from capsule tests to line tests, everything works ok... so only capsule tests appear to be broken.
     
  3. DziDAI

    DziDAI

    Joined:
    Dec 6, 2012
    Posts:
    68
    Hi, I have this error to, only on Android!!! And only when using with CapsuleCollider (in my case it Character Controller)

    http://take.ms/vruI5

    Unity Team, how fix it???

    @MelvMay help us!!!
     
    Last edited: Jun 30, 2015
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,316
    Sorry, I work on 2D physics exclusively but I'll forward the post onto the 3D guys.
     
  5. MortenSkaaning

    MortenSkaaning

    Joined:
    Jan 16, 2015
    Posts:
    120
    Hi Poopypoo and DziDAI,

    It's quite hard to fix these errors without a reproduction scene...
    DziDAI, if your scene is small enough, please file a bug report with it, so we can get this fixed.

    Regards,
    Morten
     
  6. DziDAI

    DziDAI

    Joined:
    Dec 6, 2012
    Posts:
    68
    Hi @MortenSkaaning unfourtanately in my case it's a big project, and in my case we use OverlapSphere (capsule collider not main reason of these crashes)

    How I think, main reason it's DestroyObject and calling OverlapSphere in One Frame!
    We change DestoryObject to SetActive(false) and it looks crashes was gone!

    Anycase I will try to create a small repro project, if I got crashes I send bug report, if not I send a BIG bugreport ;)
     
  7. skok

    skok

    Joined:
    Jul 13, 2015
    Posts:
    6
    I'm having a similar problem right now. In my case CheckCapsule, which is only called from our AStarPathfinding plugin (assuming this is called from C#).

    Still on the problem, will update with the workaround / solution if I find it.

    Code (CSharp):
    1.  
    2. F/libc  ( 2241): Fatal signal 11 (SIGSEGV), code 2, fault addr 0x3a707264 in tid 2262 (UnityMain)
    3. W/libc  ( 2241): Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
    4. I/DEBUG  (  466): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    5. I/DEBUG  (  466): Build fingerprint: 'htc/htc_europe/htc_m8:5.0.1/LRX22C/448934.13:user/release-keys'
    6. I/DEBUG  (  466): Revision: '0'
    7. I/DEBUG  (  466): ABI: 'arm'
    8. I/DEBUG  (  466): pid: 2241, tid: 2262, name: UnityMain  >>> com.company.application <<<
    9. I/DEBUG  (  466): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x3a707264
    10. I/DEBUG  (  466):  r0 a06920b4  r1 00000008  r2 3a707261  r3 00000000
    11. I/DEBUG  (  466):  r4 a0692930  r5 00000002  r6 a0692b48  r7 00000037
    12. I/DEBUG  (  466):  r8 bd318ff0  r9 bb3fee00  sl 00000000  fp 00000000
    13. I/DEBUG  (  466):  ip a1a1ae60  sp a0692048  lr a12b4054  pc a12bee14  cpsr 200e0010
    14. I/DEBUG  (  466):
    15. I/DEBUG  (  466): backtrace:
    16. I/DEBUG  (  466):  #00 pc 00b2ce14  /data/app/com.company.application-1/lib/arm/libunity.so (MultiQueryCallback<physx::PxOverlapHit>::invoke(float&, physx::Sq::PrunerPayload const*, unsigned int)+808)
    17. I/DEBUG  (  466):  #01 pc 00c88f94  /data/app/com.company.application-1/lib/arm/libunity.so (_ZN28BucketPrunerOverlapTraversalI16OBBAABBTest_SIMDLb0EEclERKN5physx2Sq16BucketPrunerCoreERKS0_RNS3_14PrunerCallbackERKNS2_9PxBounds3E.part.26+2260)
    18. I/DEBUG  (  466):  #02 pc 00c8e758  /data/app/com.company.application-1/lib/arm/libunity.so (physx::Sq::BucketPrunerCore::overlap(physx::Sq::ShapeData const&, physx::Sq::PrunerCallback&) const+2844)
    19. I/DEBUG  (  466):  #03 pc 00c814b4  /data/app/com.company.application-1/lib/arm/libunity.so (physx::Sq::AABBPruner::overlap(physx::Sq::ShapeData const&, physx::Sq::PrunerCallback&) const+228)
    20. I/DEBUG  (  466):  #04 pc 00b2e4c0  /data/app/com.company.application-1/lib/arm/libunity.so (bool physx::NpSceneQueries::multiQuery<physx::PxOverlapHit>(physx::MultiQueryInput const&, physx::PxHitCallback<physx::PxOverlapHit>&, physx::PxFlags<physx::PxHitFlag::Enum, unsigned short>, physx::PxQueryCache const*, physx::PxQueryFilterData const&, physx::PxQueryFilterCallback*, physx::BatchQueryFilterData*) const+484)
    21. I/DEBUG  (  466):  #05 pc 00b2eb6c  /data/app/com.company.application-1/lib/arm/libunity.so (physx::NpSceneQueries::overlap(physx::PxGeometry const&, physx::PxTransform const&, physx::PxHitCallback<physx::PxOverlapHit>&, physx::PxQueryFilterData const&, physx::PxQueryFilterCallback*) const+144)
    22. I/DEBUG  (  466):  #06 pc 00285f5c  /data/app/com.company.application-1/lib/arm/libunity.so (Unity::PhysicsQuery::CapsuleTest(Vector3f, Vector3f, float, int, QueryTriggerInteraction)+316)
    23. I/DEBUG  (  466):  #07 pc 00285e14  /data/app/com.company.application-1/lib/arm/libunity.so (PhysicsManager::CapsuleTest(Vector3f, Vector3f, float, int, QueryTriggerInteraction)+80)
    24. I/DEBUG  (  466):  #08 pc 005d3ce8  /data/app/com.company.application-1/lib/arm/libunity.so (Physics_CUSTOM_INTERNAL_CALL_CheckCapsule(Vector3f const&, Vector3f const&, float, int, QueryTriggerInteraction)+200)
    25. I/DEBUG  (  466):  #09 pc 0000fec4  <unknown>
    26.  
     
  8. skok

    skok

    Joined:
    Jul 13, 2015
    Posts:
    6
    There were a few small mesh colliders on the gameobject that was removed and the one it was replaced with, in another layer (default). After removing them, the game stopped crashing..
     
  9. skok

    skok

    Joined:
    Jul 13, 2015
    Posts:
    6
    Those mesh colliders were inside of capsule colliders (some partially) that were on the same root gameobject. Only the capsule colliders were in the layer that was checked against.
     
  10. BrianND

    BrianND

    Joined:
    May 14, 2015
    Posts:
    79
    Hi I'm still getting this in 5.3.4p3 on Android only tested on a Galaxy sII and Experia z3. I tried replacing all overlap functions with standard radius checks using no physics. Could it be related to convex rigidbody mesh colliders? It happens at random times but I can always get a crash if I play my game long enough.
    Code (CSharp):
    1. Fatal signal 11 (SIGSEGV) at 0x7468677d (code=1), thread 5804 (UnityMain)
    2. .....
    3. I/DEBUG   ( 1833): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 7468677d
    4.  
    5. I/DEBUG   ( 1833):     r0 00000001  r1 52858e54  r2 53a65e2f  r3 62842110
    6. I/DEBUG   ( 1833):     r4 74686769  r5 54096268  r6 62b6ff00  r7 62842110
    7. I/DEBUG   ( 1833):     r8 5ca1ca40  r9 540957cc  sl 00000000  fp 00000000
    8. I/DEBUG   ( 1833):     ip 52ea23a4  sp 54095730  lr 52ea2420  pc 53a65e3e  cpsr 20000030
    9. I/DEBUG   ( 1833):     d0  3f800008358637f9  d1  00000000358637bd
    10. I/DEBUG   ( 1833):     d2  c0fc4408c0fc4408  d3  40017b404114ab21
    11. I/DEBUG   ( 1833):     d4  409dddec409dddec  d5  fe7ffffffe7fffff
    12. I/DEBUG   ( 1833):     d6  427938a9427938a9  d7  fe7ffffffe7fffff
    13. I/DEBUG   ( 1833):     d8  00000000bf800000  d9  0000000000000000
    14. I/DEBUG   ( 1833):     d10 0000000000000000  d11 0000000000000000
    15. I/DEBUG   ( 1833):     d12 0000000000000000  d13 0000000000000000
    16. I/DEBUG   ( 1833):     d14 0000000000000000  d15 0000000000000000
    17. I/DEBUG   ( 1833):     d16 0000000000000000  d17 0000000000000000
    18. I/DEBUG   ( 1833):     d18 358637bd36808df7  d19 000000003f800008
    19. I/DEBUG   ( 1833):     d20 a332200f363e0010  d21 00000000bf800000
    20. I/DEBUG   ( 1833):     d22 3f8000002cf00000  d23 000000002332200f
    21. I/DEBUG   ( 1833):     d24 0000000000000000  d25 0000000000000000
    22. I/DEBUG   ( 1833):     d26 409dddecc229996c  d27 00000000c27938c8
    23. I/DEBUG   ( 1833):     d28 3bc1c4002935a7c0  d29 000000001f86d28c
    24. I/DEBUG   ( 1833):     d30 c1874f1dc0579492  d31 80000000b7fa235c
    25. I/DEBUG   ( 1833):     scr 8000009f
    26. I/DEBUG   ( 1833):
    27. I/DEBUG   ( 1833): backtrace:
    28. ......
    29. (CastFilter::preFilter(physx::pxFilterData const&, physx::pxShape const*, physx::pxRigidActor const*, physx::pxFlags<physx::pxHitFlag::Enum, unsigned short>&)+120)
    30. ....
    31. 54095744  53ca33bc  /data/data/.../lib/libunity.so
    32. I/DEBUG   ( 1833):          54095748  54096048
    33. I/DEBUG   ( 1833):          5409574c  00000002
    34. I/DEBUG   ( 1833):          54095750  54096268
    35. I/DEBUG   ( 1833):          54095754  00000037
    36. I/DEBUG   ( 1833):          54095758  00000000
    37. I/DEBUG   ( 1833):          5409575c  53731adc
    38. /...../lib/libunity.so (MultiQueryCallback<physx::pxOverlapHit>::invoke(float&, physx::Sq::prunerPayload const*, unsigned int)+944)
     
    Last edited: May 2, 2016
  11. MortenSkaaning

    MortenSkaaning

    Joined:
    Jan 16, 2015
    Posts:
    120
    @BrianND thanks, you should really submit a bugreport with a reproduction and then post the bug id here, otherwise the chances are very slim that we'll get to look at it.
     
  12. BrianND

    BrianND

    Joined:
    May 14, 2015
    Posts:
    79
    I'll try to submit a project. It's just hard to reproduce unless you play the game for a long time.
     
  13. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    I have had the same problem with Invert.

    Its only sporadic though (those are the worst kind of bugs), so hard to reproduce consistently.
     
  14. byerdelen

    byerdelen

    Joined:
    Mar 27, 2010
    Posts:
    68
    Hi,
    I couldn't find any bug reporting about this issue. This is indeed a bug.

    I have experienced the bug while calling :
    Code (CSharp):
    1. Collider[] colliders = Physics.OverlapSphere(transform.position, radius);
    And Android debugging consistently giving me :
    (MultiQueryCallback<physx::pxOverlapHit>::invoke(float&, physx::Sq::prunerPayload const*, unsigned int)+944)

    This happens all the time sooner or later when I call it around 100 times inside the game (Different frames each)

    Mutliquery should be giving some hints about the problem here maybe but I have no educated guess even.

    By the way, it doesn't crash, give warning or even doesn't slow down on IOS, Webgl, Mac builds. It is just Android.

    It happens on 5.3.4p5,5.3.4p6,5.4b17 as I have tested on them only.

    Has anybody sent a bug report?
     
  15. BrianND

    BrianND

    Joined:
    May 14, 2015
    Posts:
    79
    I've submitted a bug but I can't reliably create a case that can be reproduced. It seems to also happen when randomly hitting physics colliders.
     
  16. BrianND

    BrianND

    Joined:
    May 14, 2015
    Posts:
    79
    still getting this on 5.3.6f1
    Code (CSharp):
    1. 002b2648  /data/app-lib/.../libunity.so (CastFilter::preFilter(physx::pxFilterData const&, physx::pxShape const*, physx::pxRigidActor const*, physx::pxFlags<physx::pxHitFlag::Enum, unsigned short>&)+52)
    2.  
    3. I/DEBUG   ( 4613):     #02  pc 00b4e088  /data/app-lib/com.game-3/libunity.so (MultiQueryCallback<physx::pxOverlapHit>::invoke(float&, physx::Sq::prunerPayload const*, unsigned int)+940)
    4.  
    5. I/DEBUG   ( 4613):     #03  pc 00caa17c  /data/app-lib/com.game-3/libunity.so (_ZN28BucketPrunerOverlapTraversalI16OBBAABBTest_SIMDLb0EEclERKN5physx2Sq16BucketPrunerCoreERKS0_RNS3_14PrunerCallbackERKNS2_9PxBounds3E.part.26+2260)
    6.  
    7. I/DEBUG   ( 4613):     #04  pc 00caf940  /data/app-lib/com.game-3/libunity.so (physx::Sq::BucketPrunerCore::eek:verlap(physx::Sq::ShapeData const&, physx::Sq::prunerCallback&) const+2844)
    8.  
    9. I/DEBUG   ( 4613):     #05  pc 00ca269c  /data/app-lib/com.game-3/libunity.so (physx::Sq::AABBPruner::eek:verlap(physx::Sq::ShapeData const&, physx::Sq::prunerCallback&) const+228)
    10.  
    11. I/DEBUG   ( 4613):     #06  pc 00b4fb8c  /data/app-lib/com.game-3/libunity.so (bool physx::NpSceneQueries::multiQuery<physx::pxOverlapHit>(physx::MultiQueryInput const&, physx::pxHitCallback<physx::pxOverlapHit>&, physx::pxFlags<physx::pxHitFlag::Enum, unsigned short>, physx::pxQueryCache const*, physx::pxQueryFilterData const&, physx::pxQueryFilterCallback*, physx::BatchQueryFilterData*) const+1728)
    12.  
    13. I/DEBUG   ( 4613):     #07  pc 00b4fd5c  /data/app-lib/com.game-3/libunity.so (physx::NpSceneQueries::eek:verlap(physx::pxGeometry const&, physx::pxTransform const&, physx::pxHitCallback<physx::pxOverlapHit>&, physx::pxQueryFilterData const&, physx::pxQueryFilterCallback*) const+144)
    14.  
    15. I/DEBUG   ( 4613):     #08  pc 0028b678  /data/app-lib/com.game-3/libunity.so (Unity::physicsQuery::BoxTest(Vector3f const&, Vector3f const&, Quaternionf const&, int, QueryTriggerInteraction)+340)
    16.  
    17. I/DEBUG   ( 4613):     #09  pc 005e73dc  /data/app-lib/com.game-3/libunity.so (Physics_CUSTOM_INTERNAL_CALL_CheckBox(Vector3f const&, Vector3f const&, Quaternionf const&, int, QueryTriggerInteraction)+152)
    18.  
    19.  
    20.  
    21. I/DEBUG   ( 4613):     #10  pc 0000da7c  <unknown>
     
  17. BrianND

    BrianND

    Joined:
    May 14, 2015
    Posts:
    79