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. Dismiss Notice

Crash on Android with signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 000000f0

Discussion in 'Android' started by ercion, Sep 23, 2017.

  1. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Greetings :)
    I'm getting a signal 11 (SIGSEGV) crash on Android and I need help fixing it :( Maybe it's a bug in Unity? Following are the details:

    I'm developing an isometric game that has only 1 scene and both 2D and 3D objects. The apk is 79MB and works great on Nexus 5X (Android 8). However, I tried running it on Samsung Galaxy Duos S7852 (Android 4.2.2) and it crashes.
    On Nexus 5X, it's white screen > black screen > game start.
    On S7852, it's white screen > black screen > crash.

    I have been doing some digging and found this in the adb log: https://pastebin.com/StYjxuak

    I had my suspicions on the RAM of this device (768MB). So I created an emulator with same Android version, screen size and RAM size, and the game works on the emulator! So I'm guessing this is a hardware related issue?

    I also tried creating another scene and loading the main scene async. In this case, the first scene loads and the app crashes some time later.

    Any help is appreciated :)
     
  2. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    Have you tried building an empty project and running it?
    We experience the same problem and it only crashes on our project.
    It launches one time in five, then works ok (relatively - stable 30 fps without any crashes for the whole game).
    I stopped using this crashy 4.4.2 device a long time ago as it had 512 megs of ram and the former project wasn't able to run on that. So I haven't built any real projects on that device since ~5.2-ish version I think, but before that it worked fine on smaller Unity projects. New project however should run fine on it (which it does) as we use only 30 megs of ram tops, but doesn't always launch.
    I tried building empty projects and they don't seem to crash at all, they launch 100% of the time. I haven't been able to pin down the problem, but maybe it's something with included .dlls or plugins, I don't know.
    It crashes on startup with this message, which is related to graphics drivers (Adreno GPU):
    Code (CSharp):
    1. I/DEBUG   (  258): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2. I/DEBUG   (  258): Build fingerprint: 'ZTE/ZTE-V811/ZTE-V811:4.4.2/KOT49H/eng.root.20140911.150643:user/release-keys'
    3. I/DEBUG   (  258): Revision: '0'
    4. I/DEBUG   (  258): pid: 16190, tid: 16211, name: UnityGfxDeviceW  >>> org.nadezhdin.roadtrip <<<
    5. I/DEBUG   (  258): signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 62628000
    6. I/DEBUG   (  258):     r0 63dfefb8  r1 62627dd0  r2 00001000  r3 00000000
    7. I/DEBUG   (  258):     r4 619f0288  r5 00000001  r6 00001000  r7 621bb170
    8. I/DEBUG   (  258):     r8 00008892  r9 62627390  sl 62628000  fp 00001000
    9. I/DEBUG   (  258):     ip 0000000e  sp 62725580  lr 00000280  pc 400be1f4  cpsr 200e0030
    10. I/DEBUG   (  258):     d0  0000000000000000  d1  0000000000000000
    11. I/DEBUG   (  258):     d2  0000000000000000  d3  0000000000000000
    12. I/DEBUG   (  258):     d4  0000000000000000  d5  0000000000000000
    13. I/DEBUG   (  258):     d6  0000000000000000  d7  0000005300000000
    14. I/DEBUG   (  258):     d8  0000000000000000  d9  0000000000000000
    15. I/DEBUG   (  258):     d10 0000000000000000  d11 0000000000000000
    16. I/DEBUG   (  258):     d12 0000000000000000  d13 0000000000000000
    17. I/DEBUG   (  258):     d14 0000000000000000  d15 0000000000000000
    18. I/DEBUG   (  258):     d16 5fa824f95fbeb620  d17 000000000000001b
    19. I/DEBUG   (  258):     d18 0004000000000000  d19 0000000000008a0c
    20. I/DEBUG   (  258):     d20 0004000062728020  d21 0000000300040000
    21. I/DEBUG   (  258):     d22 0000000000000000  d23 0000009300000000
    22. I/DEBUG   (  258):     d24 000000003f800000  d25 0000000000000000
    23. I/DEBUG   (  258):     d26 3f80000000000000  d27 0000000000000000
    24. I/DEBUG   (  258):     d28 0000000000000000  d29 000000003f800000
    25. I/DEBUG   (  258):     d30 0000000000000000  d31 3f80000000000000
    26. I/DEBUG   (  258):     scr 60000012
    27. I/DEBUG   (  258):
    28. I/DEBUG   (  258): backtrace:
    29. I/DEBUG   (  258):     #00  pc 000221f4  /system/lib/libc.so (__memcpy_base+219)
    30. I/DEBUG   (  258):     #01  pc 000690c7  /system/vendor/lib/egl/libGLESv2_adreno.so (core_glBufferData+494)
    31. I/DEBUG   (  258):     #02  pc 00041aa9  /system/vendor/lib/egl/libGLESv2_adreno.so (glBufferData+28)
    32. I/DEBUG   (  258):     #03  pc 005d7348  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    33. I/DEBUG   (  258):     #04  pc 005ad1f4  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    34. I/DEBUG   (  258):     #05  pc 005ad11c  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    35. I/DEBUG   (  258):     #06  pc 005bcc28  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    36. I/DEBUG   (  258):     #07  pc 005be0bc  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    37. I/DEBUG   (  258):     #08  pc 002b2c3c  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    38. I/DEBUG   (  258):     #09  pc 002b1d78  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    39. I/DEBUG   (  258):     #10  pc 004912fc  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    40. I/DEBUG   (  258):     #11  pc 005a41c8  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    41. I/DEBUG   (  258):     #12  pc 005a790c  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    42. I/DEBUG   (  258):     #13  pc 005a0d80  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    43. I/DEBUG   (  258):     #14  pc 003fcf24  /data/app-lib/org.nadezhdin.roadtrip-1/libunity.so
    44. I/DEBUG   (  258):     #15  pc 0000d218  /system/lib/libc.so (__thread_entry+72)
    45. I/DEBUG   (  258):     #16  pc 0000d3b0  /system/lib/libc.so (pthread_create+240)
    46. I/DEBUG   (  258):
    47. I/DEBUG   (  258): stack:
    48. I/DEBUG   (  258):          62725540  611e1c00
    49. I/DEBUG   (  258):          62725544  619f0288
    50. I/DEBUG   (  258):          62725548  00001000
    51. I/DEBUG   (  258):          6272554c  00000001
    52. I/DEBUG   (  258):          62725550  621bda58
    53. I/DEBUG   (  258):          62725554  5e3c6e08  /system/vendor/lib/egl/libGLESv2_adreno.so
    54. I/DEBUG   (  258):          62725558  00000003
    55. I/DEBUG   (  258):          6272555c  00000001
    56. I/DEBUG   (  258):          62725560  00001000
    57. I/DEBUG   (  258):          62725564  5e34f721  /system/vendor/lib/egl/libGLESv2_adreno.so (rb_vbo_alloc+108)
    58. I/DEBUG   (  258):          62725568  000c0000
    59. I/DEBUG   (  258):          6272556c  00000001
    60. I/DEBUG   (  258):          62725570  00001000
    61. I/DEBUG   (  258):          62725574  00000000
    62. I/DEBUG   (  258):          62725578  df0027ad
    63. I/DEBUG   (  258):          6272557c  00000000
    64. I/DEBUG   (  258):     #00  62725580  62627390
    65. I/DEBUG   (  258):          62725584  00000001
    66. I/DEBUG   (  258):          62725588  63dfe5b8
    67. I/DEBUG   (  258):          6272558c  5e3310cb  /system/vendor/lib/egl/libGLESv2_adreno.so (core_glBufferData+498)
    68. I/DEBUG   (  258):     #01  62725590  5e33094d  /system/vendor/lib/egl/libGLESv2_adreno.so (InitBufferObject)
    69. I/DEBUG   (  258):          62725594  5e330957  /system/vendor/lib/egl/libGLESv2_adreno.so (InitBufferObject+10)
    70. I/DEBUG   (  258):          62725598  648e4820
    71. I/DEBUG   (  258):          6272559c  00000000
    72. I/DEBUG   (  258):          627255a0  621bb170
    73. I/DEBUG   (  258):          627255a4  00008892
    74. I/DEBUG   (  258):          627255a8  648e4820
    75. I/DEBUG   (  258):          627255ac  5e285f0b  /system/vendor/lib/libgsl.so (os_mutex_unlock+10)
    76. I/DEBUG   (  258):          627255b0  5e318245  /system/vendor/lib/egl/libGLESv2_adreno.so (gl2_real_mutex_unlock)
    77. I/DEBUG   (  258):          627255b4  5e3160ff  /system/vendor/lib/egl/libGLESv2_adreno.so
    78. I/DEBUG   (  258):          627255b8  621bb170
    79. I/DEBUG   (  258):          627255bc  5e330dc7  /system/vendor/lib/egl/libGLESv2_adreno.so (core_glBindBuffer+334)
    80. I/DEBUG   (  258):          627255c0  5e330ed9  /system/vendor/lib/egl/libGLESv2_adreno.so (core_glBufferData)
    81. I/DEBUG   (  258):          627255c4  62627390
    82. I/DEBUG   (  258):          627255c8  00001000
    83. I/DEBUG   (  258):          627255cc  00008892
    84. I/DEBUG   (  258):          ........  ........
    85. I/DEBUG   (  258):     #02  627255e0  000088e8
    86.  
     
  3. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    @Kumo-Kairo
    Thanks for replying!
    Empty project works fine. Even if I take everything out of my game and leave the floor and 2 buildings, it works fine.
     
  4. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    Maybe it's something with shader variants, I couldn't see any specific info on that in these forums, no one has ever solved this problem really (or they keep quiet about it).
    I'll try to break down the game and will try to pin down the problem. If you can, @ercion , you should do the same thing. There's have to be an answer.

    Edit - I tried building a debug version if APK (development build) to get a more detailed stacktrace and it doesn't crash at all, it launches correctly.
     
    Last edited: Sep 26, 2017
  5. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Maybe. I am using a shader that I copied from the internet. I also did some digging on SIGSEGV. Turns out it's the good ol' segmentation fault (please correct me if I'm wrong). That's the most cruel and difficult-to-find error I've experienced in all my years of programming. It also makes me suspect something wrong in the engine core of Unity.

    Good idea. Will do as soon as possible.
     
    rahulk1991 likes this.
  6. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    It's definitely has to do something with Unity, but there has to be a way around it - somehow it compiles small projects that work fine.

    It may be very tricky to pin down, I've seen a few cases from people that use LibGDX (another game programming engine), so it's not just Unity that has something wrong.
     
  7. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    Now I have another issue on another phone. This time on a Xiaomi 4X with 2 gigs of ram. It also crashes after the "Made with Unity" splash (the previous crash on another phone happened before that).
    The error seems relatively similar, but not exactly the same:

    Code (CSharp):
    1. 10-01 21:01:01.023 29937 29977 F libc    : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 29977 (UnityMain)
    2. 10-01 21:01:01.097   677   677 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    3. 10-01 21:01:01.099   677   677 F DEBUG   : Build fingerprint: 'Xiaomi/santoni/santoni:6.0.1/MMB29M/V8.5.2.0.MAMMIED:user/release-keys'
    4. 10-01 21:01:01.099   677   677 F DEBUG   : Revision: '0'
    5. 10-01 21:01:01.099   677   677 F DEBUG   : ABI: 'arm'
    6. 10-01 21:01:01.099   677   677 F DEBUG   : pid: 29937, tid: 29977, name: UnityMain  >>> org.nadezhdin.roadtrip <<<
    7. 10-01 21:01:01.099   677   677 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
    8. 10-01 21:01:01.147   677   677 F DEBUG   :     r0 d81bded8  r1 d820e940  r2 aca0c070  r3 ea1c9c10
    9. 10-01 21:01:01.148   677   677 F DEBUG   :     r4 d81bded8  r5 ea1c9ce0  r6 d9f02dd0  r7 d820e940
    10. 10-01 21:01:01.148   677   677 F DEBUG   :     r8 acc08b4c  r9 d81e3860  sl ffffe144  fp f396ce80
    11. 10-01 21:01:01.148   677   677 F DEBUG   :     ip f396ce30  sp f396ce80  lr ea1b9ae0  pc 00000000  cpsr 200b0010
    12. 10-01 21:01:01.149   677   677 F DEBUG   :
    13. 10-01 21:01:01.149   677   677 F DEBUG   : backtrace:
    14. 10-01 21:01:01.150   677   677 F DEBUG   :     #00 pc 00000000  <unknown>
    15. 10-01 21:01:01.150   677   677 F DEBUG   :     #01 pc 0000fadc  <unknown>
    16. 10-01 21:01:01.658   690   771 D ThermalEngine: sensor_wait: case_therm Wait done.
    17. 10-01 21:01:01.660   690   771 D ThermalEngine: sensor_monitor: case_therm Reading 36000 .
    18. 10-01 21:01:01.660   690   771 I ThermalEngine: Sensor:case_therm:36000 mC
    19. 10-01 21:01:01.660   690   771 D ThermalEngine: update_active_thresh: case_therm Active(1), Hi(1) 42000, Lo(0) -2147483648, Interval(1) 1000
    20. 10-01 21:01:01.660   690   771 D ThermalEngine: sensor_monitor: case_therm Sensor wait.
    21. 10-01 21:01:01.660   690   771 D ThermalEngine: sensor_wait: case_therm Wait start. 1000ms
    22. 10-01 21:01:02.152   681  1617 I AudioFlinger: BUFFER TIMEOUT: remove(4098) from active list on thread 0xf00ec008
    23. 10-01 21:01:02.182   681  1610 V AudioPolicyManagerCustom: getNewOutputDevice() selected device 0
    24. 10-01 21:01:02.660   690   771 D ThermalEngine: sensor_wait: case_therm Wait done.
    25. 10-01 21:01:02.662   690   771 D ThermalEngine: sensor_monitor: case_therm Reading 36000 .
    26. 10-01 21:01:02.662   690   771 I ThermalEngine: Sensor:case_therm:36000 mC
    27. 10-01 21:01:02.662   690   771 D ThermalEngine: update_active_thresh: case_therm Active(1), Hi(1) 42000, Lo(0) -2147483648, Interval(1) 1000
    28. 10-01 21:01:02.662   690   771 D ThermalEngine: sensor_monitor: case_therm Sensor wait.
    29. 10-01 21:01:02.662   690   771 D ThermalEngine: sensor_wait: case_therm Wait start. 1000ms
    30. 10-01 21:01:03.015  1761  1761 D wpa_supplicant: wlan0: Control interface command 'SIGNAL_POLL'
    31. 10-01 21:01:03.030  1761  1761 D wpa_supplicant: CTRL-DEBUG: global_ctrl_sock-sendto: sock=11 sndbuf=229376 outq=0 send_len=48
    32. 10-01 21:01:03.060  1812  1812 D StatusBar.NetworkController: onSignalStrengthsChanged received on slotId :0signalStrength=SignalStrength: 13 0 -120 -160 -120 -1 -1 99 2147483647 2147483647 2147483647 2147483647 2147483647 gsm|lte level=5 cdmdlevel=0 evdolevel=0
    33. 10-01 21:01:03.070  1812  1812 D StatusBar.NetworkController: slot=-10;action=android.net.wifi.RSSI_CHANGED
    34. 10-01 21:01:03.072  1812  1812 D StatusBar.NetworkController: updateNetworkName chosenNetType=2;mNetworkName[0]=Rostelecom
    35. 10-01 21:01:03.079  1419  1715 D ConnectivityService: notifyType CAP_CHANGED for NetworkAgentInfo [WIFI () - 128]
    36. 10-01 21:01:03.178  1419  1758 E NativeCrashListener: Exception dealing with report
    37. 10-01 21:01:03.178  1419  1758 E NativeCrashListener: android.system.ErrnoException: read failed: EAGAIN (Try again)
    38. 10-01 21:01:03.178  1419  1758 E NativeCrashListener:   at libcore.io.Posix.readBytes(Native Method)
    39. 10-01 21:01:03.178  1419  1758 E NativeCrashListener:   at libcore.io.Posix.read(Posix.java:169)
    40. 10-01 21:01:03.178  1419  1758 E NativeCrashListener:   at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
    41. 10-01 21:01:03.178  1419  1758 E NativeCrashListener:   at android.system.Os.read(Os.java:367)
    42. 10-01 21:01:03.178  1419  1758 E NativeCrashListener:   at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240)
    43. 10-01 21:01:03.178  1419  1758 E NativeCrashListener:   at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)
    44. 10-01 21:01:03.663   690   771 D ThermalEngine: sensor_wait: case_therm Wait done.
    45. 10-01 21:01:03.664   690   771 D ThermalEngine: sensor_monitor: case_therm Reading 36000 .
    46. 10-01 21:01:03.664   690   771 I ThermalEngine: Sensor:case_therm:36000 mC
    47. 10-01 21:01:03.664   690   771 D ThermalEngine: update_active_thresh: case_therm Active(1), Hi(1) 42000, Lo(0) -2147483648, Interval(1) 1000
    48. 10-01 21:01:03.664   690   771 D ThermalEngine: sensor_monitor: case_therm Sensor wait.
    49. 10-01 21:01:03.664   690   771 D ThermalEngine: sensor_wait: case_therm Wait start. 1000ms
     
  8. NinjaCat

    NinjaCat

    R&D Minion Unity Technologies

    Joined:
    Aug 22, 2013
    Posts:
    69
    Hi! Have you reported this via the bug reporter? We'd really like a bug report track these crashes :)
     
  9. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    @NinjaCat No I haven't reported yet. I didn't wanna bother them until I was sure that it was an actual bug.
     
  10. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    I'm not sure how this bug can be reproduced. It requires a certain phone model, at least the one that only happens on ZTE V811. In my experience, such reported bugs get rejected right away as "not reproduced". I've had terrible past experience with bug reporting where unity editor literally made me to file a bug report, which I did, spending a whole lot of time uploading the project, filling the description window etc. Only to then receive a semi-rage response from support team like "Don't file these useless reports, make sure the bug can be reproduced before sending it next time, you dumbo", so I try to stay away from bug reporting unless I have a crystal-clear way to reproduce a problem. With this little bug, however, it's not achievable. @NinjaCat I'll find all the links to forum threads and unity answers regarding this problem, it dates back to 2014 and there is no clear way to solve it yet.
     
  11. NinjaCat

    NinjaCat

    R&D Minion Unity Technologies

    Joined:
    Aug 22, 2013
    Posts:
    69
    Sorry to hear that! We certainly don't consider any bug report useless and we'd really like to help you solve these crashes. If it happens every few runs, that should be perfectly fine for us to reproduce - we just need a bug report with a project and a small description of the problem.

    Bug reporting and handling is tricky business, sometimes it's hard for us to recreate the issue or maybe we don't have the correct setup, but in those situations we always try and get more information from you guys. Just don't be afraid to reply to our emails or just send any new information you run into - that helps us a lot! :)
     
    Kumo-Kairo likes this.
  12. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,832
    @ercion : Do you have any proguard setup defined?
     
  13. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
  14. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343


    So I decided to take a break of constant debugging an digging into a problem and did a clean Windows reinstall (I've wanted to do that a long time ago). This resulted in a need of Android SDK re-installation (no way dude). The new Android SDK version comes with a console-only based SDK Manager (without that fancy GUI app that enables you to checkbox things you need and install them), so I decided to install an older version, the one with the 23 as a build target (http://dl-ssl.google.com/android/repository/tools_r23-windows.zip)
    And you know what. It started building ok and running ok without any crashes or issues whatsoever for a few days already.
    I think this is why this problem is not fixed yet - the root of it is somewhere inside Android SDK or the system itself (maybe some cached registry values, who knows what).

    One thing I don't quite understand though is that if the system or Android SDK is guilty of this, why Unity Cloud builds also crash. They have a clean system and a clean SDK install and can't really do something wrong.
     
    chunkaiw, Qbit86 and siddharth3322 like this.
  15. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    @Kumo-Kairo Good to hear. So you're saying that if I change the Target API Level to 23, it will work fine? Or are you talking about the build-tools version?
     
  16. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    I can't tell for sure what have helped. It's not possible to do such things one step at a time. It may be Android SDK version and may be some internal system cache. It even can be something with Unity project cache too (I've deleted the Library folder prior to running a project on a "new" machine).

    Questions remain - if it's something with the Android SDK then why emplty or simple projects work ok but not the big one.

    You can try reinstalling the Android SDK as well as deleting the Library folder inside Unity project (it will nullify all the imported assets cache and all built assemblies)
     
  17. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Will do. Can you please tell me the contents of your C:\Users\<username>\AppData\Local\Android\sdk\build-tools and C:\Users\<username>\AppData\Local\Android\sdk\platforms folders?
     
  18. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    platforms: android-23 (only SDK platform installed, no system images etc.)
    build-tools: 26.0.2

    this is what it looks like inside the SDK manager

     
  19. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    @ercion dude I'm back with you. It started crashing again.

    It even crashes on a PC build with the same error.
    Write to location 0e8fef68 caused an access violation.

    Context:
    RDI: 0x0f95fe00 RSI: 0x0f8c6780 RAX: 0x0f0ef898
    RBX: 0x0f8c64f8 RCX: 0x0f92f400 RDX: 0x0f8c6780
    RIP: 0x0e8fef68 RBP: 0x001eeb20 SegCs: 0x00000033
    EFlags: 0x00010206 RSP: 0x001eea98 SegSs: 0x0000002b
    R8: 0x0225fe80 R9: 0xec6f7580 R10: 0x0f3a9d20
    R11: 0x06369ee0 R12: 0x000000e7 R13: 0x0fa19000
    R14: 0x0f92f400 R15: 0x0f8c64f8

    Bytes at CS:EIP:
    86 18 00 00 d0 03 00 06 60 e5 88 0e 00 00 00 00

    -- UPDATE

    I've tried building it on Unity Cloud Build and it doesn't crash after splash screen. This persistent crash really has something to do with system cache after all. It doesn't solve the problem of occasional crashes on a ZTE phone though.
     
    Last edited: Oct 6, 2017
  20. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Well I tried to target platform 23 but it wouldn't let me because of some God forsaken VR library that apparently exists in my project for no reason. Changing build tools to 26.0.2 and deleting Library folder didn't work either. Which version of Unity are you using?

    Dang. I had a ray of hope for once. Good thing I have some time today. Gonna try to pin point the error.

    Great then I'll try that for a release build for now. Meanwhile, I'll keep investigating.

    Which system? The one that's building the app or the one that's running it?

    I have more logs. They might help. Notice the glsl link error when the app launches.
     
  21. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    The operating system (windows)
    I've seen a few threads on this error here on Unity forums and people were able to bring back working builds by rolling back to a previous system restore point. And after that there was some 5.5 patch version that solved the problem for them.
    In my case rolling back won't help much because Unity still spoils something in the registry along the way. And this will require constant rollbacks.

    Unity usually tries to compile shaders on a target platform to see what's supported and what is not. Shader errors on startup are almost expected (we've consulted Unity engineer on that)

    -- UPDATE

    I took another computer as a build machine and built a project with a newly installed 2017.1.1p1 (the one we've been using this whole time) and its building ok, so it's DEFINITELY something with the system.
    I guess the only way around it is to keep a virtual machine with Windows on it and build via that virtual machine.
    I will reinstall Windows on my main machine now and use this "clean VM" approach until 2017.2 is out, I hope they will have fixed something regarding this problem by that time
     
    Last edited: Oct 7, 2017
  22. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    You should really reply to the posts instead of updating the previous ones because people don't get notified on edit :)
     
  23. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    This is getting ridiculous. I now get this access violation on editor open and can't even open our project anymore. Unity 2017.2
    Removing every Unity-related registry/cache thing and reinstalling the 2017.2 helped. https://answers.unity.com/questions/9306/total-remove-and-re-install.html this is the paths I cleaned (see accepted answer)
     
    Last edited: Nov 9, 2017
  24. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    I see. When I updated Unity, it stopped crashing on some of the devices. Prior to updating, even Play Store was showing that my app would crash on Pixel 2. But that's gone now. Still crashes on some devices.
     
  25. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    It started crashing 100% of the time again.
    This time even cleaning cache and registry didn't help.

    @NinjaCat I have uploaded a project with a bug reporter, bug number 975065.
    It would be great if you could take a look, thanks
     
  26. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    @ercion I have some more data. How do you store players progress? Do you use PlayerPrefs?

    It looks like on some devices the data in PlayerPrefs can become corrupted which leads to these things. I don't know if it's caused by our preferences or by something that Unity internally stores
     
    Last edited: Dec 3, 2017
  27. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Yeah, I use PlayerPrefs.

    Interesting. What led you to this conclusion?
     
  28. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    It was crashing every time I've built a game on Android, even after I cleared all cache and registry things on my Windows machine. I even deleted Unity (to be reinstalled again later). But then I thought of why not to try reinstalling it completely clean, after deleting the app from the phone (so it wipes PlayerPrefs too). I have uninstalled the game, reinstalled from the same APK that was crashing 100% (I couldn't physically build a new APK because I have just uninstalled Unity) and it started working OK without any issues.
     
  29. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    I see. Maybe we should get the prefs xml out of the phone the next time the error shows up. Does your app crash on any emulator? That would be easier to root.
     
  30. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    I have a rooted tablet and will try running a game on that

    I'm also experiencing the same frickin crash on startup (the example above only crashes after the splash screen, not at the startup) on another phone where I don't store any preferences in PlayerPrefs at all.
    It's also not a 100% crash but more like 5 out of 4 launches, sometimes it only starts on 8th try.

    Maybe Unity tries to read something from Player Prefs right at the startup.

    @ercion can you provide steps to copy on-device prefs xml? Also, which emulator can you advice to test on?
     
  31. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    I believe this should work. Using ES explorer might make it easy to navigate.

    Nox
     
    Kumo-Kairo likes this.
  32. quixatocs

    quixatocs

    Joined:
    Sep 22, 2013
    Posts:
    1
    I've also been experiencing this on a live game but only on an LG G6 device, crash seems to occur before the splash screen. I also use playerprefs.
     
  33. slarti89

    slarti89

    Joined:
    Sep 29, 2016
    Posts:
    1
    Hi there,
    I was having a similar issue. My game runs fine on Galaxy S6 edge but fails on a Xiaomi Redmi Note 4G, running android 4.4.2. I'm also using PlayerPrefs.

    After searching a little I ended up disabling the 'Multithreaded Rendering' flag in the android player settings. This has seemingly fixed the issue. Haven't had a crash the last few times I've tried to open. Earlier it would crash 4 out of 5 times. The initial loading time seems a bit longer but overall the performance for my game isn't majorly affected by this change. Wonder if this fixes any of the problems you guys have been having.
     
    monark and Kumo-Kairo like this.
  34. Kurius

    Kurius

    Joined:
    Sep 29, 2013
    Posts:
    412
    I was getting this error because some Android devices didn't play well with the Terrain object. Btw simply removing the Terrain object from your scene isn't enough. For some reason you need to rebuild your scene without a Terrain object. The easiest way to do this without having to start from scratch is...
    1. Remove the Terrain object from your scene
    2. Create a new GameObject and drag everything from your scene into that GameObject
    3. Drag that GameObject over to your Assets folder to create a prefab
    4. Create a new blank scene
    5. Drag your GameObject prefab into that scene
    6. Everything should work fine now
    You might then say, well I need something like a Terrain object for my game. The workaround is to create a huge Plane object as the ground floor of your game, then add some mountain assets to it, like these nice mountains...
    https://assetstore.unity.com/packages/3d/environments/landscapes/mountains-14435

    Anyway this Terrain bug in Unity looks like it will be fixed in an upcoming release...
    https://issuetracker.unity3d.com/is...n-certain-devices-using-adreno-3xx-series-gpu
     
  35. Mese

    Mese

    Joined:
    Dec 13, 2015
    Posts:
    37
    Hi, we have a game on Production right now that crashes with this error on some phones.
    Is that the accepted solution? @ercion @Kumo-Kairo ? did you try the solution of @slarti89 .
    We cannot reproduce the error in house and the error is being reported back to us. It would be amazing to know it's the solution before uploading an update.
    I'll keep investigating
     
  36. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    @Mese as far as I remember, disabling multithreaded rendering solved the problem.
     
    sergiocarneiro likes this.
  37. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    @Mese Sorry man, my error never went away. I stopped investigating it further. Can't say with certainty what it was. Probably unsupported hardware.
     
  38. enes23

    enes23

    Joined:
    Nov 1, 2016
    Posts:
    3
    I opened a project and transferred it there and then bug fixed
     
  39. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
  40. unity_xrPBQ-2zcfd-DA

    unity_xrPBQ-2zcfd-DA

    Joined:
    Jun 15, 2018
    Posts:
    19
    Did you guys find out any solution for this? I am also experiencing this in some particular devices in other devices it runs perfectly.
     
  41. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Sadly, no. I have yet to test it with Unity 2018.3 but the bug is still marked as active. I had to reupload my apk with no support for low end devices and my MAU have fallen by 62.5%. Things are not looking good.
     
  42. unity_xrPBQ-2zcfd-DA

    unity_xrPBQ-2zcfd-DA

    Joined:
    Jun 15, 2018
    Posts:
    19
    Oh thats bad .... I read in release notes of 2018.3 that they have fixed but not so sure because haven't tested yet.
     
  43. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    So I just tested my game on an emulator with Unity 2018.3.0f2 and it does not seem to be crashing so far. I have yet to test it on an actual device.
     
  44. unity_xrPBQ-2zcfd-DA

    unity_xrPBQ-2zcfd-DA

    Joined:
    Jun 15, 2018
    Posts:
    19
    Ok cool let us know the result when you run it on actual device.
     
  45. ercion

    ercion

    Joined:
    Aug 15, 2016
    Posts:
    73
    Okay so I tested the app and the results are weird and inconclusive.

    Input:
    • I have a Unity project that was upgraded from Unity 2017.2.0p2 (Project A1) to Unity 2018.2.0f2 (Project A2) to Unity 2018.3.0f2 (Project A3).
    • I have an empty Unity project that was created in Unity 2018.2.0f2 (Project B)
    • I have an empty Unity project that was created in Unity 2018.3.0f2 (Project C)
    Now, the problem began when Project A1 started showing errors in my analytics. The errors were only coming from devices with API <= 19.

    Output:
    • Project A2, B and C are showing SIGSEGV on Android 4.4 emulator.
    • Project A3 is running fine on emulator.
    • All the projects are running fine on Samsung Galaxy Duos S7852 (Android 4.2.2).

    Now the weird thing is that both Project A3 and Project C are running on Unity 2018.3.0f2; one of them crashes on the emulator while the other doesn't. I tried copying all the project settings, libraries, plugins, everything, but Project C still crashes with the same result: SIGSEGV.
     
    kalamtech likes this.
  46. mleodev

    mleodev

    Joined:
    Mar 4, 2015
    Posts:
    7
    I had the same problem using Unity 2019.1.0b9 and building to a moto g4, the app crashed on startup presenting that error, I was able to fix it unchecking Multithreaded Rendering, I have been working with several beta versions of Unity 2019.1 and had never encountered this issue, until recently with the beta 9 version, I don't know if that has to do with the bug.
     
    monark likes this.
  47. mleodev

    mleodev

    Joined:
    Mar 4, 2015
    Posts:
    7
    The problem appeared again, even with the Multithreaded Rendering disable, I've try building again without changing anything and it disappeared, it's very confusing.
     
  48. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    343
    It doesn't really disappear, it's just very random and doesn't "work" all the time. We have our multithreaded rendering disabled since the first release and we still see these crashes on Android devices in the google dashboard.
    Statistics say that they are more common on newer android version - 8 and 9, though I personally experienced it on 4.4 too.
    It's just some core Unity C++ stuff with segfaults and possible multithreading (not necessarily related to rendering) race conditions and stuff. I think it won't go anywhere in nearest 10 years
     
    erenaydin likes this.
  49. mleodev

    mleodev

    Joined:
    Mar 4, 2015
    Posts:
    7
    I think I figure it out (in my case of course) it was a race condition between the Unity IAP plugin and my save system, since the IAP system runs at very beginning of the game, my code was not properly waiting to the save system to finish loading the data and causing a segfault, the problem disappeared since I've implemented a coroutine that waits to the save system to load the data.
     
  50. kalamtech

    kalamtech

    Joined:
    Oct 27, 2017
    Posts:
    8
    I had exactly the same error message but in my case I tried to send Firebase Analytics during OnApplicationPause, and as you said @ercion I just updated my project from 2018.1 to 2018.3 and it simply solved my problem. Thanks!