Skip to content

[Android 4.0.4|FireOS 8.5.1] App doesn't start after being updated from AOT to non-AOT version #1145

Closed

Description

@Belorus

Steps to Reproduce

Android version specific. Reproed on Amazon Kindle Fire HD 8.9 (Android 4.0.4| FireOS 8.5.1)
Didn't reproduce on newer devices.

  1. Build and install AOTed app (attached Artifacts/AOT.LLVM.apk)
  2. Update app (for example via adb install -r) to non-AOTed app (attached Artifacts/JIT.apk)
    AOT.zip

Expected Behavior

App should work

Actual Behavior

Crash

Version Information

Microsoft Visual Studio Professional 2017
Version 15.5.2
VisualStudio.15.Release/15.5.2+27130.2010
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Professional

Visual Basic 2017 00369-60000-00001-AA157
Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA157
Microsoft Visual C# 2017

Visual F# 4.1 00369-60000-00001-AA157
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package 8.10.01106.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.31125.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services 1.0
Provides languages services for ASP.NET Core Razor.

Azure App Service Tools v3.0.0 15.0.31106.0
Azure App Service Tools v3.0.0

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

JavaScript UWP Project System 2.0
JavaScript UWP Project System

Merq 1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Continuous Delivery Tools for Visual Studio 0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio 4.8.4-pre (3fe64e3)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 4.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools 15.1.61710.120
Microsoft SQL Server Data Tools

TypeScript Tools 15.5.11025.1
TypeScript Tools for Microsoft Visual Studio

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Universal Windows Apps 15.0.27128.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 4.8.0.753 (6575bd113)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 4.8.188 (c5813fa34)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK 8.1.0.25 (HEAD/d8c6e504f)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 11.6.1.2 (6857dfc)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
-->

Log File

log.txt

Activity

  1. Belorus commented on Dec 29, 2017

    @Belorus
    Author

    Log.txt contains following lines:

     AOT: module HockeySDK.AndroidBindings.dll.so is unusable (GUID of dependent assembly mscorlib doesn't match (expected '5B532517-DD91-42BA-9503-A1B7C9DDC78A', got '1450B16F-4ABD-4036-AB97-86F80A0D3ECE').
    
    D/Mono    ( 5927): AOT: Module HockeySDK.AndroidBindings.dll is unusable because a dependency is out-of-date.
    
    D/Mono    ( 5927): Config attempting to parse: 'HockeySDK.AndroidBindings.dll.config'.
    
    D/Mono    ( 5927): Config attempting to parse: '/usr/local/etc/mono/assemblies/HockeySDK.AndroidBindings/HockeySDK.AndroidBindings.config'.
    
    D/Mono    ( 5927): Image addref HockeySDK[0xe64e10] -> HockeySDK.dll[0xe640b0]: 2
    
    D/Mono    ( 5927): Prepared to set up assembly 'HockeySDK' (HockeySDK.dll)
    
    D/Mono    ( 5927): Assembly HockeySDK[0xe64e10] added to domain RootDomain, ref_count=1
    
    D/Mono    ( 5927): Image addref Mono.Android[0xe66340] -> Mono.Android.dll[0xe65588]: 2
    
    D/Mono    ( 5927): Prepared to set up assembly 'Mono.Android' (Mono.Android.dll)
    
    D/Mono    ( 5927): Assembly Mono.Android[0xe66340] added to domain RootDomain, ref_count=1
    
    D/Mono    ( 5927): AOT: module Mono.Android.dll.so is unusable: doesn't match assembly.
    

    Let me make a stupid assumption.

    Android during update doesn't remove old .so files (which is strange), and mono in non-AOT build still tries to load .so, but its guid doesn't match.

  2. changed the title [-]Android 4.0.4 crashes after app update from AOT to non-AOT version[/-] [+][Android 4.0.4] App doesn't start after being updated from AOT to non-AOT version[/+] on Dec 29, 2017
  3. jonpryor commented on Jan 2, 2018

    @jonpryor
    Contributor

    @Belorus: Question: after upgrading, do you still have the libaot-* native libraries installed?

    It sounds like that's what you're saying here:

    Android during update doesn't remove old .so files (which is strange)

    If so, that is indeed what is going wrong.

    Compare to a Pixel 2 running Android 8.0, in which the package upgrade does remove the native libraries:

    ## The following done with a Pixel 2 running Android 8.0:
    $ adb install AOT.LLVM.apk
    $ adb shell ls /data/data/AOT.AOT/lib/
    libaot-AOT.dll.so
    libaot-HockeySDK.AndroidBindings.dll.so
    libaot-HockeySDK.dll.so
    libaot-Java.Interop.dll.so
    libaot-Mono.Android.dll.so
    libaot-System.Core.dll.so
    libaot-System.Runtime.Serialization.dll.so
    libaot-System.dll.so
    libaot-mscorlib.dll.so
    libmonodroid.so
    libmonosgen-2.0.so
    
    $ adb install -r JIT.apk
    $ adb shell ls /data/data/AOT.AOT/lib/
    libmonodroid.so
    libmonosgen-2.0.so

    I believe your "stupid assumption" is correct. I believe you're hitting a Kindle Fire bug.

  4. Belorus commented on Jan 3, 2018

    @Belorus
    Author

    @jonpryor Thanks Jonathan!
    Maybe you have in mind a solution that can help in this situation ? Maybe we can rebuild app with some flag that prioritized .dll over .so files or something?

    App is in store, it doesn't launch. Updating it back to AOTed version is impossible (due to #1146).

    Kinda deadlock :)

  5. Belorus commented on Jan 3, 2018

    @Belorus
    Author

    Checked /data/data/lib after update. Seems Fire OS application update issue.
    All .so files are preserved :(

    Lets consider issue closed.

  6. changed the title [-][Android 4.0.4] App doesn't start after being updated from AOT to non-AOT version[/-] [+][Android 4.0.4|FireOS 8.5.1] App doesn't start after being updated from AOT to non-AOT version[/+] on Jan 3, 2018
  7. jonpryor commented on Jan 4, 2018

    @jonpryor
    Contributor

    Closing as per @Belorus' last comment.

  8. ghost locked as resolved and limited conversation to collaborators on Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions