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

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:

07-03 15:25:12.181 20236 22313 E CRASH   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00003e20
07-03 15:25:12.181 20236 22313 E CRASH   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
07-03 15:25:12.181 20236 22313 E CRASH   : Build type 'Development', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
07-03 15:25:12.181 20236 22313 E CRASH   : Build fingerprint: 'google/walleye/walleye:9/PQ3A.190605.003/5524043:user/release-keys'
07-03 15:25:12.181 20236 22313 E CRASH   : Revision: 'MP1'
07-03 15:25:12.182 20236 22313 E CRASH   : pid: 20236, tid: 22313, name: UnityGfxDeviceW  >>> com.company.name <<<
07-03 15:25:12.182 20236 22313 E CRASH   :     r0 00000004  r1 00000004  r2 00000010  r3 00003e2c
07-03 15:25:12.182 20236 22313 E CRASH   :     r4 00000010  r5 00000000  r6 00000000  r7 00000010
07-03 15:25:12.182 20236 22313 E CRASH   :     r8 c4380010  r9 00000010  sl 00000008  fp 00000000
07-03 15:25:12.182 20236 22313 E CRASH   :     ip 00003e20  sp c0a7f330  lr d1925ce8  pc d1925d78  cpsr ec70cd10
07-03 15:25:12.182 20236 22313 E CRASH   :
07-03 15:25:12.182 20236 22313 E CRASH   : backtrace:
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)
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)
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)
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)
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)
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)
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)
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)
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)
07-03 15:25:12.627 20236 22313 E CRASH   :     #09  pc 003681d8  /data/app/com.company.name-RT5DNnwvwO8QqHY6UfQpsg==/lib/arm/libunity.so (GfxDevice::smile:rawSharedGeometryJobs(DynamicVBOBuffer const&, unsigned int, DynamicVBOBuffer const&, unsigned int, int, DrawBuffersRange const*, unsigned int, VertexDeclaration*)+60)
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)
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)
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)
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)
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)
07-03 15:25:12.627 20236 22313 E CRASH   :     #15  pc 00063679  /system/lib/libc.so (__pthread_start(void*)+22)
07-03 15:25:12.627 20236 22313 E CRASH   :     #16  pc 0001dff9  /system/lib/libc.so (__start_thread+24)
07-03 15:25:12.627 20236 22313 E CRASH   :
07-03 15:25:12.627 20236 22313 E CRASH   : memory near r3:
07-03 15:25:12.627 20236 22313 E CRASH   :     00003e0c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.627 20236 22313 E CRASH   :     00003e1c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.627 20236 22313 E CRASH   :     00003e2c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.627 20236 22313 E CRASH   :     00003e3c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.627 20236 22313 E CRASH   :     00003e4c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.627 20236 22313 E CRASH   :     00003e5c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003e6c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003e7c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003e8c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003e9c ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003eac ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003ebc ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003ecc ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003edc ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003eec ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003efc ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :
07-03 15:25:12.628 20236 22313 E CRASH   : memory near ip:
07-03 15:25:12.628 20236 22313 E CRASH   :     00003e00 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.628 20236 22313 E CRASH   :     00003e10 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e20 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e30 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e40 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e50 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e60 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e70 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e80 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003e90 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003ea0 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003eb0 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.629 20236 22313 E CRASH   :     00003ec0 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.630 20236 22313 E CRASH   :     00003ed0 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.630 20236 22313 E CRASH   :     00003ee0 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.630 20236 22313 E CRASH   :     00003ef0 ffffffff ffffffff ffffffff ffffffff  ................
07-03 15:25:12.630 20236 22313 E CRASH   :
07-03 15:25:12.630 20236 22313 E CRASH   : code around pc:
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925d58 e3c07003 e58d7000 e2097010 e58d0024  .p...p...p..$...
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925d68 e1a00100 e58d0004 ed9d0a0d e3550000  ..............U.
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925d78 ed9c4a00 ed9d1a11 ed9c5a01 ee200a04  .J.......Z.... .
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925d88 ed9d2a15 ee211a05 ed9c6a02 ed9d3a19  .*....!..j...:..
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925d98 ee222a06 ee300a01 ee300a02 ee330a00  .*"...0...0...3.
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925da8 ed880a00 ed9d1a12 ed9d0a0e ed9c4a00  .............J..
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925db8 ee251a01 ed9d2a16 ee200a04 ed9d3a1a  ..%..*.... ..:..
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925dc8 ee262a02 ee300a01 ee300a02 ee330a00  .*&...0...0...3.
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925dd8 ed880a01 ed9d0a0f ed9d1a13 ed9c5a01  .............Z..
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925de8 ee240a00 ed9d2a17 ee211a05 ed9d3a1b  ..$..*....!..:..
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925df8 ee262a02 ee300a01 ee300a02 ee330a00  .*&...0...0...3.
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925e08 ed880a02 0a000009 e59d0020 e588000c  ........ .......
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925e18 e59d001c e5880010 e59d0018 e5880014  ................
07-03 15:25:12.630 20236 22313 E CRASH   :     d1925e28 e2888018 e3560000 1a000003 ea00000b  ......V.........
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925e38 e288800c e3560000 0a000008 e59d0014  ......V.........
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925e48 e5880000 e59d0010 e5880004 e59d000c  ................
07-03 15:25:12.631 20236 22313 E CRASH   :
07-03 15:25:12.631 20236 22313 E CRASH   : code around lr:
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925cc8 e5913008 e58d300c e58d0008 e28d2034  .0...0......4 ..
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925cd8 e1a00001 e59da098 e1a01002 eb21ec89  ..............!.
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925ce8 e3190c06 0a00000e eeb70a00 e2190b01  ................
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925cf8 eebf1a00 e2090c02 e28d1028 eeb02a40  ........(...@*..
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d08 1eb02a41 e3500000 1eb00a41 e3a005fe  A*....P.A.......
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d18 e58d0030 e28d0034 ed8d2a0b ed8d0a0a  0...4....*......
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d28 ebfebed4 e35a0000 0a000086 e59d10ac  ......Z.........
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d38 e209b020 e59d20a8 e59d30a4 e1a00fc1   .... ...0......
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d48 e59d40a0 e0810f20 e59dc09c e1a00140  .@.. .......@...
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d58 e3c07003 e58d7000 e2097010 e58d0024  .p...p...p..$...
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d68 e1a00100 e58d0004 ed9d0a0d e3550000  ..............U.
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d78 ed9c4a00 ed9d1a11 ed9c5a01 ee200a04  .J.......Z.... .
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d88 ed9d2a15 ee211a05 ed9c6a02 ed9d3a19  .*....!..j...:..
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925d98 ee222a06 ee300a01 ee300a02 ee330a00  .*"...0...0...3.
07-03 15:25:12.631 20236 22313 E CRASH   :     d1925da8 ed880a00 ed9d1a12 ed9d0a0e ed9c4a00  .............J..
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:

0041cd78    GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)

