Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

[Solved: Unfixable BUG] Random crashes within OverlapBox on android.

Discussion in 'Physics' started by neginfinity, Jun 13, 2016.

  1. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    5,994
    I'm experiencing random crashes on Android which seem to originate from OverlapBox call.
    For example:
    Code (csharp):
    1.  
    2. I/DEBUG   (  106):     r0 5fae850c  r1 6e3e0610  r2 00000000  r3 65f9d260
    3. I/DEBUG   (  106):     r4 5fae8ffc  r5 5fae8fe8  r6 6e3e0610  r7 65f9d260
    4. I/DEBUG   (  106):     r8 682939d8  r9 5fae8594  sl 00000000  fp 00000000
    5. I/DEBUG   (  106):     ip 5e902c14  sp 5fae84f8  lr 5e902c4c  pc 00000000  cpsr 28000010
    6. I/DEBUG   (  106):     d0  404ccccc3c8a7d38  d1  3ea8fa603fa020e4
    7. I/DEBUG   (  106):     d2  bf7f561236734b39  d3  3ec307c0337f5612
    8. I/DEBUG   (  106):     d4  3f8a25183f8a2518  d5  fe7ffffffe7fffff
    9. I/DEBUG   (  106):     d6  c092a999c092a999  d7  fe7ffffffe7fffff
    10. I/DEBUG   (  106):     d8  00000000bf800000  d9  0000000000000000
    11. I/DEBUG   (  106):     d10 0000000000000000  d11 0000000000000000
    12. I/DEBUG   (  106):     d12 0000000000000000  d13 0000000000000000
    13. I/DEBUG   (  106):     d14 0000000000000000  d15 0000000000000000
    14. I/DEBUG   (  106):     d16 0000000000000000  d17 0000000000000000
    15. I/DEBUG   (  106):     d18 358e37bd3f7f5626  d19 000000003d936226
    16. I/DEBUG   (  106):     d20 337ffffbbf7f5615  d21 000000003d9361a0
    17. I/DEBUG   (  106):     d22 3f800000337f5612  d23 00000000b1936108
    18. I/DEBUG   (  106):     d24 0000000000000000  d25 0000000000000000
    19. I/DEBUG   (  106):     d26 3f8a2516408df1ab  d27 00000000c00d5cf8
    20. I/DEBUG   (  106):     d28 a99800003d9361a0  d29 000000003f7f5615
    21. I/DEBUG   (  106):     d30 c04ff7d8bdbb7732  d31 80000000bfa26213
    22. I/DEBUG   (  106):     scr 8000009b
    23. I/DEBUG   (  106):
    24. I/DEBUG   (  106): backtrace:
    25. I/DEBUG   (  106):     #00  pc 00000000  <unknown>
    26. I/DEBUG   (  106):     #01  pc 002aec48  /mnt/asec/<redacted>/lib/libunity.so (CastFilter::preFilter(physx::PxFilterData const&, physx::PxShape const*, physx::PxRigidActor const*, physx::PxFlags<physx::PxHitFlag::Enum, unsigned short>&)+52)
    27. I/DEBUG   (  106):     #02  pc 00b31c28  /mnt/asec/<redacted>/lib/libunity.so (MultiQueryCallback<physx::PxOverlapHit>::invoke(float&, physx::Sq::PrunerPayload const*, unsigned int)+940)
    28. I/DEBUG   (  106):     #03  pc 00c8dd24  /mnt/asec/<redacted>/lib/libunity.so (_ZN28BucketPrunerOverlapTraversalI16OBBAABBTest_SIMDLb0EEclERKN5physx2Sq16BucketPrunerCoreERKS0_RNS3_14PrunerCallbackERKNS2_9PxBounds3E.part.26+2260)
    29. I/DEBUG   (  106):     #04  pc 00c934e8  /mnt/asec/<redacted>/lib/libunity.so (physx::Sq::BucketPrunerCore::overlap(physx::Sq::ShapeData const&, physx::Sq::PrunerCallback&) const+2844)
    30. I/DEBUG   (  106):     #05  pc 00c86244  /mnt/asec/<redacted>/lib/libunity.so (physx::Sq::AABBPruner::overlap(physx::Sq::ShapeData const&, physx::Sq::PrunerCallback&) const+228)
    31. I/DEBUG   (  106):     #06  pc 00b3372c  /mnt/asec/<redacted>/lib/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)
    32. I/DEBUG   (  106):     #07  pc 00b338fc  /mnt/asec/<redacted>/lib/libunity.so (physx::NpSceneQueries::overlap(physx::PxGeometry const&, physx::PxTransform const&, physx::PxHitCallback<physx::PxOverlapHit>&, physx::PxQueryFilterData const&, physx::PxQueryFilterCallback*) const+144)
    33. I/DEBUG   (  106):     #08  pc 002959b8  /mnt/asec/<redacted>/lib/libunity.so (Unity::PhysicsQuery::OverlapBoxInternal(Vector3f const&, Vector3f const&, Quaternionf const&, int, QueryTriggerInteraction, physx::PxHitCallback<physx::PxOverlapHit>&)+260)
    34. I/DEBUG   (  106):     #09  pc 00287f28  /mnt/asec/<redacted>/lib/libunity.so (PhysicsManager::OverlapBox(Vector3f const&, Vector3f const&, Quaternionf const&, int, QueryTriggerInteraction)+156)
    35. I/DEBUG   (  106):     #10  pc 005d6e18  /mnt/asec/<redacted>/lib/libunity.so (Physics_CUSTOM_INTERNAL_CALL_OverlapBox(Vector3f const&, Vector3f const&, Quaternionf const&, int, QueryTriggerInteraction)+152)
    36.  

    I'm investigating the issue at the moment, but has anyone else experienced this kind of problem?

    The issue is random and cannot be reliably reproduced.

    Unity version 5.3.3f1
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    5,994
    Alright. Despite my attempts to eliminate every possible cause of the issue, and implementing object pooling, the problem refuses to disappear. After multiple calls to physics.OverlapBox, application eventually gets killed by SIGSEGV, SEGV_MAPERR, with stacktrace within libunity.so which originates from one of OverlapBox call. No matter what I do, how I do, it just unavoidably dies.

    So I'll assume it is a unity bug that only manifests itself on android.

    The only remaining workaround for this is replacing physx overlapbox collision queries.with custom collision system.

    (sarcasm)Yay(/sarcasm).
     
  3. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    384
    I'm already made a game for Android/IPhone and WPhone. Android was the most convenient, WPhone was painful.

    1. At first, connect with adb and put that output inside this forum. (The last lines, not all the dump :) )
    2. The biggest problem was the memory allocation, Android with 500MB RAM just allow allocating max 180MB. If you are on the limit, crashes happens.
    3. Custom ROMs are not supported, however this was never a problem for my custom ROMs.

    #00 pc 00000000 <unknown>

    Seems to be a null pointer access, could be caused by not getting more RAM from the OS.
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    5,994
    What specifically are you looking for? Because I have dozen of crashlogs 1 Mb each with loads debug data printed in them. There's no discernable event before the crash, except that ALL the crashes happen within "overlap box".

    Code (csharp):
    1.  
    2. D/dalvikvm( 9926): GC_CONCURRENT freed 1333K, 37% free 5843K/9196K, paused 1ms+18ms, total 58ms
    3. D/dalvikvm( 9926): GC_CONCURRENT freed 313K, 35% free 6011K/9196K, paused 5ms+2ms, total 45ms
    4. E/dalvikvm( 9926): adjustAdaptiveCoef max=4194304, min=1048576, ut=568
    5. D/dalvikvm( 9926): GC_CONCURRENT freed 306K, 33% free 6216K/9196K, paused 7ms+34ms, total 107ms
    6. D/dalvikvm( 9926): WAIT_FOR_CONCURRENT_GC blocked 3ms
    7. D/dalvikvm(19181): GC_CONCURRENT freed 457K, 28% free 6712K/9220K, paused 33ms+2ms, total 180ms
    8. D/dalvikvm(24013): GC_CONCURRENT freed 512K, 29% free 7215K/10036K, paused 45ms+13ms, total 421ms
    9. D/dalvikvm(24013): GC_CONCURRENT freed 435K, 28% free 7254K/10036K, paused 7ms+6ms, total 108ms
    10. D/dalvikvm(24013): GC_CONCURRENT freed 458K, 28% free 7313K/10036K, paused 10ms+3ms, total 100ms
    11. D/dalvikvm(24013): GC_CONCURRENT freed 547K, 28% free 7278K/10036K, paused 12ms+48ms, total 130ms
    12. I/ActivityManager(  499): Process com.sec.android.daemonapp (pid 9708) (adj 13) has died.
    13. I/ActivityManager(  499): Process com.droid27.senseflipclockweather (pid 9858) (adj 11) has died.
    14. I/ActivityManager(  499): Process com.android.providers.calendar (pid 9250) (adj 13) has died.
    15. D/dalvikvm(24013): GC_CONCURRENT freed 495K, 27% free 7370K/10036K, paused 9ms+19ms, total 132ms
    16. D/dalvikvm(24013): GC_CONCURRENT freed 561K, 27% free 7380K/10036K, paused 8ms+12ms, total 137ms
    17. I/ActivityManager(  499): Process com.sec.spp.push:RemoteDlcProcess (pid 9899) (adj 13) has died.
    18. I/ActivityManager(  499): Process com.bellshare.beweatherfree (pid 9838) (adj 11) has died.
    19. I/ActivityManager(  499): Process android.process.media (pid 9942) (adj 11) has died.
    20. D/dalvikvm(24013): GC_CONCURRENT freed 621K, 28% free 7296K/10036K, paused 22ms+11ms, total 97ms
    21. D/dalvikvm( 2996): GC_CONCURRENT freed 2108K, 32% free 19796K/28968K, paused 6ms+8ms, total 146ms
    22. D/dalvikvm(  905): GC_CONCURRENT freed 277K, 33% free 6095K/9048K, paused 4ms+10ms, total 200ms
    23. D/dalvikvm( 1361): GC_CONCURRENT freed 1482K, 36% free 10124K/15796K, paused 18ms+9ms, total 159ms
    24. D/dalvikvm(19181): GC_CONCURRENT freed 413K, 28% free 6715K/9240K, paused 5ms+2ms, total 45ms
    25. D/dalvikvm(  499): GC_EXPLICIT freed 1264K, 21% free 29444K/36928K, paused 10ms+38ms, total 395ms
    26. D/dalvikvm(10165): Late-enabling CheckJNI
    27. D/dalvikvm(10165): GC_CONCURRENT freed 671K, 32% free 5759K/8452K, paused 6ms+9ms, total 48ms
    28. D/dalvikvm(10184): Late-enabling CheckJNI
    29. I/dalvikvm(10184): Turning on JNI app bug workarounds for target SDK version 12...
    30. I/dalvikvm(10184): Could not find method android.view.Display.getState, referenced from method com.droid27.senseflipclockweather.e.a
    31. W/dalvikvm(10184): VFY: unable to resolve virtual method 14397: Landroid/view/Display;.getState ()I
    32. D/dalvikvm(10184): VFY: replacing opcode 0x6e at 0x001a
    33. I/dalvikvm(10184): Could not find method android.app.AlarmManager.setExactAndAllowWhileIdle, referenced from method com.droid27.senseflipclockweather.receivers.a.a
    34. W/dalvikvm(10184): VFY: unable to resolve virtual method 144: Landroid/app/AlarmManager;.setExactAndAllowWhileIdle (IJLandroid/app/PendingIntent;)V
    35. D/dalvikvm(10184): VFY: replacing opcode 0x6e at 0x0081
    36. D/dalvikvm(10184): GC_CONCURRENT freed 671K, 32% free 5799K/8492K, paused 7ms+3ms, total 80ms
    37. I/dalvikvm(10184): Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
    38. W/dalvikvm(10184): VFY: unable to resolve virtual method 291: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
    39. D/dalvikvm(10184): VFY: replacing opcode 0x6e at 0x00c8
    40. I/dalvikvm(10184): DexOpt: access denied from Lcom/google/android/gms/common/GooglePlayServicesUtil; to field Landroid/app/Notification;.extras
    41. W/dalvikvm(10184): VFY: unable to resolve instance field 34
    42. D/dalvikvm(10184): VFY: replacing opcode 0x54 at 0x00e7
    43. I/dalvikvm(10184): Could not find method android.os.UserManager.getApplicationRestrictions, referenced from method com.google.android.gms.common.zze.zzaq
    44. W/dalvikvm(10184): VFY: unable to resolve virtual method 1657: Landroid/os/UserManager;.getApplicationRestrictions (Ljava/lang/String;)Landroid/os/Bundle;
    45. D/dalvikvm(10184): VFY: replacing opcode 0x6e at 0x0012
    46. E/dalvikvm(10184): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.zze.zzb
    47. W/dalvikvm(10184): VFY: unable to resolve check-cast 32 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/zze;
    48. D/dalvikvm(10184): VFY: replacing opcode 0x1f at 0x000e
    49. I/dalvikvm(10184): Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.zze.zzi
    50. W/dalvikvm(10184): VFY: unable to resolve virtual method 607: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
    51. D/dalvikvm(10184): VFY: replacing opcode 0x6e at 0x000b
    52. I/dalvikvm(10184): Could not find method android.app.AlarmManager.getNextAlarmClock, referenced from method com.droid27.senseflipclockweather.d.a
    53. W/dalvikvm(10184): VFY: unable to resolve virtual method 143: Landroid/app/AlarmManager;.getNextAlarmClock ()Landroid/app/AlarmManager$AlarmClockInfo;
    54. D/dalvikvm(10184): VFY: replacing opcode 0x6e at 0x0719
    55. D/dalvikvm(10184): GC_CONCURRENT freed 453K, 33% free 5746K/8492K, paused 7ms+11ms, total 66ms
    56. D/dalvikvm(10184): GC_CONCURRENT freed 243K, 31% free 5891K/8492K, paused 3ms+4ms, total 35ms
    57. I/DEBUG   (  109): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    58. I/DEBUG   (  109): Build fingerprint: 'samsung/espressorfxx/espressorf:4.2.2/JDQ39/P3100XWDMK1:user/release-keys'
    59. I/DEBUG   (  109): Revision: '10'
    60. I/DEBUG   (  109): pid: 7485, tid: 7513, name: UnityMain  >>> <redacted> <<<
    61. I/DEBUG   (  109): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
    62. I/ActivityManager(  499): Process com.sec.android.app.keyguard (pid 9808) (adj 9) has died.
    63. I/ActivityManager(  499): Process com.bellshare.beweatherfree (pid 10165) (adj 11) has died.
    64. I/ActivityManager(  499): Process com.droid27.senseflipclockweather (pid 10184) (adj 13) has died.
    65. I/DEBUG   (  109):     r0 5fb49c68  r1 6608bc20  r2 5f1c36d0  r3 00000000
    66. I/DEBUG   (  109):     r4 5fb4a6e4  r5 5fb4a6d0  r6 6608bc20  r7 670fd670
    67. I/DEBUG   (  109):     r8 65115788  r9 5fb49c7c  sl 00000000  fp 00000000
    68. I/DEBUG   (  109):     ip 5e952c74  sp 5fb49bd8  lr 5f1c36e4  pc 00000000  cpsr 28000010
    69. I/DEBUG   (  109):     d0  3f80000936393df6  d1  00000000358637c4
    70. I/DEBUG   (  109):     d2  bf8e06c2bf8e06c2  d3  3c257e00f5454086
    71. I/DEBUG   (  109):     d4  bf9d9163bf9d9163  d5  fe7ffffffe7fffff
    72. I/DEBUG   (  109):     d6  bf8e06c2bf8e06c2  d7  fe7ffffffe7fffff
    73. I/DEBUG   (  109):     d8  00000000bf800000  d9  0000000000000000
    74. I/DEBUG   (  109):     d10 0000000000000000  d11 0000000000000000
    75. I/DEBUG   (  109):     d12 0000000000000000  d13 0000000000000000
    76. I/DEBUG   (  109):     d14 0000000000000000  d15 0000000000000000
    77. I/DEBUG   (  109):     d16 0000000000000000  d17 0000000000000000
    78. I/DEBUG   (  109):     d18 36393df63f800008  d19 0000000035c637c4
    79. I/DEBUG   (  109):     d20 35ec442ebf800000  d21 00000000b500000e
    80. I/DEBUG   (  109):     d22 bf800001b5ec442e  d23 00000000ab500000
    81. I/DEBUG   (  109):     d24 0000000000000000  d25 0000000000000000
    82. I/DEBUG   (  109):     d26 3f9d91543f8e06cb  d27 80000000403faebc
    83. I/DEBUG   (  109):     d28 2980000034c00000  d29 00000000bf800000
    84. I/DEBUG   (  109):     d30 754540a16c54eec8  d31 800000007545409f
    85. I/DEBUG   (  109):     scr 8000009f
    86. I/DEBUG   (  109):
    87. I/DEBUG   (  109): backtrace:
    88. I/DEBUG   (  109):     #00  pc 00000000  <unknown>
    89. I/DEBUG   (  109):     #01  pc 00b216e0  /mnt/asec/<redacted>-1/lib/libunity.so (physx::Ext::Joint<physx::PxD6Joint, physx::PxD6JointGeneratedValues>::getBreakForce(float&, float&) const+16)
    90. I/DEBUG   (  109):     #02  pc 002b0ca8  /mnt/asec/<redacted>-1/lib/libunity.so (CastFilter::preFilter(physx::PxFilterData const&, physx::PxShape const*, physx::PxRigidActor const*, physx::PxFlags<physx::PxHitFlag::Enum, unsigned short>&)+52)
    91. I/DEBUG   (  109):     #03  pc 00b44a98  /mnt/asec/<redacted>-1/lib/libunity.so (MultiQueryCallback<physx::PxOverlapHit>::invoke(float&, physx::Sq::PrunerPayload const*, unsigned int)+940)
    92. I/DEBUG   (  109):     #04  pc 00ca0b8c  /mnt/asec/<redacted>-1/lib/libunity.so (_ZN28BucketPrunerOverlapTraversalI16OBBAABBTest_SIMDLb0EEclERKN5physx2Sq16BucketPrunerCoreERKS0_RNS3_14PrunerCallbackERKNS2_9PxBounds3E.part.26+2260)
    93. I/DEBUG   (  109):     #05  pc 00ca6350  /mnt/asec/<redacted>-1/lib/libunity.so (physx::Sq::BucketPrunerCore::overlap(physx::Sq::ShapeData const&, physx::Sq::PrunerCallback&) const+2844)
    94. I/DEBUG   (  109):     #06  pc 00c990ac  /mnt/asec/<redacted>-1/lib/libunity.so (physx::Sq::AABBPruner::overlap(physx::Sq::ShapeData const&, physx::Sq::PrunerCallback&) const+228)
    95. I/DEBUG   (  109):     #07  pc 00b4659c  /mnt/asec/<redacted>-1/lib/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)
    96. I/DEBUG   (  109):     #08  pc 00b4676c  /mnt/asec/<redacted>-1/lib/libunity.so (physx::NpSceneQueries::overlap(physx::PxGeometry const&, physx::PxTransform const&, physx::PxHitCallback<physx::PxOverlapHit>&, physx::PxQueryFilterData const&, physx::PxQueryFilterCallback*) const+144)
    97. I/DEBUG   (  109):     #09  pc 00297a18  /mnt/asec/<redacted>-1/lib/libunity.so (Unity::PhysicsQuery::OverlapBoxInternal(Vector3f const&, Vector3f const&, Quaternionf const&, int, QueryTriggerInteraction, physx::PxHitCallback<physx::PxOverlapHit>&)+260)
    98. I/DEBUG   (  109):     #10  pc 00289e60  /mnt/asec/<redacted>-1/lib/libunity.so (PhysicsManager::OverlapBoxNonAlloc(Vector3f const&, Vector3f const&, Quaternionf const&, Collider**, int, int, QueryTriggerInteraction)+160)
    99. I/DEBUG   (  109):     #11  pc 005e3c18  /mnt/asec/<redacted>-1/lib/libunity.so (Physics_CUSTOM_INTERNAL_CALL_OverlapBoxNonAlloc(Vector3f const&, Vector3f const&, MonoArray*, Quaternionf const&, int, QueryTriggerInteraction)+204)
    100. I/DEBUG   (  109):     #12  pc 0000caec  <unknown>
    101. I/DEBUG   (  109):
    102. I/DEBUG   (  109): stack:
    103. I/DEBUG   (  109):          5fb49b98  00000000  
    104. I/DEBUG   (  109):          5fb49b9c  00000000  
    105. I/DEBUG   (  109):          5fb49ba0  00000000  
    106. I/DEBUG   (  109):          5fb49ba4  00000000  
    107. I/DEBUG   (  109):          5fb49ba8  00000000  
    108. I/DEBUG   (  109):          5fb49bac  00000000  
    109. I/DEBUG   (  109):          5fb49bb0  00000000  
    110. I/DEBUG   (  109):          5fb49bb4  00000000  
    111. I/DEBUG   (  109):          5fb49bb8  00000000  
    112. I/DEBUG   (  109):          5fb49bbc  00000000  
    113. I/DEBUG   (  109):          5fb49bc0  00000000  
    114. I/DEBUG   (  109):          5fb49bc4  00000000  
    115. I/DEBUG   (  109):          5fb49bc8  00000000  
    116. I/DEBUG   (  109):          5fb49bcc  00000000  
    117. I/DEBUG   (  109):          5fb49bd0  df0027ad  
    118. I/DEBUG   (  109):          5fb49bd4  00000000  
    119. I/DEBUG   (  109):     #00  5fb49bd8  670fd670  
    120. I/DEBUG   (  109):          ........  ........
    121. I/DEBUG   (  109):     #01  5fb49bd8  670fd670  
    122. I/DEBUG   (  109):          5fb49bdc  5e952cac  /mnt/asec/<redacted>-1/lib/libunity.so (CastFilter::preFilter(physx::PxFilterData const&, physx::PxShape const*, physx::PxRigidActor const*, physx::PxFlags<physx::PxHitFlag::Enum, unsigned short>&)+56)
    123. I/DEBUG   (  109):     #02  5fb49be0  00000000  
    124. I/DEBUG   (  109):          5fb49be4  00000000  
    125. I/DEBUG   (  109):          5fb49be8  00000000  
    126. I/DEBUG   (  109):          5fb49bec  00000000  
    127. I/DEBUG   (  109):          5fb49bf0  00000000  
    128. I/DEBUG   (  109):          5fb49bf4  00000000  
    129. I/DEBUG   (  109):          5fb49bf8  5fb4a4f8  
    130. I/DEBUG   (  109):          5fb49bfc  00000001  
    131. I/DEBUG   (  109):          5fb49c00  5fb4a6d0  
    132. I/DEBUG   (  109):          5fb49c04  00000007  
    133. I/DEBUG   (  109):          5fb49c08  00000000  
    134. I/DEBUG   (  109):          5fb49c0c  5f1e6a9c  /mnt/asec/<redacted>-1/lib/libunity.so (MultiQueryCallback<physx::PxOverlapHit>::invoke(float&, physx::Sq::PrunerPayload const*, unsigned int)+944)
    135. I/DEBUG   (  109):
    136. I/DEBUG   (  109): memory near r0:
    137. I/DEBUG   (  109):     5fb49c48 5fb4a6e4 5fb49c7c 00000000 5f77a594  
    138. I/DEBUG   (  109):     5fb49c58 00000000 00000000 ffffffff 00000000  
    139. I/DEBUG   (  109):     5fb49c68 670fd670 6608bc20 6608bc40 670fd6a0  
    140. I/DEBUG   (  109):     5fb49c78 00000000 00000000 00000000 00000000  
    141. I/DEBUG   (  109):     5fb49c88 00000000 00000000 00000000 00000000  
    142. I/DEBUG   (  109):     5fb49c98 00000000 3f000000 00000000 70333880  
    143. I/DEBUG   (  109):     5fb49ca8 70333878 5fb49cd4 5fb49d90 65115790  
    144. I/DEBUG   (  109):     5fb49cb8 5fb49cd0 00000000 5fb49d84 5f342b90  
    145. I/DEBUG   (  109):     5fb49cc8 00000000 00000000 00000000 00000000  
    146. I/DEBUG   (  109):     5fb49cd8 00000000 00000000 00000000 00000000  
    147. I/DEBUG   (  109):     5fb49ce8 00000002 00000000 60be7960 60be6b90  
    148. I/DEBUG   (  109):     5fb49cf8 60be7190 60be6a90 60be6920 60be6910  
    149. I/DEBUG   (  109):     5fb49d08 00000002 60be68d8 5fb49d58 60be7190  
    150. I/DEBUG   (  109):     5fb49d18 60be6e38 60be6e34 60be6e30 60be7960  
    151. I/DEBUG   (  109):     5fb49d28 60be68d0 60be6a90 00000000 60be6df0  
    152. I/DEBUG   (  109):     5fb49d38 5fb4a4f8 60be7998 60be7988 406cc645  
    153. I/DEBUG   (  109):
    154. I/DEBUG   (  109): memory near r1:
    155. I/DEBUG   (  109):     6608bc00 6e786e40 00000000 00000010 000000f1  
    156. I/DEBUG   (  109):     6608bc10 656b1ce8 6d851da8 000001a1 00000000  
    157. I/DEBUG   (  109):     6608bc20 5f772970 00010007 6574cac0 5f773a18  
    158. I/DEBUG   (  109):     6608bc30 00000000 00000000 01010000 00000000  
    159. I/DEBUG   (  109):     6608bc40 00000000 01000000 00000000 3f800000  
    160. I/DEBUG   (  109):     6608bc50 00000000 6574cac0 00000000 00000000  
    161. I/DEBUG   (  109):     6608bc60 00000000 6574cac0 00000002 00000000  
    162. I/DEBUG   (  109):     6608bc70 2a7739e9 3f37e36f 28b7fb78 3f321aa4  
    163. I/DEBUG   (  109):     6608bc80 3e717660 3f93ae22 3f004f06 3c23d70a  
    164. I/DEBUG   (  109):     6608bc90 0000000b 00000003 3be4a475 3da82bbd  
    165. I/DEBUG   (  109):     6608bca0 3d49e646 00000000 00000000 3e19999a  
    166. I/DEBUG   (  109):     6608bcb0 00000000 00000000 00000000 f49dc5ae  
    167. I/DEBUG   (  109):     6608bcc0 00000000 00000000 00000000 7f7fffff  
    168. I/DEBUG   (  109):     6608bcd0 00000000 7f7fff01 00000000 3d4ccccd  
    169. I/DEBUG   (  109):     6608bce0 00000000 3f800001 3f800000 43b937f7  
    170. I/DEBUG   (  109):     6608bcf0 3ba3d70a 3a83126e 000000f0 0000003a  
    171. I/DEBUG   (  109):
    172. I/DEBUG   (  109): memory near r2:
    173. I/DEBUG   (  109):     5f1c36b0 e5802018 e12fff1e e92d4008 e590004c  
    174. I/DEBUG   (  109):     5f1c36c0 e5903000 e5933038 e12fff33 e8bd8008  
    175. I/DEBUG   (  109):     5f1c36d0 e92d4008 e590004c e5903000 e593303c  
    176. I/DEBUG   (  109):     5f1c36e0 e12fff33 e8bd8008 e52de004 e24dd00c  
    177. I/DEBUG   (  109):     5f1c36f0 e590004c e28d3008 e1d110b0 e5902000  
    178. I/DEBUG   (  109):     5f1c3700 e16310b8 e1a0100d e5923028 e12fff33  
    179. I/DEBUG   (  109):     5f1c3710 e28dd00c e49df004 e92d4008 e590004c  
    180. I/DEBUG   (  109):     5f1c3720 e5903000 e5933030 e12fff33 e8bd8008  
    181. I/DEBUG   (  109):     5f1c3730 e92d4010 e1a04000 e591104c e5913000  
    182. I/DEBUG   (  109):     5f1c3740 e593302c e12fff33 e1a00004 e8bd8010  
    183. I/DEBUG   (  109):     5f1c3750 e92d4008 e5903050 e5831038 e590004c  
    184. I/DEBUG   (  109):     5f1c3760 e5903000 e5933024 e12fff33 e8bd8008  
    185. I/DEBUG   (  109):     5f1c3770 e5903050 e5930038 e12fff1e e92d4008  
    186. I/DEBUG   (  109):     5f1c3780 e5903050 e583103c e590004c e5903000  
    187. I/DEBUG   (  109):     5f1c3790 e5933024 e12fff33 e8bd8008 e5903050  
    188. I/DEBUG   (  109):     5f1c37a0 e593003c e12fff1e e92d4008 e5903050  
    189. I/DEBUG   (  109):
    190. I/DEBUG   (  109): memory near r4:
    191. I/DEBUG   (  109):     5fb4a6c4 3d851ebd 3da3d70f 34bd8000 00000000  
    192. I/DEBUG   (  109):     5fb4a6d4 00000000 00000000 00000000 5f000007  
    193. I/DEBUG   (  109):     5fb4a6e4 5f7590e8 00000001 00000000 00000301  
    194. I/DEBUG   (  109):     5fb4a6f4 5fb4a801 5f77a594 00000000 5fb4a87c  
    195. I/DEBUG   (  109):     5fb4a704 ffffffff 00000301 5e92be64 00000301  
    196. I/DEBUG   (  109):     5fb4a714 00000000 5fb4a720 6d804e40 5f759100  
    197. I/DEBUG   (  109):     5fb4a724 00000000 00000000 ffffffff 5fb4a710  
    198. I/DEBUG   (  109):     5fb4a734 5c2ffd00 6354a5e0 00000080 00000000  
    199. I/DEBUG   (  109):     5fb4a744 6a606ef0 00000040 00000000 6a606ee0  
    200. I/DEBUG   (  109):     5fb4a754 00000000 6a606ef0 63548a00 5fb4a898  
    201. I/DEBUG   (  109):     5fb4a764 5fb4a888 00000301 5ec85c1c 6a606ef0  
    202. I/DEBUG   (  109):     5fb4a774 00000040 00000301 00000000 5fb4a7a4  
    203. I/DEBUG   (  109):     5fb4a784 5e67fc20 5fb4b0b4 5fb4b0b8 5c2f0240  
    204. I/DEBUG   (  109):     5fb4a794 6d8e8520 6a632af0 6193a030 5fb4a7a8  
    205. I/DEBUG   (  109):     5fb4a7a4 6d8fbaf0 00000301 00000000 6d8e8520  
    206. I/DEBUG   (  109):     5fb4a7b4 5fb4a87c 5fb4a888 6a606ee0 5fb4a898  
    207. I/DEBUG   (  109):
    208. I/DEBUG   (  109): memory near r5:
    209. I/DEBUG   (  109):     5fb4a6b0 352710c8 c03faeba bf9d9163 bf8e06c2  
    210. I/DEBUG   (  109):     5fb4a6c0 00000003 3d851ebd 3da3d70f 34bd8000  
    211. I/DEBUG   (  109):     5fb4a6d0 00000000 00000000 00000000 00000000  
    212. I/DEBUG   (  109):     5fb4a6e0 5f000007 5f7590e8 00000001 00000000  
    213. I/DEBUG   (  109):     5fb4a6f0 00000301 5fb4a801 5f77a594 00000000  
    214. I/DEBUG   (  109):     5fb4a700 5fb4a87c ffffffff 00000301 5e92be64  
    215. I/DEBUG   (  109):     5fb4a710 00000301 00000000 5fb4a720 6d804e40  
    216. I/DEBUG   (  109):     5fb4a720 5f759100 00000000 00000000 ffffffff  
    217. I/DEBUG   (  109):     5fb4a730 5fb4a710 5c2ffd00 6354a5e0 00000080  
    218. I/DEBUG   (  109):     5fb4a740 00000000 6a606ef0 00000040 00000000  
    219. I/DEBUG   (  109):     5fb4a750 6a606ee0 00000000 6a606ef0 63548a00  
    220. I/DEBUG   (  109):     5fb4a760 5fb4a898 5fb4a888 00000301 5ec85c1c  
    221. I/DEBUG   (  109):     5fb4a770 6a606ef0 00000040 00000301 00000000  
    222. I/DEBUG   (  109):     5fb4a780 5fb4a7a4 5e67fc20 5fb4b0b4 5fb4b0b8  
    223. I/DEBUG   (  109):     5fb4a790 5c2f0240 6d8e8520 6a632af0 6193a030  
    224. I/DEBUG   (  109):     5fb4a7a0 5fb4a7a8 6d8fbaf0 00000301 00000000  
    225. I/DEBUG   (  109):
    226. I/DEBUG   (  109): memory near r6:
    227. I/DEBUG   (  109):     6608bc00 6e786e40 00000000 00000010 000000f1  
    228. I/DEBUG   (  109):     6608bc10 656b1ce8 6d851da8 000001a1 00000000  
    229. I/DEBUG   (  109):     6608bc20 5f772970 00010007 6574cac0 5f773a18  
    230. I/DEBUG   (  109):     6608bc30 00000000 00000000 01010000 00000000  
    231. I/DEBUG   (  109):     6608bc40 00000000 01000000 00000000 3f800000  
    232. I/DEBUG   (  109):     6608bc50 00000000 6574cac0 00000000 00000000  
    233. I/DEBUG   (  109):     6608bc60 00000000 6574cac0 00000002 00000000  
    234. I/DEBUG   (  109):     6608bc70 2a7739e9 3f37e36f 28b7fb78 3f321aa4  
    235. I/DEBUG   (  109):     6608bc80 3e717660 3f93ae22 3f004f06 3c23d70a  
    236. I/DEBUG   (  109):     6608bc90 0000000b 00000003 3be4a475 3da82bbd  
    237. I/DEBUG   (  109):     6608bca0 3d49e646 00000000 00000000 3e19999a  
    238. I/DEBUG   (  109):     6608bcb0 00000000 00000000 00000000 f49dc5ae  
    239. I/DEBUG   (  109):     6608bcc0 00000000 00000000 00000000 7f7fffff  
    240. I/DEBUG   (  109):     6608bcd0 00000000 7f7fff01 00000000 3d4ccccd  
    241. I/DEBUG   (  109):     6608bce0 00000000 3f800001 3f800000 43b937f7  
    242. I/DEBUG   (  109):     6608bcf0 3ba3d70a 3a83126e 000000f0 0000003a  
    243. I/DEBUG   (  109):
    244. I/DEBUG   (  109): memory near r7:
    245. I/DEBUG   (  109):     670fd650 000001b2 0004d8b4 0004d8a8 00000143  
    246. I/DEBUG   (  109):     670fd660 aaaaaaaa 00000008 00000241 00000000  
    247. I/DEBUG   (  109):     670fd670 5f7758e8 00030005 6a539ae0 00000000  
    248. I/DEBUG   (  109):     670fd680 00000000 6608daa0 00010002 67111a80  
    249. I/DEBUG   (  109):     670fd690 00010002 00000011 00000000 00000000  
    250. I/DEBUG   (  109):     670fd6a0 60c32e70 83000000 00000000 00000000  
    251. I/DEBUG   (  109):     670fd6b0 ffffffff 660f79f0 00010001 3f800000  
    252. I/DEBUG   (  109):     670fd6c0 3f800000 00000000 00000000 356c442d  
    253. I/DEBUG   (  109):     670fd6d0 c0400000 35f4442d bf1c0da0 01060001  
    254. I/DEBUG   (  109):     670fd6e0 00000000 00000000 00000000 3f800000  
    255. I/DEBUG   (  109):     670fd6f0 00000000 00000000 00000000 3e19999a  
    256. I/DEBUG   (  109):     670fd700 00000000 00000000 00000000 f49dc5ae  
    257. I/DEBUG   (  109):     670fd710 00000000 00000000 00000000 7f7fffff  
    258. I/DEBUG   (  109):     670fd720 7f7fffff 7f7fffff 00000000 00000000  
    259. I/DEBUG   (  109):     670fd730 00000000 00000000 00000000 00000000  
    260. I/DEBUG   (  109):     670fd740 3ba3d70a 3a83126e 00000000 6574c2a0  
    261. I/DEBUG   (  109):
    262. I/DEBUG   (  109): memory near r8:
    263. I/DEBUG   (  109):     65115768 70584af0 6f1450a0 656b8030 67b8c400  
    264. I/DEBUG   (  109):     65115778 65a0ec50 670f0270 70679050 70650750  
    265. I/DEBUG   (  109):     65115788 6608bc40 670fd6a0 67441a30 65a1e280  
    266. I/DEBUG   (  109):     65115798 6f174f30 702e72f0 60bc16a0 60bb9600  
    267. I/DEBUG   (  109):     651157a8 60bc14c0 60bb9600 70334c80 60bb9600  
    268. I/DEBUG   (  109):     651157b8 706549f0 60bb9600 7064a450 60bb9600  
    269. I/DEBUG   (  109):     651157c8 6571aab0 60bb9600 7067b750 7067b600  
    270. I/DEBUG   (  109):     651157d8 6d851de0 670fd6a0 6e2a44c0 70653f10  
    271. I/DEBUG   (  109):     651157e8 65a0eec0 65757050 65a25ba0 6ef670b0  
    272. I/DEBUG   (  109):     651157f8 66319cf0 70243760 6608a700 670fd6a0  
    273. I/DEBUG   (  109):     65115808 656b1d20 670fd6a0 66e1bb90 670fd6a0  
    274. I/DEBUG   (  109):     65115818 70649880 70652040 7002c790 7002c640  
    275. I/DEBUG   (  109):     65115828 70558e00 70558cd0 6602ad80 70338590  
    276. I/DEBUG   (  109):     65115838 6f175a10 6f1757b0 67db5ae0 6d769e30  
    277. I/DEBUG   (  109):     65115848 705e6ee0 67fc67e0 6ae1df30 656b3bf0  
    278. I/DEBUG   (  109):     65115858 65a1baa0 670f6130 66356a90 6a81add0  
    279. I/DEBUG   (  109):
    280. I/DEBUG   (  109): memory near r9:
    281. I/DEBUG   (  109):     5fb49c5c 00000000 ffffffff 00000000 670fd670  
    282. I/DEBUG   (  109):     5fb49c6c 6608bc20 6608bc40 670fd6a0 00000000  
    283. I/DEBUG   (  109):     5fb49c7c 00000000 00000000 00000000 00000000  
    284. I/DEBUG   (  109):     5fb49c8c 00000000 00000000 00000000 00000000  
    285. I/DEBUG   (  109):     5fb49c9c 3f000000 00000000 70333880 70333878  
    286. I/DEBUG   (  109):     5fb49cac 5fb49cd4 5fb49d90 65115790 5fb49cd0  
    287. I/DEBUG   (  109):     5fb49cbc 00000000 5fb49d84 5f342b90 00000000  
    288. I/DEBUG   (  109):     5fb49ccc 00000000 00000000 00000000 00000000  
    289. I/DEBUG   (  109):     5fb49cdc 00000000 00000000 00000000 00000002  
    290. I/DEBUG   (  109):     5fb49cec 00000000 60be7960 60be6b90 60be7190  
    291. I/DEBUG   (  109):     5fb49cfc 60be6a90 60be6920 60be6910 00000002  
    292. I/DEBUG   (  109):     5fb49d0c 60be68d8 5fb49d58 60be7190 60be6e38  
    293. I/DEBUG   (  109):     5fb49d1c 60be6e34 60be6e30 60be7960 60be68d0  
    294. I/DEBUG   (  109):     5fb49d2c 60be6a90 00000000 60be6df0 5fb4a4f8  
    295. I/DEBUG   (  109):     5fb49d3c 60be7998 60be7988 406cc645 60be7950  
    296. I/DEBUG   (  109):     5fb49d4c 5fb49cd4 00000000 405816f3 bf800000  
    297. I/DEBUG   (  109):
    298. I/DEBUG   (  109): memory near ip:
    299. I/DEBUG   (  109):     5e952c54 eaf65c3e e3a00000 e12fff1e eaf65c3b  
    300. I/DEBUG   (  109):     5e952c64 e12fff1e e3a00000 e12fff1e eaf65c37  
    301. I/DEBUG   (  109):     5e952c74 e92d48f0 e24dd018 e1a04000 e1a07003  
    302. I/DEBUG   (  109):     5e952c84 e5940008 e1a06002 e1a05001 e1570000  
    303. I/DEBUG   (  109):     5e952c94 0a000025 e5960000 e1a01006 e5902088  
    304. I/DEBUG   (  109):     5e952ca4 e28d0014 e12fff32 e5dd0014 e3100004  
    305. I/DEBUG   (  109):     5e952cb4 0a000002 e5d40010 e3500000 0a00001a  
    306. I/DEBUG   (  109):     5e952cc4 e5970008 e3500000 0a000002 e5d0005c  
    307. I/DEBUG   (  109):     5e952cd4 e3500000 0a000014 e5960000 e1a01006  
    308. I/DEBUG   (  109):     5e952ce4 e590205c e28d0004 e12fff32 e3a00009  
    309. I/DEBUG   (  109):     5e952cf4 ebf94b38 e5957004 e3a00000 e3a03000  
    310. I/DEBUG   (  109):     5e952d04 e3570000 0a00001f e59d1008 e3a03000  
    311. I/DEBUG   (  109):     5e952d14 e3510000 0a00001b e597202c e5973030  
    312. I/DEBUG   (  109):     5e952d24 e0437002 e1a06147 ea000007 e3a00000  
    313. I/DEBUG   (  109):     5e952d34 e28dd018 e8bd88f0 e2477001 e0822106  
    314. I/DEBUG   (  109):     5e952d44 e0477006 e2822004 e1a06007 e1a07006  
    315. I/DEBUG   (  109):
    316. I/DEBUG   (  109): memory near sp:
    317. I/DEBUG   (  109):     5fb49bb8 00000000 00000000 00000000 00000000  
    318. I/DEBUG   (  109):     5fb49bc8 00000000 00000000 df0027ad 00000000  
    319. I/DEBUG   (  109):     5fb49bd8 670fd670 5e952cac 00000000 00000000  
    320. I/DEBUG   (  109):     5fb49be8 00000000 00000000 00000000 00000000  
    321. I/DEBUG   (  109):     5fb49bf8 5fb4a4f8 00000001 5fb4a6d0 00000007  
    322. I/DEBUG   (  109):     5fb49c08 00000000 5f1e6a9c 5fb49c7c 00000000  
    323. I/DEBUG   (  109):     5fb49c18 00000000 00000000 00000000 00000000  
    324. I/DEBUG   (  109):     5fb49c28 00000000 00000000 00000000 00000000  
    325. I/DEBUG   (  109):     5fb49c38 5f9450b0 00000000 5fb49c68 00000001  
    326. I/DEBUG   (  109):     5fb49c48 5fb4a6e4 5fb49c7c 00000000 5f77a594  
    327. I/DEBUG   (  109):     5fb49c58 00000000 00000000 ffffffff 00000000  
    328. I/DEBUG   (  109):     5fb49c68 670fd670 6608bc20 6608bc40 670fd6a0  
    329. I/DEBUG   (  109):     5fb49c78 00000000 00000000 00000000 00000000  
    330. I/DEBUG   (  109):     5fb49c88 00000000 00000000 00000000 00000000  
    331. I/DEBUG   (  109):     5fb49c98 00000000 3f000000 00000000 70333880  
    332. I/DEBUG   (  109):     5fb49ca8 70333878 5fb49cd4 5fb49d90 65115790  
    333. I/DEBUG   (  109):
    334. I/DEBUG   (  109): code around pc:
    335. I/DEBUG   (  109):     00000000 ffffffff ffffffff ffffffff ffffffff  
    336. I/DEBUG   (  109):     00000010 ffffffff ffffffff ffffffff ffffffff  
    337. I/DEBUG   (  109):     00000020 ffffffff ffffffff ffffffff ffffffff  
    338. I/DEBUG   (  109):     00000030 ffffffff ffffffff ffffffff ffffffff  
    339. I/DEBUG   (  109):     00000040 ffffffff ffffffff ffffffff ffffffff  
    340. I/DEBUG   (  109):     00000050 ffffffff ffffffff ffffffff ffffffff  
    341. I/DEBUG   (  109):     00000060 ffffffff ffffffff ffffffff ffffffff  
    342. I/DEBUG   (  109):     00000070 ffffffff ffffffff ffffffff ffffffff  
    343. I/DEBUG   (  109):     00000080 ffffffff ffffffff ffffffff ffffffff  
    344. I/DEBUG   (  109):     00000090 ffffffff ffffffff ffffffff ffffffff  
    345. I/DEBUG   (  109):     000000a0 ffffffff ffffffff ffffffff ffffffff  
    346. I/DEBUG   (  109):     000000b0 ffffffff ffffffff ffffffff ffffffff  
    347. I/DEBUG   (  109):     000000c0 ffffffff ffffffff ffffffff ffffffff  
    348. I/DEBUG   (  109):     000000d0 ffffffff ffffffff ffffffff ffffffff  
    349. I/DEBUG   (  109):     000000e0 ffffffff ffffffff ffffffff ffffffff  
    350. I/DEBUG   (  109):     000000f0 ffffffff ffffffff ffffffff ffffffff  
    351. I/DEBUG   (  109):
    352. I/DEBUG   (  109): code around lr:
    353. I/DEBUG   (  109):     5f1c36c4 e5933038 e12fff33 e8bd8008 e92d4008  
    354. I/DEBUG   (  109):     5f1c36d4 e590004c e5903000 e593303c e12fff33  
    355. I/DEBUG   (  109):     5f1c36e4 e8bd8008 e52de004 e24dd00c e590004c  
    356. I/DEBUG   (  109):     5f1c36f4 e28d3008 e1d110b0 e5902000 e16310b8  
    357. I/DEBUG   (  109):     5f1c3704 e1a0100d e5923028 e12fff33 e28dd00c  
    358. I/DEBUG   (  109):     5f1c3714 e49df004 e92d4008 e590004c e5903000  
    359. I/DEBUG   (  109):     5f1c3724 e5933030 e12fff33 e8bd8008 e92d4010  
    360. I/DEBUG   (  109):     5f1c3734 e1a04000 e591104c e5913000 e593302c  
    361. I/DEBUG   (  109):     5f1c3744 e12fff33 e1a00004 e8bd8010 e92d4008  
    362. I/DEBUG   (  109):     5f1c3754 e5903050 e5831038 e590004c e5903000  
    363. I/DEBUG   (  109):     5f1c3764 e5933024 e12fff33 e8bd8008 e5903050  
    364. I/DEBUG   (  109):     5f1c3774 e5930038 e12fff1e e92d4008 e5903050  
    365. I/DEBUG   (  109):     5f1c3784 e583103c e590004c e5903000 e5933024  
    366. I/DEBUG   (  109):     5f1c3794 e12fff33 e8bd8008 e5903050 e593003c  
    367. I/DEBUG   (  109):     5f1c37a4 e12fff1e e92d4008 e5903050 e5831040  
    368. I/DEBUG   (  109):     5f1c37b4 e590004c e5903000 e5933024 e12fff33  
    369. I/DEBUG   (  109): !@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 7485
    370. D/dalvikvm(  499): GC_CONCURRENT freed 2082K, 21% free 29400K/36928K, paused 21ms+20ms, total 269ms
    371. D/dalvikvm(  499): WAIT_FOR_CONCURRENT_GC blocked 210ms
    372. D/dalvikvm(10234): Late-enabling CheckJNI
    373. D/dalvikvm( 1024): GC_EXPLICIT freed 1646K, 38% free 10880K/17376K, paused 45ms+23ms, total 230ms
    374. D/dalvikvm(10234): DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_ABIS
    375. W/dalvikvm(10234): VFY: unable to resolve static field 259 (SUPPORTED_ABIS) in Landroid/os/Build;
    376. D/dalvikvm(10234): VFY: replacing opcode 0x62 at 0x0095
    377. I/dalvikvm(10234): Could not find method android.app.ActivityManager.isLowRamDevice, referenced from method com.google.android.apps.gsa.shared.util.ce.bf
    378. W/dalvikvm(10234): VFY: unable to resolve virtual method 400: Landroid/app/ActivityManager;.isLowRamDevice ()Z
    379. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x0010
    380. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    381. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    382. E/dalvikvm(10234): Could not find class 'com.google.android.apps.gsa.assist.GsaVoiceInteractionSession', referenced from method com.google.android.apps.gsa.assist.GsaVoiceInteractionSession_MembersInjector.au
    383. W/dalvikvm(10234): VFY: unable to resolve check-cast 2945 (Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;) in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;
    384. D/dalvikvm(10234): VFY: replacing opcode 0x1f at 0x0000
    385. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    386. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    387. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4622 at 0x14 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    388. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    389. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    390. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x461e at 0x1e in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    391. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    392. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    393. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4642 at 0x26 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    394. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    395. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    396. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4643 at 0x2e in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    397. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    398. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    399. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4621 at 0x38 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    400. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    401. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    402. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4644 at 0x40 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    403. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    404. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    405. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4620 at 0x48 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    406. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    407. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    408. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4625 at 0x50 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    409. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    410. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    411. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4626 at 0x5a in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    412. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    413. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    414. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4627 at 0x64 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    415. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    416. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    417. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4628 at 0x6c in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    418. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    419. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    420. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4629 at 0x74 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    421. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    422. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    423. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x462a at 0x7e in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    424. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    425. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    426. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x462b at 0x88 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    427. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    428. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    429. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x461f at 0x92 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    430. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    431. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    432. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x462c at 0x9c in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    433. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    434. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    435. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x462d at 0xa4 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    436. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    437. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    438. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x462e at 0xae in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    439. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    440. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    441. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x462f at 0xb8 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    442. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    443. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    444. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4630 at 0xc2 in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    445. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession; (505)
    446. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession;' failed
    447. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x4631 at 0xcc in Lcom/google/android/apps/gsa/assist/GsaVoiceInteractionSession_MembersInjector;.au
    448. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/tasks/VelvetBackgroundTasksJobService; (154)
    449. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/tasks/VelvetBackgroundTasksJobService;' failed
    450. E/dalvikvm(10234): Could not find class 'com.google.android.apps.gsa.tasks.VelvetBackgroundTasksJobService', referenced from method com.google.android.apps.gsa.tasks.l.au
    451. W/dalvikvm(10234): VFY: unable to resolve check-cast 9755 (Lcom/google/android/apps/gsa/tasks/VelvetBackgroundTasksJobService;) in Lcom/google/android/apps/gsa/tasks/l;
    452. D/dalvikvm(10234): VFY: replacing opcode 0x1f at 0x0000
    453. W/dalvikvm(10234): Unable to resolve superclass of Lcom/google/android/apps/gsa/tasks/VelvetBackgroundTasksJobService; (154)
    454. W/dalvikvm(10234): Link of class 'Lcom/google/android/apps/gsa/tasks/VelvetBackgroundTasksJobService;' failed
    455. I/dalvikvm(10234): DexOpt: unable to optimize instance field ref 0x981e at 0x12 in Lcom/google/android/apps/gsa/tasks/l;.au
    456. D/dalvikvm(10234): DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_ABIS
    457. W/dalvikvm(10234): VFY: unable to resolve static field 259 (SUPPORTED_ABIS) in Landroid/os/Build;
    458. D/dalvikvm(10234): VFY: replacing opcode 0x62 at 0x0063
    459. D/dalvikvm(10234): GC_CONCURRENT freed 725K, 33% free 5762K/8508K, paused 5ms+4ms, total 48ms
    460. I/dalvikvm(10234): Could not find method android.os.UserManager.getUserProfiles, referenced from method com.google.android.apps.gsa.shared.util.cd.bd
    461. W/dalvikvm(10234): VFY: unable to resolve virtual method 2481: Landroid/os/UserManager;.getUserProfiles ()Ljava/util/List;
    462. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x001c
    463. D/dalvikvm(10234): GC_CONCURRENT freed 130K, 29% free 6101K/8508K, paused 7ms+10ms, total 57ms
    464. D/dalvikvm(10234): WAIT_FOR_CONCURRENT_GC blocked 14ms
    465. I/dalvikvm(10234): Could not find method android.app.AlarmManager.setExactAndAllowWhileIdle, referenced from method com.google.android.apps.gsa.search.core.r.c.b
    466. W/dalvikvm(10234): VFY: unable to resolve virtual method 409: Landroid/app/AlarmManager;.setExactAndAllowWhileIdle (IJLandroid/app/PendingIntent;)V
    467. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x000e
    468. I/dalvikvm(10234): Could not find method android.app.AlarmManager.setExact, referenced from method com.google.android.apps.gsa.search.core.r.c.setExact
    469. W/dalvikvm(10234): VFY: unable to resolve virtual method 408: Landroid/app/AlarmManager;.setExact (IJLandroid/app/PendingIntent;)V
    470. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x000e
    471. I/dalvikvm(10234): Could not find method android.content.Context.checkSelfPermission, referenced from method com.google.android.apps.gsa.d.a.e
    472. W/dalvikvm(10234): VFY: unable to resolve virtual method 949: Landroid/content/Context;.checkSelfPermission (Ljava/lang/String;)I
    473. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x0006
    474. I/dalvikvm(10234): Could not find method android.content.IntentFilter.addDataSchemeSpecificPart, referenced from method com.google.android.apps.gsa.search.core.r.Mn
    475. W/dalvikvm(10234): VFY: unable to resolve virtual method 1095: Landroid/content/IntentFilter;.addDataSchemeSpecificPart (Ljava/lang/String;I)V
    476. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x0050
    477. I/dalvikvm(10234): Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.f.d
    478. W/dalvikvm(10234): VFY: unable to resolve virtual method 607: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
    479. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x00fe
    480. I/dalvikvm(10234): DexOpt: access denied from Lcom/google/android/gms/common/f; to field Landroid/app/Notification;.extras
    481. W/dalvikvm(10234): VFY: unable to resolve instance field 64
    482. D/dalvikvm(10234): VFY: replacing opcode 0x54 at 0x011d
    483. I/dalvikvm(10234): Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.f.e
    484. W/dalvikvm(10234): VFY: unable to resolve virtual method 607: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
    485. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x00cf
    486. I/dalvikvm(10234): DexOpt: access denied from Lcom/google/android/gms/common/f; to field Landroid/app/Notification;.extras
    487. W/dalvikvm(10234): VFY: unable to resolve instance field 64
    488. D/dalvikvm(10234): VFY: replacing opcode 0x54 at 0x00ee
    489. I/dalvikvm(10234): Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.h.L
    490. W/dalvikvm(10234): VFY: unable to resolve virtual method 1184: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
    491. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x000e
    492. I/dalvikvm(10234): Could not find method android.os.UserManager.getApplicationRestrictions, referenced from method com.google.android.gms.common.h.L
    493. W/dalvikvm(10234): VFY: unable to resolve virtual method 2477: Landroid/os/UserManager;.getApplicationRestrictions (Ljava/lang/String;)Landroid/os/Bundle;
    494. D/dalvikvm(10234): VFY: replacing opcode 0x6e at 0x0047
    495. E/dalvikvm(10234): Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.h.c
    496. W/dalvikvm(10234): VFY: unable to resolve check-cast 97 (Landroid/app/AppOpsManager;) in Lcom/google/android/gms/common/h;
    497. D/dalvikvm(10234): VFY: replacing opcode 0x1f at 0x0010
    498. W/dalvikvm(10234): Exception Ljava/lang/RuntimeException; thrown while initializing Lcom/google/common/util/concurrent/l;
    499. I/dalvikvm(10234): Could not find method android.service.voice.VoiceInteractionService.isActiveService, referenced from method com.google.android.apps.gsa.w.c.d.a
    500. W/dalvikvm(10234): VFY: unable to resolve static method 2601: Landroid/service/voice/VoiceInteractionService;.isActiveService (Landroid/content/Context;Landroid/content/ComponentName;)Z
    501. D/dalvikvm(10234): VFY: replacing opcode 0x71 at 0x0043
    502. E/dalvikvm(10234): adjustAdaptiveCoef max=4194304, min=1048576, ut=568
    503. D/dalvikvm(10234): GC_CONCURRENT freed 313K, 28% free 6266K/8600K, paused 10ms+79ms, total 122ms
    504. E/dalvikvm(10234): Could not find class 'android.content.pm.LauncherApps', referenced from method com.google.android.apps.gsa.search.shared.multiuser.l.connect
    505. W/dalvikvm(10234): VFY: unable to resolve check-cast 208 (Landroid/content/pm/LauncherApps;) in Lcom/google/android/apps/gsa/search/shared/multiuser/l;
    506. D/dalvikvm(10234): VFY: replacing opcode 0x1f at 0x0089
    507. D/dalvikvm(10273): Late-enabling CheckJNI
    508. D/dalvikvm(19135): GC_CONCURRENT freed 407K, 35% free 5559K/8436K, paused 9ms+17ms, total 352ms
    509. I/ActivityManager(  499): Process <redacted> (pid 7485) (adj 0) has died.
    510. W/ActivityManager(  499): Force removing ActivityRecord{42aa0b98 u0 <redacted>/com.unity3d.player.UnityPlayerActivity}: app died, no saved state
    511. W/ActivityManager(  499): mDVFSHelper.acquire()
    512. W/ActivityManager(  499): mDVFSHelper.release()
    513.  
    514.  
    515.  

    1GB system, memory use 100..150 mb. Crash happens regardless of memory usage, app had no issue running with 300 mb of ram allocation.

    No custom roms.
     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    5,994
    I wrote my own collision system and replaced Physics.OverlapBox with my own function.

    Have not experienced any crashes since then. Collision queries take a bit longer, but the program does not die randomly anymore.

    So, it is a physx bug, specific to android.
     
  6. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    384
    The Physics.OverlapBox method is quite new in Unity, I had have to write my own solution with OverlapSphere. Probably OverlapBox is broken. I guess Unity's code looks very similar, because a sphere check is very fast and I guess even with the overhead this solution would be faster than a 'real' box check.

    Code (CSharp):
    1. public static List<Collider> OverlapBox2(Bounds bounds, int layerMask) {
    2.         Vector3 center = bounds.center;
    3.         Vector3 onePoint = new Vector3(center.x + bounds.size.x / 2, center.y + bounds.size.y / 2, center.z + bounds.size.z / 2);
    4.         float radius = Vector3.Distance(center, onePoint);
    5.  
    6.         List<Collider> inBox = new List<Collider>();
    7.         Collider[] hitColliders = Physics.OverlapSphere(center, radius, layerMask);
    8.         foreach (Collider col in hitColliders) {
    9.  
    10.             if (bounds.Intersects(col.bounds)) {
    11.                 // Inside box
    12.                 inBox.Add(col);
    13.             }
    14.         }
    15.  
    16.         return inBox;
    17.     }
    If this doesn't crash for you, then there is a high probability that the OverlapBox is broken.

    The adb output shows the state of your device, also shows the errors, the warnings, what tasks running, what tasks are closed to run your application and much more.
     
    Last edited: Oct 13, 2017
  7. ganaware

    ganaware

    Joined:
    Jun 19, 2015
    Posts:
    1
    We encounterd the same problem for Physics.OverlapBoxNonAlloc() on 5.3.5p1 and 5.4.0f2.
    It must be broken!
     
  8. melkor414

    melkor414

    Joined:
    Mar 11, 2013
    Posts:
    1
    Hi. We have same problem on 5.3.4p1.
    Did anyone posted a bug with this?
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    5,994
    It's been a long time ago, so I forgot if I filed a bug regarding this one. Feel free to do it yourself.

    As I said, in my case I rolled out replacement collision detection system which supported OBBs and nothing more.
     
  10. jfabregat

    jfabregat

    Joined:
    Jun 29, 2016
    Posts:
    1
    I have found a crash with Physics.OverlapBoxNonAlloc() in android, but I have not seen the crash with other Physics.OverlapBox(), is it related with the NonAlloc version or it can be happening in both alloc and non alloc?
     
  11. Bunzaga

    Bunzaga

    Joined:
    Jan 9, 2009
    Posts:
    190
    It happens with both. I've just run into this myself, I assumed it was due to a long ass algorithm for generating a dungeon, so I broke it up into signals and commands (I'm using StrangeIOC), that helped a little, but it still happens when the dungeon generation has to grind a bit longer. I've also tried yield returning if the path has been blocked, etc etc.

    I tried switching to non-alloc version of overlap box, and it did seem to reduce the crash, but it still did happen eventually. It's like the algorithm just isn't releasing memory, so every time you call it, it's adding up and adding up.

    I also should mention, I'm using beta 5.6.0b9, but it seems that doesn't really matter for this case.

    BTW: It has NEVER happened in Editor, just on Android, both on a Pixel, and an older Droid XT1080.
     
  12. Bunzaga

    Bunzaga

    Joined:
    Jan 9, 2009
    Posts:
    190
    In the mean time, this just returns true, if a collision happened, or false if it didn't...
    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public static class CollisionCheck
    4. {
    5.  
    6.     private static Vector3 _AB = new Vector3(); // Direction A to B
    7.     private static float[] _R = new float[9]; // 3x3 Rotation
    8.     private static float[] _AbsR = new float[9]; // 3x3 Rotation
    9.     private static Vector3 _AX = new Vector3(); // A Axis
    10.     private static Vector3 _BX = new Vector3(); // B Axis
    11.  
    12.     private static Vector3 _v1 = new Vector3();
    13.     private static Vector3 _v2 = new Vector3();
    14.     private static Vector3 _v3 = new Vector3();
    15.  
    16.     private static float[] _aRot = new float[9];
    17.     private static float[] _bRot = new float[9];
    18.  
    19.     private static float ar = 0.0f, br = 0.0f;
    20.  
    21.     private static float[] _identityMatrix = new float[9] { 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f };
    22.  
    23.     // Adapted from: http://www.gamasutra.com/view/feature/131790/simple_intersection_tests_for_games.php?print=1
    24.     public static bool Box_Box (Vector3 aPos, Vector3 aSize, Quaternion aQuat, Vector3 bPos, Vector3 bSize, Quaternion bQuat)
    25.     {
    26.         ar = 0.0f;
    27.         br = 0.0f;
    28.  
    29.         QuaternionToFloatArray(aQuat, _aRot);
    30.         QuaternionToFloatArray(bQuat, _bRot);
    31.  
    32.  
    33.         for (int i = 0, i1 = 0; i < 3; i++, i1 += 3)
    34.         {
    35.             _AX.Set(_aRot[i1], _aRot[i1 + 1], _aRot[i1 + 2]);
    36.             for (int j = 0, j1 = 0; j < 3; j++, j1 += 3)
    37.             {
    38.                 _BX.Set(_bRot[j1], _bRot[j1 + 1], _bRot[j1 + 2]);
    39.                 _R[i1 + j] = Vector3.Dot(_AX, _BX);
    40.             }
    41.         }
    42.  
    43.         _AB = bPos - aPos;
    44.  
    45.         _v1.Set(_aRot[0], _aRot[1], _aRot[2]);
    46.         _v2.Set(_aRot[3], _aRot[4], _aRot[5]);
    47.         _v3.Set(_aRot[6], _aRot[7], _aRot[8]);
    48.  
    49.         _AB.Set(Vector3.Dot(_AB, _v1), Vector3.Dot(_AB, _v2), Vector3.Dot(_AB, _v3));
    50.  
    51.         for (int i = 0; i < 9; i++)
    52.         {
    53.             _AbsR[i] = Mathf.Abs(_R[i]) + 0.001f;
    54.         }
    55.         // Test axes L = A0, L = A1, L = A2
    56.         for (int i = 0, i1 = 0; i < 3; i++, i1 += 3)
    57.         {
    58.             ar = aSize[i];
    59.             br = (bSize[0] * _AbsR[i1]) + (bSize[1] * _AbsR[i1 + 1]) + (bSize[2] * _AbsR[i1 + 2]);
    60.             if (Mathf.Abs(_AB[i]) > (ar + br)) { return false; }
    61.         }
    62.         // Test axes L = B0, L = B1, L = B2
    63.         for (int i = 0; i < 3; i++)
    64.         {
    65.             ar = (aSize[0] * _AbsR[i]) + (aSize[1] * _AbsR[i + 3]) + (aSize[2] * _AbsR[i + 6]);
    66.             br = bSize[i];
    67.             if (Mathf.Abs((_AB[0] * _R[i]) + (_AB[1] * _R[i + 3]) + (_AB[2] * _R[i + 6])) > (ar + br)) { return false; }
    68.         }
    69.         // Test axis L = A0 x B0
    70.         ar = (aSize[1] * _AbsR[6]) + (aSize[2] * _AbsR[3]);
    71.         br = (bSize[1] * _AbsR[2]) + (bSize[2] * _AbsR[1]);
    72.         if (Mathf.Abs(_AB[2] * _R[3] - _AB[1] * _R[6]) > (ar + br)) { return false; }
    73.         // Test axis L = A0 x B1
    74.         ar = (aSize[1] * _AbsR[7]) + (aSize[2] * _AbsR[4]);
    75.         br = (bSize[0] * _AbsR[2]) + (bSize[2] * _AbsR[0]);
    76.         if (Mathf.Abs((_AB[2] * _R[4]) - (_AB[1] * _R[7])) > (ar + br)) { return false; }
    77.         // Test axis L = A0 x B2
    78.         ar = aSize[1] * _AbsR[8] + aSize[2] * _AbsR[5];
    79.         br = bSize[0] * _AbsR[1] + bSize[1] * _AbsR[0];
    80.         if (Mathf.Abs((_AB[2] * _R[5]) - (_AB[1] * _R[8])) > (ar + br)) { return false; }
    81.         // Test axis L = A1 x B0
    82.         ar = (aSize[0] * _AbsR[6]) + (aSize[2] * _AbsR[0]);
    83.         br = (bSize[1] * _AbsR[5]) + (bSize[2] * _AbsR[4]);
    84.         if (Mathf.Abs((_AB[0] * _R[6]) - (_AB[2] * _R[0])) > (ar + br)) { return false; }
    85.         // Test axis L = A1 x B1
    86.         ar = (aSize[0] * _AbsR[7]) + (aSize[2] * _AbsR[1]);
    87.         br = (bSize[0] * _AbsR[5]) + (bSize[2] * _AbsR[3]);
    88.         if (Mathf.Abs((_AB[0] * _R[7]) - (_AB[2] * _R[1])) > (ar + br)) { return false; }
    89.         // Test axis L = A1 x B2
    90.         ar = (aSize[0] * _AbsR[8]) + (aSize[2] * _AbsR[2]);
    91.         br = (bSize[0] * _AbsR[4]) + (bSize[1] * _AbsR[3]);
    92.         if (Mathf.Abs((_AB[0] * _R[8]) - (_AB[2] * _R[2])) > (ar + br)) { return false; }
    93.         // Test axis L = A2 x B0
    94.         ar = (aSize[0] * _AbsR[3]) + (aSize[1] * _AbsR[0]);
    95.         br = (bSize[1] * _AbsR[8]) + (bSize[2] * _AbsR[7]);
    96.         if (Mathf.Abs((_AB[1] * _R[0]) - (_AB[0] * _R[3])) > (ar + br)) { return false; }
    97.         // Test axis L = A2 x B1
    98.         ar = (aSize[0] * _AbsR[4]) + (aSize[1] * _AbsR[1]);
    99.         br = (bSize[0] * _AbsR[8]) + (bSize[2] * _AbsR[6]);
    100.         if (Mathf.Abs((_AB[1] * _R[1]) - (_AB[0] * _R[4])) > (ar + br)) { return false; }
    101.         // Test axis L = A2 x B2
    102.         ar = (aSize[0] * _AbsR[4]) + (aSize[1] * _AbsR[2]);
    103.         br = (bSize[0] * _AbsR[7]) + (bSize[1] * _AbsR[6]);
    104.         if (Mathf.Abs((_AB[1] * _R[2]) - (_AB[0] * _R[5])) > (ar + br)) { return false; }
    105.         return true;
    106.     }
    107.  
    108.     // Adapted from: http://www.mrelusive.com/publications/papers/SIMD-From-Quaternion-to-Matrix-and-Back.pdf
    109.     private static float[] QuaternionToFloatArray(Quaternion aQuat, float[] aFlatMatrix3x3 )
    110.     {
    111.         if(aFlatMatrix3x3 == null) {
    112.             aFlatMatrix3x3 = new float[9];
    113.         }
    114.  
    115.         aFlatMatrix3x3[0] = 1- (2.0f * (aQuat.y * aQuat.y)) - (2.0f * (aQuat.z * aQuat.z));
    116.         aFlatMatrix3x3[1] = (2.0f * (aQuat.x * aQuat.y)) + (2.0f * (aQuat.w * aQuat.z));
    117.         aFlatMatrix3x3[2] = (2.0f * (aQuat.x * aQuat.z)) - (2.0f * (aQuat.w * aQuat.y));
    118.  
    119.         aFlatMatrix3x3[3] = (2.0f * (aQuat.x * aQuat.y)) - (2.0f * (aQuat.w * aQuat.z));
    120.         aFlatMatrix3x3[4] = 1.0f - (2.0f * (aQuat.x * aQuat.x)) - (2.0f * (aQuat.z * aQuat.z));
    121.         aFlatMatrix3x3[5] = (2.0f * (aQuat.y * aQuat.z)) + (2.0f * (aQuat.w * aQuat.x));
    122.  
    123.         aFlatMatrix3x3[6] = (2.0f * (aQuat.x * aQuat.z)) + (2.0f * (aQuat.w * aQuat.y));
    124.         aFlatMatrix3x3[7] = (2.0f * (aQuat.y * aQuat.z)) - (2.0f * (aQuat.w * aQuat.x));
    125.         aFlatMatrix3x3[8] = 1.0f - (2.0f * (aQuat.x * aQuat.x)) - (2.0f * (aQuat.y * aQuat.y));
    126.  
    127.         return aFlatMatrix3x3;
    128.     }
    129. }
    130.  
     
  13. nindim

    nindim

    Joined:
    Jan 22, 2013
    Posts:
    70
    I'm seeing the same issues with Physics.OverlapCapsuleNonAlloc.

    I have filed a bug about it, but no test project with it unfortunately

    Bug Report below, no Issue Tracker ID yet:

    -----------------------------------------------------------------------------------------------------------------------

    Hard crash on Android due to Physics.OverlapCapsuleNonAlloc

    1. Hard crash on Android due to Physics.OverlapCapsuleNonAlloc()


    2. Unfortuantely, I can't attach our project and have not been able to reproduce in a simple test project.

    The problem pretty much occurs on every run through of the game provided we play for a few minutes. When it happens appears to be random.


    3. I am using Physics.OverlapCapsuleNonAlloc() by passing the position of the bottom capsule sphere first, followd by the top sphere. The radius is 0.49 units. The capsule height (total) is 1.47 units. I call this every frame on my player character object.

    The buffer foir the overlapping objects is declared as:

    Collider[] depentrationResults = new Collider[10];

    Generally, only 1 or 2 elements in the buffer are required/used.

    I set the individsual elements of the buffer all to nulll each frame before I call Physics.OverlapCapsuleNonAlloc() in orde to reset them.


    4.

    06-16 15:12:21.078 27814-27830/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 27830 (UnityMain)
    06-16 15:12:21.188 200-200/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    06-16 15:12:21.188 200-200/? A/DEBUG: Build fingerprint: 'google/hammerhead/hammerhead:6.0.1/M4B30Z/3437181:user/release-keys'
    06-16 15:12:21.188 200-200/? A/DEBUG: Revision: '11'
    06-16 15:12:21.188 200-200/? A/DEBUG: ABI: 'arm'
    06-16 15:12:21.188 200-200/? A/DEBUG: pid: 27814, tid: 27830, name: UnityMain >>> com.PixelSmashGames.QuikSid <<<
    06-16 15:12:21.188 200-200/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    06-16 15:12:21.208 200-200/? A/DEBUG: r0 aee3e114 r1 93399750 r2 00000000 r3 952aba30
    06-16 15:12:21.208 200-200/? A/DEBUG: r4 aee3ec24 r5 aee3ebe8 r6 93399750 r7 952aba30
    06-16 15:12:21.208 200-200/? A/DEBUG: r8 92f849a0 r9 00000000 sl 00000000 fp aee3ea28
    06-16 15:12:21.208 200-200/? A/DEBUG: ip a145f7e8 sp aee3e100 lr a145f820 pc 00000000 cpsr a0070010
    06-16 15:12:21.212 200-200/? A/DEBUG: backtrace:
    06-16 15:12:21.213 200-200/? A/DEBUG: #00 pc 00000000 <unknown>
    06-16 15:12:21.213 200-200/? A/DEBUG: #01 pc 004af81c /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #02 pc 00cf73e0 /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #03 pc 00e19358 /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #04 pc 00e1e888 /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #05 pc 00e12250 /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #06 pc 00cf90a8 /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #07 pc 00cf91f4 /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #08 pc 00493ba8 /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.213 200-200/? A/DEBUG: #09 pc 0072edcc /data/app/com.PixelSmashGames.QuikSid-2/lib/arm/libunity.so
    06-16 15:12:21.214 200-200/? A/DEBUG: #10 pc 0001e9a4 <unknown>

    This callstack symboicates to:

    #00 NULL UNKNOWN
    #01 CastFilter::preFilter(physx::pxFilterData const&, physx::pxShape const*, physx::pxRigidActor const*, physx::pxFlags<physx::pxHitFlag::Enum, unsigned short>&)
    #02 MultiQueryCallback<physx::pxOverlapHit>::invoke(float&, physx::Sq::prunerPayload const*, unsigned int)
    #03 BucketPrunerOverlapTraversal<OBBAABBTest_SIMD, false>::eek:perator()(physx::Sq::BucketPrunerCore const&, OBBAABBTest_SIMD const&, physx::Sq::prunerCallback&, physx::pxBounds3 const&) [clone .part.26]
    #04 physx::Sq::BucketPrunerCore::eek:verlap(physx::Sq::ShapeData const&, physx::Sq::prunerCallback&) const
    #05 physx::Sq::AABBPruner::eek:verlap(physx::Sq::ShapeData const&, physx::Sq::prunerCallback&) const
    #06 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
    #07 physx::NpSceneQueries::eek:verlap(physx::pxGeometry const&, physx::pxTransform const&, physx::pxHitCallback<physx::pxOverlapHit>&, physx::pxQueryFilterData const&, physx::pxQueryFilterCallback*) const
    #08 Unity::physicsQuery::OverlapCapsuleNonAlloc(Vector3f const&, Vector3f const&, float, Collider**, int, int, QueryTriggerInteraction)
    #09 Physics_CUSTOM_INTERNAL_CALL_OverlapCapsuleNonAlloc(Vector3f const&, Vector3f const&, float, MonoArray*, int, QueryTriggerInteraction)
    #10 UNKNOWN .
     
  14. jknight-nc

    jknight-nc

    Joined:
    Jun 10, 2014
    Posts:
    49
    I'm having this problem on Android as well, using Unity 5.6.0f3. Seems like a pretty fundamental problem.
    Here's the stack trace:

    Code (CSharp):
    1. 07-31 20:50:13.490 14671 14671 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    2. 07-31 20:50:13.490 14671 14671 F DEBUG   :     r0 e407ed34  r1 c5e5bd10  r2 00000000  r3 c5bcdd10
    3. 07-31 20:50:13.490 14671 14671 F DEBUG   :     r4 e407f81c  r5 e407f808  r6 c5e5bd10  r7 c5bcdd10
    4. 07-31 20:50:13.490 14671 14671 F DEBUG   :     r8 ca4079e0  r9 00000000  sl 00000000  fp e407f648
    5. 07-31 20:50:13.490 14671 14671 F DEBUG   :     ip d0dd68cc  sp e407ed20  lr d0dd6904  pc 00000000  cpsr a00d0010
    6. 07-31 20:50:13.510 14671 14671 F DEBUG   :
    7. 07-31 20:50:13.510 14671 14671 F DEBUG   : backtrace:
    8. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #00 pc 00000000  <unknown>
    9. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #01 pc 007f2900  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZN10CastFilter9preFilterERKN5physx12PxFilterDataEPKNS0_7PxShapeEPKNS0_12PxRigidActorERNS0_7PxFlagsINS0_9PxHitFlag4EnumEtEE+52)
    10. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #02 pc 011a2c70  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZN18MultiQueryCallbackIN5physx12PxOverlapHitEE6invokeERfPKNS0_2Sq13PrunerPayloadEj+388)
    11. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #03 pc 012c4b68  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZN28BucketPrunerOverlapTraversalI16OBBAABBTest_SIMDLb0EEclERKN5physx2Sq16BucketPrunerCoreERKS0_RNS3_14PrunerCallbackERKNS2_9PxBounds3E.part.26+2260)
    12. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #04 pc 012ca098  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZNK5physx2Sq16BucketPrunerCore7overlapERKNS0_9ShapeDataERNS0_14PrunerCallbackE+2844)
    13. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #05 pc 012bda60  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZNK5physx2Sq10AABBPruner7overlapERKNS0_9ShapeDataERNS0_14PrunerCallbackE+228)
    14. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #06 pc 011a4938  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZNK5physx14NpSceneQueries10multiQueryINS_12PxOverlapHitEEEbRKNS_15MultiQueryInputERNS_13PxHitCallbackIT_EENS_7PxFlagsINS_9PxHitFlag4EnumEtEEPKNS_12PxQ
    15. ueryCacheERKNS_17PxQueryFilterDataEPNS_21PxQueryFilterCallbackEPNS_20BatchQueryFilterDataE+1804)
    16. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #07 pc 011a4a84  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZNK5physx14NpSceneQueries7overlapERKNS_10PxGeometryERKNS_11PxTransformERNS_13PxHitCallbackINS_12PxOverlapHitEEERKNS_17PxQueryFilterDataEPNS_21PxQueryF
    17. ilterCallbackE+92)
    18. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #08 pc 007d4954  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZN5Unity12PhysicsQuery18OverlapBoxInternalERK8Vector3fS3_RK11Quaternionfi23QueryTriggerInteractionRN5physx13PxHitCallbackINS8_12PxOverlapHitEEE+260)
    19. 07-31 20:50:13.510 14671 14671 F DEBUG   :     #09 pc 007d4a64  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_ZN5Unity12PhysicsQuery18OverlapBoxNonAllocERK8Vector3fS3_RK11QuaternionfPP8Colliderii23QueryTriggerInteraction+244)
    20. 07-31 20:50:13.511 14671 14671 F DEBUG   :     #10 pc 00ad01fc  /data/app/com.mycompany.mygame-2/lib/arm/libunity.so (_Z47Physics_CUSTOM_INTERNAL_CALL_OverlapBoxNonAllocRK8Vector3fS1_P9MonoArrayRK11Quaternionfi23QueryTriggerInteraction+152)
     
  15. jknight-nc

    jknight-nc

    Joined:
    Jun 10, 2014
    Posts:
    49

    Thank you very much for posting this code.

    I used it to reimplement the OverlapBox API that is broken. It uses an OverlapSphere to get the nearby colliders, and then uses your BoxBox algorithm to see if the box collider is touching the other collider. The other collider is assumed to also be a box collider, if it is not, the collision will not be accurate (it will use the other colliders transform localScale as the box extents).

    Also, I'm relying on this mental calculation I made that the Sphere that fully encompases a box will have a radius of:

    var radius = 0.5f * new Vector3(boxWidth, boxHeight, boxDepth).magnitude;


    Someone please let me know if I'm wrong there. EDIT: I have since confirmed this to be true.

    Here's my blog post about the workaround.

    Here's the code that reimplements OverlapBox.
    It's very fast and is built on top of Bunzaga's collision detection. It works correctly for BoxColliders, and almost for Sphere Colliders. If you need accurate results against Sphere Colliders, update the position and halfExtent calculations with specific code for Shere Colliders.

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3.  
    4. public static class CollisionCheck
    5. {
    6.     private static Vector3 _AB = new Vector3(); // Direction A to B
    7.     private static float[] _R = new float[9]; // 3x3 Rotation
    8.     private static float[] _AbsR = new float[9]; // 3x3 Rotation
    9.     private static Vector3 _AX = new Vector3(); // A Axis
    10.     private static Vector3 _BX = new Vector3(); // B Axis
    11.  
    12.     private static Vector3 _v1 = new Vector3();
    13.     private static Vector3 _v2 = new Vector3();
    14.     private static Vector3 _v3 = new Vector3();
    15.  
    16.     private static float[] _aRot = new float[9];
    17.     private static float[] _bRot = new float[9];
    18.  
    19.     private static float ar = 0.0f, br = 0.0f;
    20.  
    21.     private static float[] _identityMatrix = new float[9] { 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f };
    22.  
    23.     private static Collider[] sphere_cast_collider_storage = new Collider[32];
    24.  
    25.     public static Vector3 HalfExtentsFromBoxCollider(BoxCollider boxCollider1) {
    26.         return new Vector3(boxCollider1.size.x * boxCollider1.transform.localScale.x * 0.5f, boxCollider1.size.y * boxCollider1.transform.localScale.y * 0.5f, boxCollider1.size.z * boxCollider1.transform.localScale.z * 0.5f);
    27.     }
    28.     public static Vector3 PositionFromCollider(BoxCollider collider) {
    29.         return collider.transform.position + collider.center;
    30.     }
    31.  
    32.     public static int OverlapBox(Vector3 center, Vector3 halfExtents, Quaternion rotation, Collider[] colliderStorage, LayerMask killLayer) {
    33.         var radius = 0.5f * new Vector3(halfExtents.x*2.0f, halfExtents.y*2.0f, halfExtents.z*2.0f).magnitude;
    34.         int numOverlaps = Physics.OverlapSphereNonAlloc(center, radius, sphere_cast_collider_storage, killLayer.value);
    35.         int numBoxOverlaps = 0;
    36.         for (int i = 0; i < numOverlaps; i++) {
    37.             var nearbyCollider = sphere_cast_collider_storage[I];
    38.             //Debug.Log("Testing against " + nearbyCollider.gameObject.name);
    39.             var nearbyBoxCollider = nearbyCollider.GetComponent<BoxCollider>();
    40.             var nearbyColliderHalfExtents = nearbyBoxCollider != null ? HalfExtentsFromBoxCollider(nearbyBoxCollider) : nearbyCollider.transform.localScale * 0.5f;
    41.             var nearbyColliderPosition = nearbyBoxCollider != null ? PositionFromCollider(nearbyBoxCollider) : nearbyCollider.transform.position;
    42.             //Debug.Log("Position: " + nearbyCollider.transform.position);
    43.             //Debug.Log("Rotation: " + nearbyCollider.transform.rotation);
    44.             //Debug.Log("Half Extents: " + nearbyColliderHalfExtents);
    45.             //Debug.Log("Has box: " + (nearbyBoxCollider != null).ToString());
    46.             if (CollisionCheck.Box_Box(center, halfExtents, rotation, nearbyColliderPosition, nearbyColliderHalfExtents, nearbyCollider.transform.rotation)) {
    47.                 colliderStorage[numBoxOverlaps++] = sphere_cast_collider_storage[I];
    48.             }
    49.         }
    50.         return numBoxOverlaps;
    51.     }
    52.  
    53.     // Adapted from: [URL]http://www.gamasutra.com/view/feature/131790/simple_intersection_tests_for_games.php?print=1[/URL]
    54.     public static bool Box_Box (Vector3 aPos, Vector3 aSize, Quaternion aQuat, Vector3 bPos, Vector3 bSize, Quaternion bQuat)
    55.     {
    56.         ar = 0.0f;
    57.         br = 0.0f;
    58.  
    59.         QuaternionToFloatArray(aQuat, _aRot);
    60.         QuaternionToFloatArray(bQuat, _bRot);
    61.  
    62.  
    63.         for (int i = 0, i1 = 0; i < 3; i++, i1 += 3)
    64.         {
    65.             _AX.Set(_aRot[i1], _aRot[i1 + 1], _aRot[i1 + 2]);
    66.             for (int j = 0, j1 = 0; j < 3; j++, j1 += 3)
    67.             {
    68.                 _BX.Set(_bRot[j1], _bRot[j1 + 1], _bRot[j1 + 2]);
    69.                 _R[i1 + j] = Vector3.Dot(_AX, _BX);
    70.             }
    71.         }
    72.  
    73.         _AB = bPos - aPos;
    74.  
    75.         _v1.Set(_aRot[0], _aRot[1], _aRot[2]);
    76.         _v2.Set(_aRot[3], _aRot[4], _aRot[5]);
    77.         _v3.Set(_aRot[6], _aRot[7], _aRot[8]);
    78.  
    79.         _AB.Set(Vector3.Dot(_AB, _v1), Vector3.Dot(_AB, _v2), Vector3.Dot(_AB, _v3));
    80.  
    81.         for (int i = 0; i < 9; i++)
    82.         {
    83.             _AbsR[I] = Mathf.Abs(_R[I]) + 0.001f;
    84.         }
    85.         // Test axes L = A0, L = A1, L = A2
    86.         for (int i = 0, i1 = 0; i < 3; i++, i1 += 3)
    87.         {
    88.             ar = aSize[I];
    89.             br = (bSize[0] * _AbsR[i1]) + (bSize[1] * _AbsR[i1 + 1]) + (bSize[2] * _AbsR[i1 + 2]);
    90.             if (Mathf.Abs(_AB[I]) > (ar + br)) { return false; }
    91.         }
    92.         // Test axes L = B0, L = B1, L = B2
    93.         for (int i = 0; i < 3; i++)
    94.         {
    95.             ar = (aSize[0] * _AbsR[I]) + (aSize[1] * _AbsR[i + 3]) + (aSize[2] * _AbsR[i + 6]);
    96.             br = bSize[I];
    97.             if (Mathf.Abs((_AB[0] * _R[I]) + (_AB[1] * _R[i + 3]) + (_AB[2] * _R[i + 6])) > (ar + br)) { return false; }
    98.         }
    99.         // Test axis L = A0 x B0
    100.         ar = (aSize[1] * _AbsR[6]) + (aSize[2] * _AbsR[3]);
    101.         br = (bSize[1] * _AbsR[2]) + (bSize[2] * _AbsR[1]);
    102.         if (Mathf.Abs(_AB[2] * _R[3] - _AB[1] * _R[6]) > (ar + br)) { return false; }
    103.         // Test axis L = A0 x B1
    104.         ar = (aSize[1] * _AbsR[7]) + (aSize[2] * _AbsR[4]);
    105.         br = (bSize[0] * _AbsR[2]) + (bSize[2] * _AbsR[0]);
    106.         if (Mathf.Abs((_AB[2] * _R[4]) - (_AB[1] * _R[7])) > (ar + br)) { return false; }
    107.         // Test axis L = A0 x B2
    108.         ar = aSize[1] * _AbsR[8] + aSize[2] * _AbsR[5];
    109.         br = bSize[0] * _AbsR[1] + bSize[1] * _AbsR[0];
    110.         if (Mathf.Abs((_AB[2] * _R[5]) - (_AB[1] * _R[8])) > (ar + br)) { return false; }
    111.         // Test axis L = A1 x B0
    112.         ar = (aSize[0] * _AbsR[6]) + (aSize[2] * _AbsR[0]);
    113.         br = (bSize[1] * _AbsR[5]) + (bSize[2] * _AbsR[4]);
    114.         if (Mathf.Abs((_AB[0] * _R[6]) - (_AB[2] * _R[0])) > (ar + br)) { return false; }
    115.         // Test axis L = A1 x B1
    116.         ar = (aSize[0] * _AbsR[7]) + (aSize[2] * _AbsR[1]);
    117.         br = (bSize[0] * _AbsR[5]) + (bSize[2] * _AbsR[3]);
    118.         if (Mathf.Abs((_AB[0] * _R[7]) - (_AB[2] * _R[1])) > (ar + br)) { return false; }
    119.         // Test axis L = A1 x B2
    120.         ar = (aSize[0] * _AbsR[8]) + (aSize[2] * _AbsR[2]);
    121.         br = (bSize[0] * _AbsR[4]) + (bSize[1] * _AbsR[3]);
    122.         if (Mathf.Abs((_AB[0] * _R[8]) - (_AB[2] * _R[2])) > (ar + br)) { return false; }
    123.         // Test axis L = A2 x B0
    124.         ar = (aSize[0] * _AbsR[3]) + (aSize[1] * _AbsR[0]);
    125.         br = (bSize[1] * _AbsR[8]) + (bSize[2] * _AbsR[7]);
    126.         if (Mathf.Abs((_AB[1] * _R[0]) - (_AB[0] * _R[3])) > (ar + br)) { return false; }
    127.         // Test axis L = A2 x B1
    128.         ar = (aSize[0] * _AbsR[4]) + (aSize[1] * _AbsR[1]);
    129.         br = (bSize[0] * _AbsR[8]) + (bSize[2] * _AbsR[6]);
    130.         if (Mathf.Abs((_AB[1] * _R[1]) - (_AB[0] * _R[4])) > (ar + br)) { return false; }
    131.         // Test axis L = A2 x B2
    132.         ar = (aSize[0] * _AbsR[4]) + (aSize[1] * _AbsR[2]);
    133.         br = (bSize[0] * _AbsR[7]) + (bSize[1] * _AbsR[6]);
    134.         if (Mathf.Abs((_AB[1] * _R[2]) - (_AB[0] * _R[5])) > (ar + br)) { return false; }
    135.         return true;
    136.     }
    137.  
    138.     // Adapted from: [URL]http://www.mrelusive.com/publications/papers/SIMD-From-Quaternion-to-Matrix-and-Back.pdf[/URL]
    139.     private static float[] QuaternionToFloatArray(Quaternion aQuat, float[] aFlatMatrix3x3 )
    140.     {
    141.         if(aFlatMatrix3x3 == null) {
    142.             aFlatMatrix3x3 = new float[9];
    143.         }
    144.  
    145.         aFlatMatrix3x3[0] = 1- (2.0f * (aQuat.y * aQuat.y)) - (2.0f * (aQuat.z * aQuat.z));
    146.         aFlatMatrix3x3[1] = (2.0f * (aQuat.x * aQuat.y)) + (2.0f * (aQuat.w * aQuat.z));
    147.         aFlatMatrix3x3[2] = (2.0f * (aQuat.x * aQuat.z)) - (2.0f * (aQuat.w * aQuat.y));
    148.  
    149.         aFlatMatrix3x3[3] = (2.0f * (aQuat.x * aQuat.y)) - (2.0f * (aQuat.w * aQuat.z));
    150.         aFlatMatrix3x3[4] = 1.0f - (2.0f * (aQuat.x * aQuat.x)) - (2.0f * (aQuat.z * aQuat.z));
    151.         aFlatMatrix3x3[5] = (2.0f * (aQuat.y * aQuat.z)) + (2.0f * (aQuat.w * aQuat.x));
    152.  
    153.         aFlatMatrix3x3[6] = (2.0f * (aQuat.x * aQuat.z)) + (2.0f * (aQuat.w * aQuat.y));
    154.         aFlatMatrix3x3[7] = (2.0f * (aQuat.y * aQuat.z)) - (2.0f * (aQuat.w * aQuat.x));
    155.         aFlatMatrix3x3[8] = 1.0f - (2.0f * (aQuat.x * aQuat.x)) - (2.0f * (aQuat.y * aQuat.y));
    156.  
    157.         return aFlatMatrix3x3;
    158.     }
    159. }
    160.  
    161.  
     
    Last edited: Aug 2, 2017
  16. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    116
    We are seeing the same thing it seems with overlap capsule. Switching to overlap sphere seems to fix it. But after reading some of these forums I wonder if it won't show up again.

    iOS and editor do not have this problem.
    Both versions of unity 2017 have the problem on android. Tried on several android devices with various os versions.
    All seem to crash randomly.
     
  17. jknight-nc

    jknight-nc

    Joined:
    Jun 10, 2014
    Posts:
    49
    Yeah I noticed that OverlapCapsule/CapsuleCast/CheckCapsule are all broken on Android as well. Though they seem to show up on some < 50% of calls.

    Certainly an annoying, long standing problem. I wonder if there's a bug number we can track yet.