Search Issue Tracker

Fixed in 2020.1

Fixed in 2019.2, 2019.3

Votes

18

Found in

2019.1.0a12

2019.1.10f1

2019.2

2019.3

Issue ID

1170543

Regression

Yes

[Android][IL2CPP] App crashes on 2019.1.0a12 and up on launch if old IL2CPP files from 2019.1.0a11 and below are backuped

Mobile

-

Reproduction steps:
1. Create a New Project in 2019.1.0a11 or below
2. Set the "Platform" to "Android", "Package Name" to "com.Case.Behaviour" and "Scripting Backend" to "IL2CPP"
3. Build the .apk file
4. "adb install" the application to the Android device
5. Completely exit the application after it finishes loading
6. In a cmd window write "adb shell bmgr backupnow com.Case.Behaviour" to create a new Backup of the application
7. Delete the application
8. Open the Project in 2019.1.0a12 or up
9. Build the .apk file
10. "adb install" the application to the Android device
11. Launch the application

Expected Result: App launches properly
Actual Result: App crashes because it's using old IL2CPP files from the last installation, creating an incompatibility

Reproduced with: 2019.3.0a10, 2019.2.0b10, 2019.1.10f1, 2019.1.0f1, 2019.1.0b1, 2019.1.0a14, 2019.1.0a12
Did not reproduce on: 2019.1.0a11, 2019.1.0a10, 2019.1.0a5, 2018.4.5f1, 2017.4.30f1

Note:
Make sure that in the Android devices, which is being used for the testing, the settings for "Backup" and "Automatic Restore" are enabled
Erasing the "Android/data/<bundle_id>" folder after the crash fixes the issue temporarily as Unity seems to recreate valid il2cpp files under this folder. If the app is deleted before a new backup is automatically generated, further installs will still be crashing

Repro Devices:
VLNQA00123, Google Pixel 2 XL (Pixel 2 XL), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00216, Razer Phone 2 (Phone 2), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00257, Sony Xperia XZ Premium (G8141), Android 9, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00272, Samsung Galaxy S10+ (SM-G975U), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00277, Asus ROG Phone (ASUS_Z01QD), Android 8.1.0, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00096, Samsung Galaxy S8 (SM-G950F), Android 8.0.0, CPU: Exynos 9 Octa 8895, GPU: Mali-G71

