Search Unity

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

Unity 2019.x IL2CPP crash on Android 8

Discussion in 'Android' started by GuruGurra, May 7, 2019.

  1. GuruGurra

    GuruGurra

    Joined:
    Jan 18, 2018
    Posts:
    38
    I recently updated Unity to 2019.1.x from 2018.x, and now I can no longer deploy to Android 8 with an IL2CPP release build. The app crash immediately upon launch with errors like this:

    FATAL EXCEPTION: UnityMain
    Process: com.whatever.bestappever, PID: 11624
    java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000008
    Build fingerprint: 'samsung/gts3lwifixx/gts3lwifi:8.0.0/R16NW/T820XXU2BRL1:user/release-keys'
    Revision: '5'
    pid: 11624, tid: 11642, name: UnityMain >>> com.whatever.bestappever <<<
    r0 00000002 r1 00000001 r2 00000000 r3 00004552
    r4 c481b170 r5 c456b000 r6 00000000 r7 c6c8e788
    r8 00c4b348 r9 00000001 sl 00c4b354 fp c6e7dbe8
    ip e9654d5c sp c6e7dba8 lr c5463354 pc c5463330 cpsr e871bd10
    at libil2cpp.001d4330(Native Method)
    at libil2cpp.001d4350(Native Method)

    I cannot recall that I had this problem when using Unity 2018.x. The app seems to work OK on my galaxy Tab S5e (Android 9) but there are problems on my Galaxy Tab S3 (Android 8), like this:
    • Mono build (Release and Debug) works.
    • IL2CPP Debug build works.
    • IL2CPP Release build crash on launch with the error mentioned above.
    I have tried with variolous stripping levels and with/without ARM64 support; everything fails when a release build is deployed to my Android 8 device, everything works when deployed to my Android 9 device. I haven't tried with any other devices.
     
    ArthurAulicino likes this.
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    Which version of Unity do you use? We had a bug like this, but I think it was fixed.
     
  3. GuruGurra

    GuruGurra

    Joined:
    Jan 18, 2018
    Posts:
    38
    Sorry, I should have mentioned that. I currently use 2019.1.1.f1
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    Sounds like another missed case then. Could you tell the exact phone model and Android version on it?
    Hopefully we will be able to reproduce and fix it then.
     
  5. GuruGurra

    GuruGurra

    Joined:
    Jan 18, 2018
    Posts:
    38
    Samsung Galaxy Tab S3. SM-T820.
    Android 8.0.0
     
  6. IevaUnity

    IevaUnity

    Unity Technologies

    Joined:
    Dec 15, 2014
    Posts:
    6
    Hey GuruGurra, do you get this crash with newly created empty project? If not, could you submit a bug report with project where it reproduces and write number of the bug report here?
     
  7. GuruGurra

    GuruGurra

    Joined:
    Jan 18, 2018
    Posts:
    38
    I haven't been able to reproduce the problem with a new project, but need to adjust some of the claims I did before. This is very weird.
    • There is no difference between Android 8 and 9 as I initially thought, both versions have the same problem.
    • Mono builds work.
    • And now the odd thing: IL2CPP builds (both Debug and Release) fail after the first install but work after a second install(!?)
      • I uninstall any previous installation if present.
      • I install the apk file.
      • I start the app, and it crash. (not just the first time - every time I try to start it...until...)
      • I install the very same apk file again (without doing any uninstall in-between)
      • I start the app, and it works...
     
    Last edited: May 13, 2019
  8. GuruGurra

    GuruGurra

    Joined:
    Jan 18, 2018
    Posts:
    38
    OK, a theory (that might be rather serious, if I'm right)...

    I stripped my app to bare minimum, removed all scenes but one, removed most of the script code and only logged when/if my app started. It doesn't start. So...the problem isn't my code.

    I believe that the problem is the automatic backup/restore of app data that Android is doing, and that this (restore) breaks IL2CPP in some way (remember: the problem occurs only with IL2CPP). Consider this:
    • I open the App settings and clear cache and app data.
    • I verify that the app folder is empty
    • I uninstall the app.
    • I verify that the app folder is deleted.
    • I install the app.
    • The app crashes upon start.
    • I check the app folder - it contains a number of files. Files that are not created by the current version of the app since all code is removed.
    Obviously Android has restored the app folder data from a backup. Among the restored data is an IL2CPP folder with a content that differs from that of a fresh installed app (see below).
    • I configure Android to *not* restore app data when an app is reinstalled.
    • I uninstall the app.
    • I install the app.
    • I start the app.
    • The app starts without any problems.
    • I check the app folder - it contains only an IL2CPP folder (since the current version of my code doesn't create any files).
    My guess is that the Android auto-restore pushes an IL2CPP folder into the app folder - an IL2CPP folder with a content that is not compatible with the new package. I don't really know what the folder is used for, but a file compare tells me there are differences between the content that is installed with the apk file and the content that is restored by Android.

    This also explain the weird behavior that the app works after a second install since the auto restore isn't active at the second installation; allowing the "real" IL2CPP folder to be installed by the apk package.

    If this theory is correct I guess that more developers than me will be affected by this problem.
     
  9. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    There is another possible reason, it can be determine via hardcore way:
    Go to Unity Editor app and in it's package locate this file: il2cpp/libil2cpp/os/Android/Image.cpp
    It contains a function FindManagedCodeSectionInElfBinary. Modify it by adding some android native logging: https://developer.android.com/ndk/reference/group/logging

    It could be that the crash is caused by an attempt to read a particular file mapped to memory and the intermittence of the crash comes from the order of files in the list being processed.
     
  10. gubbi

    gubbi

    Joined:
    Dec 20, 2014
    Posts:
    12
    It looks like this might be the issue.
    I had problems with my app crashing on launch (only Release builds downloaded from Google Play crashes). When I disable automatic restore in my phone settings, the app launches. This is pretty bad if it really is the issue.


    @Aurimas-Cernius Are you aware of an issue like this?
     
    ikoukas likes this.
  11. Ara27

    Ara27

    Joined:
    Jan 12, 2016
    Posts:
    4
    Hi there,

    We're facing the exact same issue and to be honest It's been driving us nuts for the last week.

    Hope it's solved soon cause it's stopping our whole update roadmap due to being forced to use the IL2CPP in order to meet the google 64 bit demands...

    At least we know what's going on and stop trying crazy thigs here and there.

    Thank you GuruGurra for the tip, you have saved some serious amount of sannity today!!
     
    deus0 and ikoukas like this.
  12. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    No. If this is reliably reproducible, could you report a bug?
     
  13. gubbi

    gubbi

    Joined:
    Dec 20, 2014
    Posts:
    12
    For me it has only happened sometimes with a version downloaded from Google Play (internal test in my case), and only when auto backup has been active.

    It happened pretty consistently with application built with Unity 2019.1.3, and then when I built with 2019.1.4 it seemed like it went away, but when using 2019.1.4, there auto backup did not seem to work either...

    I have never had an application stacktrace, only SEGV_MAPERR and SEGV_ACCERR.

    I have disabled auto backup and hope that "fixes" the problem.

    The only library that does something special that I can think of is the Fullserializer json library (https://github.com/jacobdufault/fullserializer)
    Don't know if it could be some combination of what it does with AOT and auto backup that causes problems. This is pure speculation though, and I don't know what I am talking about.
     
  14. Ara27

    Ara27

    Joined:
    Jan 12, 2016
    Posts:
    4
    For us It's been happening consistently with multiple test devices using the Unity version 2019.1.0f2.

    As far as our test goes,It doesn't matter witch target architecure.
    If you have installed the app using the IL2CPP with a previous version of Unity it crashes upon start every single time, before even the splash screen shows up, unless you disable the automatic backup/restore from the device.
     
    Salvador-Romero likes this.
  15. gubbi

    gubbi

    Joined:
    Dec 20, 2014
    Posts:
    12
    You probably know this, but if you do not need auto backups you can disable it for the app by copying <Unity install dir>\Editor\Data\PlaybackEngines\AndroidPlayer\Apk\AndroidManifest.xml to <project root>\Assets\Plugins\Android\

    And adding this to the application tag:
    android:allowBackup="false" tools:replace="android:allowBackup"

    full example:

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <manifest
    3.     xmlns:android="http://schemas.android.com/apk/res/android"
    4.     package="com.unity3d.player"
    5.     xmlns:tools="http://schemas.android.com/tools"
    6.     android:installLocation="preferExternal">
    7.     <supports-screens
    8.         android:smallScreens="true"
    9.         android:normalScreens="true"
    10.         android:largeScreens="true"
    11.         android:xlargeScreens="true"
    12.         android:anyDensity="true"/>
    13.  
    14.     <application
    15.         android:theme="@style/UnityThemeSelector"
    16.         android:icon="@mipmap/app_icon"
    17.         android:label="@string/app_name" android:allowBackup="false" tools:replace="android:allowBackup">
    18.         <activity android:name="com.unity3d.player.UnityPlayerActivity"
    19.                   android:label="@string/app_name">
    20.             <intent-filter>
    21.                 <action android:name="android.intent.action.MAIN" />
    22.                 <category android:name="android.intent.category.LAUNCHER" />
    23.             </intent-filter>
    24.             <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    25.         </activity>
    26.     </application>
    27. </manifest>
    28.  
     
    deus0, AUEzzat, dotan_unity and 10 others like this.
  16. pep_dj

    pep_dj

    Joined:
    Nov 7, 2014
    Posts:
    179
    I'm having the same issue: when I install on my device the first time, it doesn't work, after I clear data, it works. That's weird! Any news about the fix?

    This is the error in logcat:

    2019-05-31 13:07:39.950 24925-24956/? E/CRASH: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0000006f41149fd0
    2019-05-31 13:07:39.950 24925-24956/? E/CRASH: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    2019-05-31 13:07:39.950 24925-24956/? E/CRASH: Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    2019-05-31 13:07:39.950 24925-24956/? E/CRASH: Build fingerprint: 'google/taimen/taimen:9/PQ3A.190505.001/5373320:user/release-keys'
    2019-05-31 13:07:39.951 24925-24956/? E/CRASH: Revision: 'rev_10'
     
  17. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    191
    I am having a similar but different issue. I am using Jenkins to automate my builds but somehow, the resulting binaries seem to be those of previous builds. After extensive research, I found that there were 2 main problems. One of which was the Android backup as mentioned above that keeps restoring binaries from previous app versions.

    The other, being the gradle workflow apparently caches compiled binaries if the source was not extensively modified. My project is utilizing the assembly definition extensively due to code organization and team collaboration. That being said, each rapid build is of course, contain little modifications to each library files.
    Is there a way to include a clean cache option into the gradle workflow?
     
  18. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    191
    Additional info: AFAIK, the gradle cache is stored independently of the jenkins workspace. So clearing the workspace was of no help :(
     
  19. Matsuguma

    Matsuguma

    Joined:
    Aug 7, 2017
    Posts:
    11
    We are having the same issue and @GuruGurra's theory matches all of our suspicions and tests.
    Adding allowBackup=false seems to have solved the issue for now, but this means we are removing the backup feature, which is very nice to have :/
     
    fcloss likes this.
  20. alejandro-unity

    alejandro-unity

    Unity Technologies

    Joined:
    Apr 17, 2015
    Posts:
    7
    Hi @Ara27, could you give me more details how are you installing the apk? do you have a reproduction case? I am trying to reproduce it but no luck yet.
     
    Salvador-Romero likes this.
  21. skrpeta

    skrpeta

    Joined:
    Nov 9, 2016
    Posts:
    18
    Same problem. Happens after I upgraded from 2018.3.7 to new 2019.1.6f1.
    I install app, and it crashes immediately on start. If I delete data for that app it starts normally.
    I suspect that the problem is same as @GuruGurra described. For now I will fix it with allowBackup set to false.

    EDIT:
    Can confirm that android:allowBackup="false" tools:replace="android:allowBackup "solves" this problem. Without that line it crashes again. Solution needed from unity for this problem.
     
    Last edited: Jun 18, 2019
  22. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    191
    Actually, it is more of an Android problem. Solution needed from Android regarding updates and replacement of binaries during development...
    Unity could force the allowBackup flag to false for development build too.
     
    Salvador-Romero likes this.
  23. skrpeta

    skrpeta

    Joined:
    Nov 9, 2016
    Posts:
    18
    so you are saying that getting fix for this problem could happen after long time, or never:(
     
  24. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    191
    Yes. It is a more of a by-design decision that needs to be made by either Unity or Android(Google Services) or both.
    Correction: There is nothing wrong with the Android Core. What is probably messed up is the Google Services that provides the Backup feature. I sort of understand the rationale behind backing up application binaries but it is into the "buggy" realm if it skips critical binary updates to the app. I suspect that only the semantic version hash is used when deciding to restore the app binary from backup or to unpack the binary from apk.
     
  25. kdeger

    kdeger

    Joined:
    Mar 4, 2018
    Posts:
    22
    @gubbi you are a life saver, this is the solution we were looking for since January.
     
    deus0 likes this.
  26. zippro

    zippro

    Joined:
    Dec 13, 2013
    Posts:
    7
    It's working. Thank you.
     
  27. AllanRW

    AllanRW

    Joined:
    Nov 6, 2014
    Posts:
    37
    @gubbi workaround works for me too!
     
  28. Softnauts

    Softnauts

    Joined:
    May 31, 2017
    Posts:
    5
    We have this issue too, adding android:allowBackup="false" tools:replace="android:allowBackup" didn't help. Did you find some other fixes?
     
    deus0 and TextusGames like this.
  29. weiping-toh

    weiping-toh

    Joined:
    Sep 8, 2015
    Posts:
    191
    After changing the setting, try clearing the backup cache of the app on the offending device before installing again
     
  30. zkorosi

    zkorosi

    Joined:
    Jan 24, 2017
    Posts:
    4
    Actually helped me! Thank you and kudos :)
     
  31. unity_m0B_xCdWA0Ss3Q

    unity_m0B_xCdWA0Ss3Q

    Joined:
    Jul 3, 2019
    Posts:
    2
    I'm still getting the crash after adding allowBackup, any clue on what could be happening? It only happens in release builds.

    Code (JavaScript):
    1. signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000000000000000
    2. *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    3. Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
    4. Build fingerprint: 'google/crosshatch/crosshatch:9/PQ3A.190605.003/5524043:user/release-keys'
    5. Revision: 'MP1.0'
    6. pid: 24389, tid: 24895, name: UnityMain  >>> com.myapp <<<
    7.     x0   00000079f849f4f4  x1   00000079f90f67c8  x2   0000000000000000  x3   0000007a2eb3000a
    8.     x4   00000079f90f67a8  x5   0000007a169236fd  x6   0000000000000002  x7   00000079f90f6778
    9.     x8   0000000000000000  x9   fc90ad44b6570ab4  x10  0000000000430000  x11  0000000000000000
    10.     x12  0000000000000000  x13  00000079f90f5d10  x14  00000079f90f5e7e  x15  0000000000000000
    11.     x16  0000000000000000  x17  0000007a2eb0da00  x18  0000000013f4dc00  x19  00000079f8e78bf8
    12.     x20  00000079f90f7290  x21  00000079f90f7298  x22  00000079f8bd8b91  x23  00000079f8bf5eba
    13.     x24  00000079f90f9588  x25  00000079f90f7380  x26  00000079f8becfcc  x27  00000079f8c61459
    14.     x28  00000079f90f6e30  x29  00000079f90f7958  x30  00000079f849edcc
    15.     sp   00000079f90f69e0  pc   0000000000000000  pstate 0000000060000000
    16. backtrace:
    17.     #00  pc 000000000000086c  [vdso] ()
    18. E/AndroidRuntime: FATAL EXCEPTION: UnityMain
     
  32. RGAMESR

    RGAMESR

    Joined:
    Feb 10, 2017
    Posts:
    32
    Me too
     
    TextusGames likes this.
  33. unity_m0B_xCdWA0Ss3Q

    unity_m0B_xCdWA0Ss3Q

    Joined:
    Jul 3, 2019
    Posts:
    2
    Which Unity version are you using? Are you using proguard/dexguard too?
     
  34. RGAMESR

    RGAMESR

    Joined:
    Feb 10, 2017
    Posts:
    32
    I Using Unity 2019.1.8f1 ... I do not use a proguard.
     

    Attached Files:

  35. shadowthunder24

    shadowthunder24

    Joined:
    Jun 19, 2019
    Posts:
    8
    Same problem here, I've come to realise that this issue occurs when I have AdMob functionality running strangely...and I have no idea how to fix this. I've tried allowbackup but that didn't work.
     
  36. Riz1

    Riz1

    Joined:
    Nov 11, 2015
    Posts:
    4
    I'm Using Unity 2019.1.8f1. I'm having the same issue: when I install on my device the first time, it doesn't work, after I clear data, it works. That's weird! Any news about the fix?
     
  37. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,722
    I'm not sure anyone has reported a bug for this. Could you do that?
    Paste a case number here once you do.
    Thanks.
     
  38. gferrari

    gferrari

    Joined:
    Jan 14, 2015
    Posts:
    135
    I have the same issues with unity 2019.1.10 like the other users.
     
  39. turnipinrut

    turnipinrut

    Joined:
    Oct 27, 2014
    Posts:
    13
    i also have this issue in 2019.1.10
     
  40. Gigaflops2017

    Gigaflops2017

    Joined:
    Jan 11, 2018
    Posts:
    4
    Same issue, not even able to get to the "Made with Unity" splash screen. Application crashes immediately.
     
  41. unity_TQRCbVNfaaQRIg

    unity_TQRCbVNfaaQRIg

    Joined:
    May 20, 2019
    Posts:
    2
    I have unity 2018.3.4f1, My game used to run normally on all devices when using mono.But now after I switched to il2cpp.The game crashes after the splash screen for some devices.Please help
     
    s4relok likes this.
  42. ClockStone_Helmut

    ClockStone_Helmut

    Joined:
    Feb 23, 2015
    Posts:
    12
    Same issue here in Unity 2019.1.10f1

    Android 7.1.1
    Android 9
     
    DerLasseHenrich likes this.
  43. ClockStone_Helmut

    ClockStone_Helmut

    Joined:
    Feb 23, 2015
    Posts:
    12
    I filed a bug report of which I think is the same issue in a reproducable case
    fogbugz.unity3d.com/default.asp?1172206_scr1q1dsptvh020s

    Because you can't get the Unity project of the bug report, I also attached screenshots of the relevant build settings.

    Thanks to GuruGurra for the detailed initial analysis!

    Edit: Forgot to mention that it seems to happen if you change Scripting Runtime between builds. Then the new build crashes with the Android automatic backup data of the old build. See bug ticket for details.
     

    Attached Files:

    Last edited: Jul 25, 2019
    Tanek likes this.
  44. gferrari

    gferrari

    Joined:
    Jan 14, 2015
    Posts:
    135
    Some new about that? It keep happening when I update the version of unity. I have a lot of bad review just because the app don't open in some phones...
     
    TextusGames and ikoukas like this.
  45. Carry_Rocky

    Carry_Rocky

    Joined:
    Apr 24, 2019
    Posts:
    13
    2018.4.4, crashed sometimes in release IL2CPP, but never met this in debug build
    Code (JavaScript):
    1. 07-25 16:31:21.059 14161 14191 E CRASH   : pid: 14161, tid: 14191, name: UnityMain  >>> com.lalala <<<
    2. 07-25 16:31:21.059 14161 14191 E CRASH   :     x0   0000000000000000  x1   fffb807267ba84c0  x2   00000000fff90000  x3   fffd807277005de0
    3. 07-25 16:31:21.059 14161 14191 E CRASH   :     x4   fffd80727150a0a0  x5   fffd80727753df10  x6   fffd8072714f4f68  x7   fffd807277002778
    4. 07-25 16:31:21.059 14161 14191 E CRASH   :     x8   fffd80727753bc18  x9   0000000087d17f9f  x10  fffd807271011878  x11  fffd80727753bed0
    5. 07-25 16:31:21.059 14161 14191 E CRASH   :     x12  00000000f0d9e7ee  x13  fffd80727753caf0  x14  00000000f9000e60  x15  fffffffffffffff4
    6. 07-25 16:31:21.059 14161 14191 E CRASH   :     x16  0000000000a6075b  x17  0000000000000001  x18  0000007266b61a30  x19  000000725424fcf0
    7. 07-25 16:31:21.059 14161 14191 E CRASH   :     x20  0000007271013a10  x21  000000727101398c  x22  00000072775393d8  x23  0000000000000006
    8. 07-25 16:31:21.059 14161 14191 E CRASH   :     x24  000000725ba1e1b8  x25  0000007267ba9688  x26  000000727753cab8  x27  fffd80727753bc18
    9. 07-25 16:31:21.060 14161 14191 E CRASH   :     x28  000000725ba1cd58  x29  0000007266b62320  x30  fffd807271011850
    10. 07-25 16:31:21.060 14161 14191 E CRASH   :     sp   0000007266b62310  pc   0000007257e1c87c  pstate 0000000020000000
    11. 07-25 16:31:21.060 14161 14191 E CRASH   :
    12. 07-25 16:31:21.060 14161 14191 E CRASH   : backtrace:
    13. 07-25 16:31:21.087 14161 14191 E CRASH   :     #00  pc 000000000000086c  [vdso] ()
    14. 07-25 16:31:21.087 14161 14191 E CRASH   :     #01  pc 0000000000829878   ()
    15. 07-25 16:31:21.087 14161 14191 E MessageQueue: IdleHandler threw exception
    16. 07-25 16:31:21.087 14161 14191 E MessageQueue: java.lang.Error: signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0000007257e1c87c
    17. 07-25 16:31:21.087 14161 14191 E MessageQueue: Build fingerprint: 'google/sailfish/sailfish:9/PQ3A.190705.001/5565753:user/release-keys'
    18. 07-25 16:31:21.087 14161 14191 E MessageQueue: Revision: '0'
    19. 07-25 16:31:21.087 14161 14191 E MessageQueue: pid: 14161, tid: 14191, name: UnityMain  >>> com.lalala <<<
    20. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x0   0000000000000000  x1   fffb807267ba84c0  x2   00000000fff90000  x3   fffd807277005de0
    21. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x4   fffd80727150a0a0  x5   fffd80727753df10  x6   fffd8072714f4f68  x7   fffd807277002778
    22. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x8   fffd80727753bc18  x9   0000000087d17f9f  x10  fffd807271011878  x11  fffd80727753bed0
    23. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x12  00000000f0d9e7ee  x13  fffd80727753caf0  x14  00000000f9000e60  x15  fffffffffffffff4
    24. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x16  0000000000a6075b  x17  0000000000000001  x18  0000007266b61a30  x19  000000725424fcf0
    25. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x20  0000007271013a10  x21  000000727101398c  x22  00000072775393d8  x23  0000000000000006
    26. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x24  000000725ba1e1b8  x25  0000007267ba9688  x26  000000727753cab8  x27  fffd80727753bc18
    27. 07-25 16:31:21.087 14161 14191 E MessageQueue:     x28  000000725ba1cd58  x29  0000007266b62320  x30  fffd807271011850
    28. 07-25 16:31:21.087 14161 14191 E MessageQueue:     sp   0000007266b62310  pc   0000007257e1c87c  pstate 0000000020000000
    29. 07-25 16:31:21.087 14161 14191 E MessageQueue:
    30. 07-25 16:31:21.087 14161 14191 E MessageQueue:     at [vdso].(:0)
    31. 07-25 16:31:21.087 14161 14191 E MessageQueue:     at .(:0)
     
    Last edited: Jul 26, 2019
  46. xwwwwwunity

    xwwwwwunity

    Joined:
    Jul 26, 2019
    Posts:
    9
    I have a same problem.
     

    Attached Files:

  47. marcelofanatee

    marcelofanatee

    Joined:
    Nov 25, 2016
    Posts:
    1
    we are having the same problem in production after an update from unity 2019.1.2 to 2019.1.9

    instead of turning off backups we will set android to backup only our game files (database and shared preferences)
    https://developer.android.com/guide/topics/data/autobackup#IncludingFiles

    this causes the troublesome IL2CPP folder to not be backuped or restored

    right now we are doing QA on the version and will launch next week

    anyone see a problem in this approach?

    also someone said this was the same issue, can't find who: https://issuetracker.unity3d.com/is...s-from-2019-dot-1-0a11-and-below-are-backuped
     
  48. EGProject

    EGProject

    Joined:
    Jul 30, 2015
    Posts:
    5
    randy_sparkjumpers likes this.
  49. ClockStone_Helmut

    ClockStone_Helmut

    Joined:
    Feb 23, 2015
    Posts:
    12
    This matches our findings. A few more infos:

    Here "il2cpp" is in the "external" domain of the Auto Backup system.

    Just using
    <exclude domain="external" path="il2cpp"/>
    in any combination does still restore the "il2cpp" directory and crash the app.

    Instead you have to explicitly "include" all files and folders you need to prevent the restore.

    We use something like this in "res/xml/my_backup_rules.xml"

    Code (CSharp):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <full-backup-content>
    3.     <!-- Explicitly including files to backup because of crash with restored Unity "il2cpp" folder.
    4.          Using "exclude" in any way does not prevent "il2cpp" from being restored (equals app crash).
    5.          Combining "include" "." and "exclude" "il2cpp" does not prevent the restore of "il2cpp".
    6.          Using only "include" does prevent a restore of "il2cpp". -->
    7.     <include domain="external" path="YourSafeFile1"/>
    8.     <include domain="file" path="."/>
    9.     <include domain="sharedpref" path="."/>
    10. </full-backup-content>
    with <application android:fullBackupContent="(AT)xml/my_backup_rules" ... in the AndroidManifest.xml.

    (replace (AT) with the actual at sign, the forum software keeps replacing it...)
     
    Last edited: Aug 1, 2019
  50. ClockStone_Helmut

    ClockStone_Helmut

    Joined:
    Feb 23, 2015
    Posts:
    12
    Caution: We had problems with multiple "includes" in the same "domain". A file was somehow ignored by the backup system.