0041c09c    GfxDeviceWorker::RunCommand(ThreadedStreamBuffer&)

00398884    AudioManager::FixMasterGroupRouting()

008044b4    PrepareShadowMapsJob(ShadowMapJobHeader*)

00804400    PrepareShadowMapsJob(ShadowMapJobHeader*)

00805668    RenderShadowMaps(ShadowMapJobHeader const*, ShaderPassContext&, RenderTexture::SetActiveFlags)

0081004c    DoDeferredRenderLoop(RenderLoopContext const&, dynamic_array<RenderObjectData, 0u>&, dynamic_array<RenderObjectData, 0u>&, CullResults const&, RenderTexture*&, RenderTexture*&, bool*)

00365ca8    ValidateOrReconnectPath(NavMeshQuery*, CrowdAgent&, QueryFilter const&, unsigned long long*, Vector3f*)

00368188    NavMesh::QueryPolygons(int, Vector3f const&, Vector3f const&, NavMeshProcessCallback*) const

003681d8    NavMesh::QueryPolygons(int, Vector3f const&, Vector3f const&, NavMeshProcessCallback*) const

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*)

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*)

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*)

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)

0070a9c8    TouchScreenKeyboard_CUSTOM_get_area_Injected(RectT<float>&)

00063679    _GLOBAL__sub_I_Runtime_Graphics_9.cpp

Hi!
Please submit a bug report.

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?

Nevermind, found bugs@unity3d.com

1 Like

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.

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.

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.

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.