Comments (12)

  1. Eb2be104bb042b0bd83d309c4bb3b7c6?d=mm

    rochbordan11

    Jul 04, 2020 10:59

    https://forum.taotesting.com/profile/SolarPowerEarth
    https://forums.golfwrx.com/profile/solarpower947
    https://gitlab.sgalinski.de/solarp947
    https://forum.acronis.com/user/328041
    https://io.telkomuniversity.ac.id/forum/profile/solarpower947/
    https://profile.freepik.com/user/solarpower947
    https://www.mirakee.com/solarpowerearth_
    https://labs.maarch.org/solarp947
    https://www.troublefreepool.com/members/solarpowerearth947.248556/
    https://community.xgimi.com/user/solarpower947
    https://forum.gurtam.com/profile.php?id=218945
    https://www.thephotoforum.com/members/solar-power-earth.242945/
    https://social.technet.microsoft.com/Profile/solarpower947
    https://gitlab.jetshop.se/solarp947
    https://www.theme-junkie.com/forum/users/solarpowerearth947/
    https://developer.flir.com/forums/users/solarpowerearth947/
    http://dev4.distributel.ca/profile/solarpower947
    http://www.good-tutorials.com/users/solarpower947
    https://kuyhaa.canny.io/sheena-jack/p/solar-panel-systems
    https://academy.autodesk.com/users/solarpowerearth947
    https://airsoftcanada.com/member.php?u=288387
    http://www.theseasonedcook.com/UserProfile/tabid/42/userId/1246492/Default.aspx
    https://forums.taleworlds.com/index.php?members/solarpower947.560040
    https://git.nomics.world/solarp947
    https://forum.clientexec.com/members/solarpowerearth947.4113/
    http://www.tinywebgallery.com/blog/forum/profile/solarpower947
    https://forum.proxmox.com/members/solarpower947.95714/
    https://gitlab.keepcoding.io/solarp947
    https://pubhtml5.com/homepage/xcpj
    https://forum.reallusion.com/Users/2893013/solarpowerearth947
    http://www.whalersonthemoon.net/users/15710
    https://blog.crystalcommerce.com/devforum/profile/solarpowerearth947/
    https://www.evilmadscientist.com/forums/users/solarpower947/
    https://arsandbox.ucdavis.edu/forums/users/solarpower947/
    https://git.cit.bcit.ca/solarp947
    http://theguild.informe.com/profile7343.html
    https://magnitt.com/people/45938/solar.power.earth
    https://uijar.com/solarpower947
    https://pressbook.com/solarpowerearth947
    https://w3techs.com/users/profile/6452607
    https://community.bitdefender.com/en/profile/solarpower947
    https://www.siasat.pk/forums/members/solarpower947.216182/
    http://www.epicwords.com/users/15710
    https://forum.shoutca.st/index.php?members/solarpower947.155/
    http://www.friendmotron.com/users/15710
    http://www.bobscruises.com/user/solar-power-earth
    https://speechdebate.binghamton.edu/Users/5928/Profile/solar-power-earth/
    https://forums.formtools.org/showthread.php?tid=30808
    http://mehfeel.net/mehfeel/forum/topic/37305
    https://forum.z8games.com/forum/crossfire/crossfire-barracks/6932136-solar-power-earth
    http://ststdiv.epicwords.com/users/15710
    http://www.theskywatergroup.com/forum/member.php?action=profile&uid=195834
    http://forum.amzgame.com/thread/detail?id=217809
    https://forums.cashisonline.com/index.php?action=profile;area=summary;u=202486
    http://kita.tanjidor.id/member.php?action=profile&uid=58857
    https://www.blackmountaincoins.com/forum/solar-panel-systems/
    https://forums.bagisto.com/user/solarpower947
    https://gitlab.univ-nantes.fr/solarp947
    https://thebacklinkhub.com/solarpower947
    http://drstone.ustc.edu.cn/bbs/user/solarpower947
    https://imgur.com/user/solarpower947/about
    https://pastebin.com/u/solarpower947
    http://protospielsouth.com/user/7415
    http://fanfic.castletv.net/viewuser.php?uid=13689
    https://www.corporatelivewire.com/profile.html?id=c30f64939d307ae90c8dd6309c1a1f80d6b0d1ec
    https://notionpress.com/author/302319
    https://forums.kleientertainment.com/profile/1297170-solarpowerearth/?tab=field_core_pfield_16
    https://file.army/solarpower947
    http://s303194975.website-start.de/solarp947
    https://iorbix.com/5308795371569-p-Solar-Power-Earth
    https://kitsplit.com/profile/kitsplit-gear-member-au2wzq
    http://symposium.urbansketchers.org/forum/profile/solarpower947
    https://www.korfball.com/forums/pop_profile.asp?mode=display&id=3476
    http://forums.kc-mm.com/index.php?action=profile;u=56242
    https://www.tnhuntingclub.com/forums/members/solarpower947.html
    https://www.flaticon.com/profile/user/solarpanelcp
    https://realtime.inc.com/user/solarpanelcp
    https://community.tubebuddy.com/index.php?members/37371/
    https://spinninrecords.com/profile/panelsolarcp
    https://remote.com/companies/solar-panel-cost-price-49399c18-da0a-4e37-8578-8092d949c473
    https://poptype.co/solar-panel
    https://www.diyaudio.com/forums/members/solarpanelcp.html
    https://www.starnow.co.uk/solarpanel/?mode=pv
    https://www.avitop.com/cs/members/solarpanelcp.aspx
    https://profile.freepik.com/user/solarpanelcp
    https://gitlab.tue.nl/solarpanelcp
    http://www.musicrush.com/solarpanelcp/
    https://www.crunchbase.com/person/solar-panel
    https://imgur.com/user/solarpanel466/about
    http://gitlab.nectar.auckland.ac.nz/solarpanelcp
    https://www.openstreetmap.org/user/solarpowerpanel
    https://ndesert.nazwa.pl/eklasa/profile.php?mode=viewprofile&u=2324
    https://www.aparat.com/u_8277048
    https://arsandbox.ucdavis.edu/forums/users/solarpowerpanel/
    https://forums.kleientertainment.com/profile/1292807-solarpanelcp/?tab=field_core_pfield_16
    https://sysprogs.com/w/forums/users/panelsolarcp/
    https://gitlab.e.foundation/solarpanelcp
    https://gitlab.pagedmedia.org/solarpanelcp
    https://file.army/solarpanelcp
    https://gitlab.keepcoding.io/solarpanelcp
    https://profiles.xero.com/people/solarpanel
    https://pastebin.com/u/solarpanel466
    https://www.spreaker.com/user/12714276
    http://s303194975.website-start.de/solarpanelcp
    https://arc-git.mpib-berlin.mpg.de/solarpanelcp
    https://www.threadless.com/@solarpanelcp/activity
    https://www.theme-junkie.com/forum/users/solarpanelcostprice110/
    http://guia.clarin.com/solarpanelcp/usuario
    https://git.rwth-aachen.de/solarpanelcp
    https://www.turnkeylinux.org/user
    https://airsoftcanada.com/member.php?u=288407
    https://www.thephotoforum.com/members/solarpanel.242998/
    https://w3techs.com/users/profile/6144740
    https://participa.gencat.cat/profiles/ali/timeline
    https://gitlab.kam.mff.cuni.cz/u/solarpanelcp
    https://community.windy.com/user/solarpanelcp

  2. 7194e0047f8c73d5c9aa0fec4ef81f6a?d=mm

    dpidev

    Apr 14, 2020 12:06

    2020.1.0b5 and issue still persists (like once on three builds). Restarting Unity fixes the problem temporarily.

  3. Ce2f915139324ccca9ac9f6f5b8e240a?d=mm

    Ponytech

    Sep 19, 2019 12:00

    @SJWEESALS
    I can confirm upgrading Unity to 2019.2.6 fixed this issue for me.

  4. C1400aac562c69bc264ca3ed3b6161e8?d=mm

    SJWeesals

    Sep 12, 2019 13:06

    Although marked as fixed in 2019.2, this error occurs for me on 2019.2.5 (the latest build of 2019.2). The fullBackupContent fix still works.

  5. F578411e8e1346ee01b1642caa4abfb8?d=mm

    SaturnCO

    Sep 06, 2019 00:04

    I guess issues like these are why some people say you should never update Unity on an existing project?
    I guess I should have listened.
    Regretting not sticking to Unity 2017.
    I miss the good old days when Substance actually worked inside of Unity and the app didn't crash on startup for 40% of devices...
    Sure I got LWRP, but in the end was it worth it?

  6. Abcf103768e747515c8a3a2733b4ccf1?d=mm

    TextusGames

    Sep 04, 2019 21:19

    Here is simple temporary fix from the mebers of community.
    [QUOTE="TextusGames, post: 4827980, member: 1228963"]This simple 4 steps solution fixes my problem.

    1. if someone interested there to create "res/xml/my_backup_rules.xml" file, your should make it in "Plugins/Android/"

    2. Content of custom back up rules file:
    [code=CSharp]<?xml version="1.0" encoding="utf-8"?>
    <full-backup-content>
    <include domain="sharedpref" path="."/>
    </full-backup-content>[/code]

    3. Android manifest should be copied in "Plugins/Android"

    4. You should paste " android:fullBackupContent="[USER=94913]@XML[/USER]/my_backup_rules" " inside <application > tag
    Example of Android manifest (you can just use this manifest):
    [code=CSharp]<?xml version="1.0" encoding="utf-8"?>
    <manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    xmlns:tools="http://schemas.android.com/tools"
    android:installLocation="preferExternal">
    <supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:anyDensity="true"/>

    <application
    android:theme="@style/UnityThemeSelector"
    android:icon="@mipmap/app_icon"
    android:label="@string/app_name"

    android:fullBackupContent="@xml/my_backup_rules"

    >

    <activity android:name="com.unity3d.player.UnityPlayerActivity"
    android:label="@string/app_name">
    <intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
    <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>

    </application>
    </manifest>
    [/code]

    Those 4 steps fixes back up crush.

    In this solution only player preferences will be restored howewer you can include other files in custom back up rules.

    Even more simple solution:

    You can download archive with 2 files, extract it, copy files in respective folders and problem will go away. ( Copy AndroidManifest into "Plugins/Android/" and copy my_backup_rules into "Plugins/Android/res/xml/" )

    Tested in Unity 2019.1.11 and Unity 2019.2.0f I think it will work in any unity version.[/QUOTE]

  7. C1400aac562c69bc264ca3ed3b6161e8?d=mm

    SJWeesals

    Aug 24, 2019 05:20

    Turning off automatic backups by adding the following lines to the <application> element in our AndroidManifest seemed to work for us:
    android:allowBackup="false" android:fullBackupContent="false"
    tools:replace="android:allowBackup"

  8. 9e50d92e35dd03b932dfe3b27a2834d0?d=mm

    eladleb4

    Aug 22, 2019 11:41

    Wow, we didn't know about this issue before releasing an update and now we are getting so many emails from players who's game broke, OMG unity... This is terrible work.

  9. Abcf103768e747515c8a3a2733b4ccf1?d=mm

    TextusGames

    Aug 06, 2019 08:26

    Crash happens even if I change app bundle version number. That is bad, I can no longer update my app. (Unity 2019.1.11)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.