Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Crash on Button Press (Android, Unity 2018.4.3f1 LTS, both IL2CPP and Mono)

Discussion in 'Android' started by yuch3n, Jul 4, 2019.

  1. yuch3n

    yuch3n

    Joined:
    Sep 26, 2018
    Posts:
    26
    I'm in the process of updating a game to Unity 2018 LTS. I was able to build and run the game on my Pixel 2, and was able to press most of the buttons. However, when I try to press one particular button in the game (that isn't much different from the others, to my knowledge), it consistently crashes. I tried setting a breakpoint in Visual Studio where the button press calls our code, but stepping through it showed no errors. It didn't even pause execution on the System.Exception breakpoint that I had set, which leads me to believe this is a Unity bug. This happens on both IL2CPP and Mono compilation. However, it does not crash in Editor. Here is the crash log from logcat:

    Code (CSharp):
    1. 07-03 15:25:12.181 20236 22313 E CRASH   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00003e20
    2. 07-03 15:25:12.181 20236 22313 E CRASH   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    3. 07-03 15:25:12.181 20236 22313 E CRASH   : Build type 'Development', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
    4. 07-03 15:25:12.181 20236 22313 E CRASH   : Build fingerprint: 'google/walleye/walleye:9/PQ3A.190605.003/5524043:user/release-keys'
    5. 07-03 15:25:12.181 20236 22313 E CRASH   : Revision: 'MP1'
    6. 07-03 15:25:12.182 20236 22313 E CRASH   : pid: 20236, tid: 22313, name: UnityGfxDeviceW  >>> com.company.name <<<
    7. 07-03 15:25:12.182 20236 22313 E CRASH   :     r0 00000004  r1 00000004  r2 00000010  r3 00003e2c
    8. 07-03 15:25:12.182 20236 22313 E CRASH   :     r4 00000010  r5 00000000  r6 00000000  r7 00000010
    9. 07-03 15:25:12.182 20236 22313 E CRASH   :     r8 c4380010  r9 00000010  sl 00000008  fp 00000000
    10. 07-03 15:25:12.182 20236 22313 E CRASH   :     ip 00003e20  sp c0a7f330  lr d1925ce8  pc d1925d78  cpsr ec70cd10
    11. 07-03 15:25:12.182 20236 22313 E CRASH   :
    12. 07-03 15:25:12.182 20236 22313 E CRASH   : backtrace:
    13. 07-03 15:25:12.627 20236 22313 E CRASH   :     #00  pc 0041cd78  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (void TransformVerticesInnerLoop<false, false, true>(unsigned char*, Matrix4x4f const&, Matrix3x3f const&, bool, unsigned int, unsigned char const*, int, unsigned char const*, int, int, GfxTransformVerticesFlags, unsigned int)+340)
    14. 07-03 15:25:12.627 20236 22313 E CRASH   :     #01  pc 0041c09c  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (TransformVerticesStridedREF(unsigned char*, Matrix4x4f const&, unsigned int, unsigned char const*, int, unsigned char const*, int, int, GfxTransformVerticesFlags, unsigned int)+312)
    15. 07-03 15:25:12.627 20236 22313 E CRASH   :     #02  pc 00398884  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (ProcessDynamicBatchGeometryJob(SharedGeometryJobData*, unsigned int)+664)
    16. 07-03 15:25:12.627 20236 22313 E CRASH   :     #03  pc 008044b4  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (JobQueue::Exec(JobInfo*, int, int)+156)
    17. 07-03 15:25:12.627 20236 22313 E CRASH   :     #04  pc 00804400  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (JobQueue::Steal(JobGroup*, JobInfo*, int, int, bool)+344)
    18. 07-03 15:25:12.627 20236 22313 E CRASH   :     #05  pc 00805668  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (JobQueue::WaitForJobGroupID(JobGroupID)+108)
    19. 07-03 15:25:12.627 20236 22313 E CRASH   :     #06  pc 0081004c  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (CompleteFenceInternal(JobFence&)+16)
    20. 07-03 15:25:12.627 20236 22313 E CRASH   :     #07  pc 00365ca8  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GeometryJobTasks::PutGeometryJobFence(GfxDevice&, unsigned int)+132)
    21. 07-03 15:25:12.627 20236 22313 E CRASH   :     #08  pc 00368188  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GfxDevice::PutGeometryJobFence(int&)+32)
    22. 07-03 15:25:12.627 20236 22313 E CRASH   :     #09  pc 003681d8  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GfxDevice::DrawSharedGeometryJobs(DynamicVBOBuffer const&, unsigned int, DynamicVBOBuffer const&, unsigned int, int, DrawBuffersRange const*, unsigned int, VertexDeclaration*)+60)
    23. 07-03 15:25:12.627 20236 22313 E CRASH   :     #10  pc 00dfd66c  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)+26588)
    24. 07-03 15:25:12.627 20236 22313 E CRASH   :     #11  pc 00dfe5dc  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GfxDeviceWorker::RunExt(ThreadedStreamBuffer&)+68)
    25. 07-03 15:25:12.627 20236 22313 E CRASH   :     #12  pc 00dfe56c  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GfxDeviceWorker::Run()+132)
    26. 07-03 15:25:12.627 20236 22313 E CRASH   :     #13  pc 00df6bac  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GfxDeviceWorker::RunGfxDeviceWorker(void*)+4)
    27. 07-03 15:25:12.627 20236 22313 E CRASH   :     #14  pc 0070a9c8  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (Thread::RunThreadWrapper(void*)+696)
    28. 07-03 15:25:12.627 20236 22313 E CRASH   :     #15  pc 00063679  /system/lib/libc.so (__pthread_start(void*)+22)
    29. 07-03 15:25:12.627 20236 22313 E CRASH   :     #16  pc 0001dff9  /system/lib/libc.so (__start_thread+24)
    30. "...0...0...3.
    31. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925da8 ed880a00 ed9d1a12 ed9d0a0e ed9c4a00  .............J..
    32. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925db8 ee251a01 ed9d2a16 ee200a04 ed9d3a1a  ..%..*.... ..:..
    33. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925dc8 ee262a02 ee300a01 ee300a02 ee330a00  .*&...0...0...3.
    34. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925dd8 ed880a01 ed9d0a0f ed9d1a13 ed9c5a01  .............Z..
    35. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925de8 ee240a00 ed9d2a17 ee211a05 ed9d3a1b  ..$..*....!..:..
    36. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925df8 ee262a02 ee300a01 ee300a02 ee330a00  .*&...0...0...3.
    37. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925e08 ed880a02 0a000009 e59d0020 e588000c  ........ .......
    38. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925e18 e59d001c e5880010 e59d0018 e5880014  ................
    39. 07-03 15:25:12.630 20236 22313 E CRASH   :     d1925e28 e2888018 e3560000 1a000003 ea00000b  ......V.........
    40. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925e38 e288800c e3560000 0a000008 e59d0014  ......V.........
    41. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925e48 e5880000 e59d0010 e5880004 e59d000c  ................
    42. 07-03 15:25:12.631 20236 22313 E CRASH   :
    43. 07-03 15:25:12.631 20236 22313 E CRASH   : code around lr:
    44. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925cc8 e5913008 e58d300c e58d0008 e28d2034  .0...0......4 ..
    45. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925cd8 e1a00001 e59da098 e1a01002 eb21ec89  ..............!.
    46. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925ce8 e3190c06 0a00000e eeb70a00 e2190b01  ................
    47. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925cf8 eebf1a00 e2090c02 e28d1028 eeb02a40  ........(...@*..
    48. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d08 1eb02a41 e3500000 1eb00a41 e3a005fe  A*....P.A.......
    49. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d18 e58d0030 e28d0034 ed8d2a0b ed8d0a0a  0...4....*......
    50. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d28 ebfebed4 e35a0000 0a000086 e59d10ac  ......Z.........
    51. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d38 e209b020 e59d20a8 e59d30a4 e1a00fc1   .... ...0......
    52. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d48 e59d40a0 e0810f20 e59dc09c e1a00140  .@.. .......@...
    53. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d58 e3c07003 e58d7000 e2097010 e58d0024  .p...p...p..$...
    54. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d68 e1a00100 e58d0004 ed9d0a0d e3550000  ..............U.
    55. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d78 ed9c4a00 ed9d1a11 ed9c5a01 ee200a04  .J.......Z.... .
    56. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d88 ed9d2a15 ee211a05 ed9c6a02 ed9d3a19  .*....!..j...:..
    57. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d98 ee222a06 ee300a01 ee300a02 ee330a00  .*"...0...0...3.
    58. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925da8 ed880a00 ed9d1a12 ed9d0a0e ed9c4a00  .............J..
    59. 07-03 15:25:12.631 20236 22313 E CRASH   :     d1925db8 ee251a01 ed9d2a16 ee200a04 ed9d3a1a  ..%..*.... ..:..
    Not sure if this will help, but following the instructions on this page, I was able to translate the memory addresses to this stacktrace:

    Code (CSharp):
    1. 0041cd78    GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
    2.  
    3. 0041c09c    GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)
    4.  
    5. 00398884    AudioManager::FixMasterGroupRouting()
    6.  
    7. 008044b4    PrepareShadowMapsJob(ShadowMapJobHeader*)
    8.  
    9. 00804400    PrepareShadowMapsJob(ShadowMapJobHeader*)
    10.  
    11. 00805668    RenderShadowMaps(ShadowMapJobHeader const*, ShaderPassContext&, RenderTexture::SetActiveFlags)
    12.  
    13. 0081004c    DoDeferredRenderLoop(RenderLoopContext const&, dynamic_array<RenderObjectData, 0u>&, dynamic_array<RenderObjectData, 0u>&, CullResults const&, RenderTexture*&, RenderTexture*&, bool*)
    14.  
    15. 00365ca8    ValidateOrReconnectPath(NavMeshQuery*, CrowdAgent&, QueryFilter const&, unsigned long long*, Vector3f*)
    16.  
    17. 00368188    NavMesh::QueryPolygons(int, Vector3f const&, Vector3f const&, NavMeshProcessCallback*) const
    18.  
    19. 003681d8    NavMesh::QueryPolygons(int, Vector3f const&, Vector3f const&, NavMeshProcessCallback*) const
    20.  
    21. 00dfd66c    physx::Gu::contactCapsuleBox(physx::Gu::GeometryUnion const&, physx::Gu::GeometryUnion const&, physx::PxTransform const&, physx::PxTransform const&, physx::Gu::NarrowPhaseParams const&, physx::Gu::Cache&, physx::Gu::ContactBuffer&, physx::Cm::RenderOutput*)
    22.  
    23. 00dfe5dc    physx::Gu::contactCapsuleBox(physx::Gu::GeometryUnion const&, physx::Gu::GeometryUnion const&, physx::PxTransform const&, physx::PxTransform const&, physx::Gu::NarrowPhaseParams const&, physx::Gu::Cache&, physx::Gu::ContactBuffer&, physx::Cm::RenderOutput*)
    24.  
    25. 00dfe56c    physx::Gu::contactCapsuleBox(physx::Gu::GeometryUnion const&, physx::Gu::GeometryUnion const&, physx::PxTransform const&, physx::PxTransform const&, physx::Gu::NarrowPhaseParams const&, physx::Gu::Cache&, physx::Gu::ContactBuffer&, physx::Cm::RenderOutput*)
    26.  
    27. 00df6bac    physx::Gu::GjkStatus physx::Gu::gjkPenetration<physx::Gu::RelativeConvex<physx::Gu::TriangleV>, physx::Gu::LocalConvex<physx::Gu::CapsuleV> >(physx::Gu::RelativeConvex<physx::Gu::TriangleV> const&, physx::Gu::LocalConvex<physx::Gu::CapsuleV> const&, __simd128_float32_t const&, __simd64_float32_t const&, __simd128_float32_t&, __simd128_float32_t&, __simd128_float32_t&, __simd64_float32_t&, unsigned char*, unsigned char*, unsigned char&, bool)
    28.  
    29. 0070a9c8    TouchScreenKeyboard_CUSTOM_get_area_Injected(RectT<float>&)
    30.  
    31. 00063679    _GLOBAL__sub_I_Runtime_Graphics_9.cpp
     
    Last edited: Jul 4, 2019
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,852
    Hi!
    Please submit a bug report.
     
  3. yuch3n

    yuch3n

    Joined:
    Sep 26, 2018
    Posts:
    26
    Hi, to my knowledge you can only submit bug reports with crashes in the Editor, and you need to have a sample project to do so. My project is rather massive and might take a while to strip away the excess parts. Is there a place I can send just the crash logs above? Perhaps an email I can send them to?
     
  4. yuch3n

    yuch3n

    Joined:
    Sep 26, 2018
    Posts:
    26
    aleksandrk likes this.
  5. yuch3n

    yuch3n

    Joined:
    Sep 26, 2018
    Posts:
    26
    Unity hasn't responded yet to my email but I have found that the crash occurs on iOS as well. I found that it wasn't the button that was causing the crash, but the piece of UI that the button opened. The UI has a CanvasRenderer and a child object with a MeshRenderer with a mesh that consists of two submeshes, each with its own Material in the Materials list of the MeshRenderer component. When I remove one of the materials from the list, the crash no longer occurs. However, I have not been able to isolate the crash. It seems there is something else about the project that contributes to this scenario that I have yet to pinpoint.
     
  6. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    127
    Any updates on this issue? I just tried today with 2019.3.0f1 and still occours on my android device, after a few seconds of gameplay. I'm using 2D Animation, Burst, Jobs and Collections packages the last 2 ones are in preview.
     
  7. yuch3n

    yuch3n

    Joined:
    Sep 26, 2018
    Posts:
    26
    I don't see any new updates on the bug I filed, unfortunately. If you are having the same two-submeshes-with-different-materials problem as me, I'd say it's probably easier just to separate the two submeshes into individual meshes, as a workaround.
     
  8. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    127
    Thanks, I filed a new bug report. I'm not using meshes in my game and I have a felling this is caused by the 2D animation package if so it may not have a simple way to fix it.