dotnet / android

.NET for Android provides open-source bindings of the Android SDK for use with .NET managed languages such as C#
MIT License
1.93k stars 527 forks source link

App crashes at startup after upgrading to latest Xamarin.Android #2960

Closed sdebruyn closed 5 years ago

sdebruyn commented 5 years ago

Steps to Reproduce

  1. Build app
  2. Open app

Expected Behavior

App works :)

Actual Behavior

App crashes :(

Build settings

<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props" Condition="Exists('..\..\packages\PropertyChanged.Fody.2.6.1\build\PropertyChanged.Fody.props')" />
  <Import Project="..\..\packages\Xamarin.Build.Download.0.4.11\build\Xamarin.Build.Download.props" Condition="Exists('..\..\packages\Xamarin.Build.Download.0.4.11\build\Xamarin.Build.Download.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{67E6C5E0-CA8F-49D9-BB52-F09264DFB719}</ProjectGuid>
    <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <OutputType>Library</OutputType>
    <RootNamespace>Customer.Droid</RootNamespace>
    <AssemblyName>Customer.Droid</AssemblyName>
    <TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
    <AndroidApplication>True</AndroidApplication>
    <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
    <AndroidResgenClass>Resource</AndroidResgenClass>
    <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
    <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
    <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
    <OutputPath>bin\$(Configuration)</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
   <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
    <AndroidTlsProvider>btls</AndroidTlsProvider>
    <AndroidEnableSGenConcurrent>false</AndroidEnableSGenConcurrent>
    <AndroidSupportedAbis>armeabi-v7a;x86;x86_64</AndroidSupportedAbis>
    <RunCodeAnalysis>false</RunCodeAnalysis>
  </PropertyGroup>
...
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Integration|AnyCPU' ">
    <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
    <BundleAssemblies>true</BundleAssemblies>
    <AotAssemblies>true</AotAssemblies>
    <EnableLLVM>true</EnableLLVM>
    <Optimize>true</Optimize>
    <AndroidLinkMode>Full</AndroidLinkMode>
    <EnableProguard>true</EnableProguard>
    <DefineConstants>INTEGRATION</DefineConstants>
    <AndroidSupportedAbis>armeabi-v7a;arm64-v8a</AndroidSupportedAbis>
    <AndroidEnableMultiDex>true</AndroidEnableMultiDex>
  </PropertyGroup>
...

NuGet packages

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="AndHUD" version="1.4.1" targetFramework="monoandroid90" />
  <package id="Customer.DataContracts" version="1.77.0" targetFramework="monoandroid90" />
  <package id="Customer.Validation.DataContracts" version="1.1.0" targetFramework="monoandroid90" />
  <package id="Com.Airbnb.Android.Lottie" version="2.7.1" targetFramework="monoandroid90" />
  <package id="Fody" version="4.2.1" targetFramework="monoandroid90" developmentDependency="true" />
  <package id="LiteDB" version="4.1.4" targetFramework="monoandroid90" />
  <package id="Microsoft.AppCenter" version="1.14.0" targetFramework="monoandroid90" />
  <package id="Microsoft.AppCenter.Analytics" version="1.14.0" targetFramework="monoandroid90" />
  <package id="Microsoft.AppCenter.Crashes" version="1.14.0" targetFramework="monoandroid90" />
  <package id="Microsoft.Azure.Amqp" version="2.4.2" targetFramework="monoandroid90" />
  <package id="Microsoft.Azure.EventHubs" version="2.2.1" targetFramework="monoandroid90" />
  <package id="Microsoft.Azure.Services.AppAuthentication" version="1.0.3" targetFramework="monoandroid90" />
  <package id="Microsoft.CodeAnalysis" version="2.10.0" targetFramework="monoandroid90" />
  <package id="Microsoft.CodeAnalysis.Analyzers" version="2.6.2" targetFramework="monoandroid90" developmentDependency="true" />
  <package id="Microsoft.CodeAnalysis.Common" version="2.10.0" targetFramework="monoandroid90" />
  <package id="Microsoft.CodeAnalysis.CSharp" version="2.10.0" targetFramework="monoandroid90" />
  <package id="Microsoft.CodeAnalysis.CSharp.Workspaces" version="2.10.0" targetFramework="monoandroid90" />
  <package id="Microsoft.CodeAnalysis.VisualBasic" version="2.10.0" targetFramework="monoandroid90" />
  <package id="Microsoft.CodeAnalysis.VisualBasic.Workspaces" version="2.10.0" targetFramework="monoandroid90" />
  <package id="Microsoft.CodeAnalysis.Workspaces.Common" version="2.10.0" targetFramework="monoandroid90" />
  <package id="Microsoft.CSharp" version="4.5.0" targetFramework="monoandroid90" />
  <package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="3.19.8" targetFramework="monoandroid90" />
  <package id="Microsoft.IdentityModel.JsonWebTokens" version="5.4.0" targetFramework="monoandroid90" />
  <package id="Microsoft.IdentityModel.Logging" version="5.4.0" targetFramework="monoandroid90" />
  <package id="Microsoft.IdentityModel.Tokens" version="5.4.0" targetFramework="monoandroid90" />
  <package id="Microsoft.NETCore.Platforms" version="2.1.1" targetFramework="monoandroid90" />
  <package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="monoandroid90" />
  <package id="MvvmCross" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.CodeAnalysis" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.Droid.Support.Core.UI" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.Droid.Support.Design" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.Droid.Support.Fragment" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.Droid.Support.V7.AppCompat" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.Droid.Support.V7.RecyclerView" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.Plugin.Messenger" version="6.2.3" targetFramework="monoandroid90" />
  <package id="MvvmCross.Plugin.Visibility" version="6.2.3" targetFramework="monoandroid90" />
  <package id="NETStandard.Library" version="2.0.3" targetFramework="monoandroid90" />
  <package id="Newtonsoft.Json" version="12.0.1" targetFramework="monoandroid90" />
  <package id="PropertyChanged.Fody" version="2.6.1" targetFramework="monoandroid90" />
  <package id="System.AppContext" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Buffers" version="4.5.0" targetFramework="monoandroid90" />
  <package id="System.Collections" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Collections.Concurrent" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Collections.Immutable" version="1.5.0" targetFramework="monoandroid90" />
  <package id="System.ComponentModel.Annotations" version="4.5.0" targetFramework="monoandroid90" />
  <package id="System.Composition" version="1.2.0" targetFramework="monoandroid90" />
  <package id="System.Composition.AttributedModel" version="1.2.0" targetFramework="monoandroid90" />
  <package id="System.Composition.Convention" version="1.2.0" targetFramework="monoandroid90" />
  <package id="System.Composition.Hosting" version="1.2.0" targetFramework="monoandroid90" />
  <package id="System.Composition.Runtime" version="1.2.0" targetFramework="monoandroid90" />
  <package id="System.Composition.TypedParts" version="1.2.0" targetFramework="monoandroid90" />
  <package id="System.Console" version="4.3.1" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.Contracts" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.FileVersionInfo" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.Process" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.StackTrace" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Dynamic.Runtime" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Globalization" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Globalization.Calendars" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.IdentityModel.Tokens.Jwt" version="5.4.0" targetFramework="monoandroid90" />
  <package id="System.IO" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.IO.Compression" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.IO.FileSystem" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Linq" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Linq.Expressions" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Linq.Parallel" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Net.Http" version="4.3.4" targetFramework="monoandroid90" />
  <package id="System.Net.Primitives" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Net.Sockets" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Net.WebSockets.Client" version="4.3.2" targetFramework="monoandroid90" />
  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="monoandroid90" />
  <package id="System.ObjectModel" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Reflection" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Reflection.Extensions" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Reflection.Metadata" version="1.6.0" targetFramework="monoandroid90" />
  <package id="System.Reflection.Primitives" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Reflection.TypeExtensions" version="4.5.1" targetFramework="monoandroid90" />
  <package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="monoandroid90" />
  <package id="System.Runtime.Extensions" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime.Handles" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime.Numerics" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Runtime.Serialization.Xml" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Security.Claims" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Security.Cryptography.Algorithms" version="4.3.1" targetFramework="monoandroid90" />
  <package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Security.Cryptography.X509Certificates" version="4.3.2" targetFramework="monoandroid90" />
  <package id="System.Text.Encoding" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Text.Encoding.CodePages" version="4.5.0" targetFramework="monoandroid90" />
  <package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Threading" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Threading.Tasks" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Threading.Tasks.Extensions" version="4.5.1" targetFramework="monoandroid90" />
  <package id="System.Threading.Tasks.Parallel" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Threading.Thread" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Threading.Timer" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.ValueTuple" version="4.5.0" targetFramework="monoandroid90" />
  <package id="System.Xml.ReaderWriter" version="4.3.1" targetFramework="monoandroid90" />
  <package id="System.Xml.XDocument" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Xml.XmlDocument" version="4.3.0" targetFramework="monoandroid90" />
  <package id="System.Xml.XPath.XDocument" version="4.3.0" targetFramework="monoandroid90" />
  <package id="UnitsNet" version="4.17.0" targetFramework="monoandroid90" />
  <package id="UnitsNet.Serialization.JsonNet" version="4.0.0" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Arch.Core.Common" version="1.1.1.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Arch.Core.Runtime" version="1.1.1.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Arch.Lifecycle.Common" version="1.1.1.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Arch.Lifecycle.LiveData" version="1.1.1.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Arch.Lifecycle.LiveData.Core" version="1.1.1.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.1.1.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Arch.Lifecycle.ViewModel" version="1.1.1.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Annotations" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.AsyncLayoutInflater" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Collections" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Compat" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Constraint.Layout" version="1.1.2" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Constraint.Layout.Solver" version="1.1.2" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.CoordinaterLayout" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Core.UI" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Core.Utils" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.CursorAdapter" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.CustomTabs" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.CustomView" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Design" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.DocumentFile" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.DrawerLayout" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Fragment" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Interpolator" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Loader" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.LocalBroadcastManager" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Media.Compat" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Print" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.SlidingPaneLayout" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.SwipeRefreshLayout" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Transition" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.v7.AppCompat" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.v7.CardView" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.v7.RecyclerView" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.Vector.Drawable" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.VersionedParcelable" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Android.Support.ViewPager" version="28.0.0.1" targetFramework="monoandroid90" />
  <package id="Xamarin.Build.Download" version="0.4.11" targetFramework="monoandroid90" />
  <package id="Xamarin.Controls.SignaturePad" version="3.0.0" targetFramework="monoandroid90" />
  <package id="Xamarin.Essentials" version="1.1.0" targetFramework="monoandroid90" />
  <package id="Xamarin.GooglePlayServices.Base" version="60.1142.1" targetFramework="monoandroid90" />
  <package id="Xamarin.GooglePlayServices.Basement" version="60.1142.1" targetFramework="monoandroid90" />
  <package id="Xamarin.GooglePlayServices.Location" version="60.1142.1" targetFramework="monoandroid90" />
  <package id="Xamarin.GooglePlayServices.Tasks" version="60.1142.1" targetFramework="monoandroid90" />
</packages>

Version Information

https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-vs4mac-stable.log

=== Visual Studio Enterprise 2019 for Mac ===

Version 8.0.2 (build 23)
Installation UUID: e1324239-09f8-4ef0-841d-818a176fdfbd
    GTK+ 2.24.23 (Raleigh theme)
    Xamarin.Mac 5.6.0.2 (d16-0 / 040682909)

    Package version: 518010003

=== Mono Framework MDK ===

Runtime:
    Mono 5.18.1.3 (2018-08/fdb26b0a445) (64-bit)
    Package version: 518010003

=== NuGet ===

Version: 4.8.2.5835

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
    2.2.0
    2.1.2
    2.1.1
    2.1.0
    2.0.7
    2.0.5
SDK: /usr/local/share/dotnet/sdk/2.2.100/Sdks
SDK Versions:
    2.2.100
    2.1.302
    2.1.301
    2.1.300
    2.1.200
    2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.1/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.6.4
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Updater ===

Version: 11

=== Xamarin.Android ===

Version: 9.2.0.5 (Visual Studio Enterprise)
Android SDK: /Users/sam/Library/Android/sdk
    Supported Android versions:
        5.0 (API level 21)
        6.0 (API level 23)
        7.0 (API level 24)
        7.1 (API level 25)
        8.0 (API level 26)
        8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.2
SDK Build Tools Version: 29.0.0 rc2

Build Information: 
Mono: mono/mono/2018-08-rc@5ad371dab1b
Java.Interop: xamarin/java.interop/d16-0@c987483
LibZipSharp: grendello/LibZipSharp/master@44de300
LibZip: nih-at/libzip/rel-1-5-1@b95cf3f
MXE: xamarin/mxe/xamarin@b9cbb535
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.26.0@325e91a
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-0@0a7edd6

=== Microsoft Mobile OpenJDK ===

Java SDK: /Users/sam/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_8.0.25
1.8.0-25
Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android Device Manager ===

Version: 1.2.0.14
Hash: 86df26f
Branch: remotes/origin/d16-0
Build date: 2019-04-05 16:58:56 UTC

=== Apple Developer Tools ===

Xcode 10.2 (14490.120)
Build 10E125

=== Xamarin.Mac ===

Version: 5.8.0.0 (Visual Studio Enterprise)
Hash: 0aa84521
Branch: d16-0
Build date: 2019-04-02 16:01:19-0400

=== Xamarin.iOS ===

Version: 12.8.0.0 (Visual Studio Enterprise)
Hash: 0aa84521
Branch: d16-0
Build date: 2019-04-02 16:01:19-0400

=== Xamarin Designer ===

Version: 4.17.4.418
Hash: 3d086e814
Branch: remotes/origin/d16-0
Build date: 2019-04-01 09:20:10 UTC

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Build Information ===

Release ID: 800020023
Git revision: c576bb008dfe54cdcf596237e09564ebd2da4343
Build date: 2019-04-06 10:06:46+00
Build branch: master
Xamarin extensions: 2c996830618e7cb8e8be97984d643eb86f122e8d

=== Operating System ===

Mac OS X 10.14.4
Darwin 18.5.0 Darwin Kernel Version 18.5.0
    Mon Mar 11 20:40:32 PDT 2019
    root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64

Log File

 GREF GC Threshold: 46080
 /proc/self/maps:
 12c00000-13fc0000 rw-p 00000000 00:01 2638                               /dev/ashmem/dalvik-main space (region space)_2596_2596 (deleted)
 13fc0000-14140000 rw-p 013c0000 00:01 2638                               /dev/ashmem/dalvik-main space (region space)_2596_2596 (deleted)
 14140000-52c00000 rw-p 01540000 00:01 2638                               /dev/ashmem/dalvik-main space (region space)_2596_2596 (deleted)
 703fd000-705ac000 rw-p 00000000 fe:00 76                                 /data/dalvik-cache/arm/system@framework@boot.art
 705ac000-70648000 rw-p 00000000 fe:00 77                                 /data/dalvik-cache/arm/system@framework@boot-core-libart.art
 70648000-70688000 rw-p 00000000 fe:00 78                                 /data/dalvik-cache/arm/system@framework@boot-conscrypt.art
 70688000-706ac000 rw-p 00000000 fe:00 79                                 /data/dalvik-cache/arm/system@framework@boot-okhttp.art
 706ac000-706d6000 rw-p 00000000 fe:00 80                                 /data/dalvik-cache/arm/system@framework@boot-bouncycastle.art
 706d6000-706e2000 rw-p 00000000 fe:00 81                                 /data/dalvik-cache/arm/system@framework@boot-apache-xml.art
 706e2000-706e6000 rw-p 00000000 fe:00 82                                 /data/dalvik-cache/arm/system@framework@boot-legacy-test.art
 706e6000-7070c000 rw-p 00000000 fe:00 83                                 /data/dalvik-cache/arm/system@framework@boot-ext.art
 7070c000-70c40000 rw-p 00000000 fe:00 84                                 /data/dalvik-cache/arm/system@framework@boot-framework.art
 70c40000-70cad000 rw-p 00000000 fe:00 85                                 /data/dalvik-cache/arm/system@framework@boot-telephony-common.art
 70cad000-70cb5000 rw-p 00000000 fe:00 86                                 /data/dalvik-cache/arm/system@framework@boot-voip-common.art
 70cb5000-70cbd000 rw-p 00000000 fe:00 87                                 /data/dalvik-cache/arm/system@framework@boot-ims-common.art
 70cbd000-70cdd000 rw-p 00000000 fe:00 88                                 /data/dalvik-cache/arm/system@framework@boot-org.apache.http.legacy.boot.art
 70cdd000-70ce2000 rw-p 00000000 fe:00 89                                 /data/dalvik-cache/arm/system@framework@boot-smartbondingservice.art
 70ce2000-70ce8000 rw-p 00000000 fe:00 90                                 /data/dalvik-cache/arm/system@framework@boot-sprengine.art
 70ce8000-70ce9000 rw-p 00000000 fe:00 91                                 /data/dalvik-cache/arm/system@framework@boot-android.hidl.base-V1.0-java.art
 70ce9000-70cec000 rw-p 00000000 fe:00 92                                 /data/dalvik-cache/arm/system@framework@boot-android.hidl.manager-V1.0-java.art
 70cec000-70cf3000 rw-p 00000000 fe:00 94                                 /data/dalvik-cache/arm/system@framework@boot-timakeystore.art
 70cf3000-70cfa000 rw-p 00000000 fe:00 95                                 /data/dalvik-cache/arm/system@framework@boot-fipstimakeystore.art
 70cfa000-70cfb000 rw-p 00000000 fe:00 96                                 /data/dalvik-cache/arm/system@framework@boot-ucmopensslenginehelper.art
 70cfb000-70cfc000 rw-p 00000000 fe:00 97                                 /data/dalvik-cache/arm/system@framework@boot-SemAudioThumbnail.art
 70cfc000-70d07000 rw-p 00000000 fe:00 98                                 /data/dalvik-cache/arm/system@framework@boot-knoxsdk.art
 Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 25206 (ive.integration), pid 25206 (ive.integration)
sdebruyn commented 5 years ago

Disabling LLVM makes the app work again... But I'm not a fan of disabling this

lexboss777 commented 5 years ago

Have similar issues after upgrading. Waited for someone to create this issue. [libc] Fatal signal 11 (SIGSEGV), code 1, fault addr 0x50 in tid 2487 (OkHttp Dispatch)

brendanzagaeski commented 5 years ago

Thanks for the report! The issue when LLVM is enabled is https://github.com/xamarin/xamarin-android/issues/2521. There's a fix landed upstream in Mono, but it isn't yet included in the published builds of Xamarin.Android. The fix adds an extra argument to the LLVM compilation step to avoid an incorrect optimization on the 32-bit armeabi-v7a architecture.

~A workaround in the mean time is to add the extra argument for LLVM explicitly to your .csproj file:~

<PropertyGroup>
  <AndroidAotAdditionalArguments>llvmopts="-data-layout=e-p:32:32-n32-S64 -O2 -disable-tail-calls"</AndroidAotAdditionalArguments>
</PropertyGroup>

EDIT: The workaround of adjusting $(AndroidAotAdditionalArguments) is only valid if the project is targeting no architectures other than armeabi-v7a. See the later comment on this issue for more info.


@lexboss93, I believe the issue you are seeing is instead https://github.com/xamarin/xamarin-android/issues/2920. See that report for additional details on the status.

alexshikov commented 5 years ago

Unfortunately, the fix does not work for me. The app goes further but still crashes with a similar unclear crash.

brendanzagaeski commented 5 years ago

@alexshikov, if you can share additional details about the other crash you're seeing (such as the log from device similar to the original comment here, or a zipped up project that demonstrates the issue), please do submit a new issue with the information so I or another team member can investigate. Thanks in advance!

alexshikov commented 5 years ago

Thank for the fast response. I can't share the source code. But I find this piece of log pretty similar to the one above:

12c00000-13900000 rw-p 00000000 00:05 21344                              /dev/ashmem/dalvik-main space (region space) (deleted)
13900000-14780000 rw-p 00d00000 00:05 21344                              /dev/ashmem/dalvik-main space (region space) (deleted)
14780000-18280000 ---p 01b80000 00:05 21344                              /dev/ashmem/dalvik-main space (region space) (deleted)
18280000-42c00000 rw-p 05680000 00:05 21344                              /dev/ashmem/dalvik-main space (region space) (deleted)
6f816000-6fa4a000 rw-p 00000000 103:2d 122766                            /data/dalvik-cache/arm/system@framework@boot.art
6fa4a000-6fa60000 r--p 00234000 103:2d 122766                            /data/dalvik-cache/arm/system@framework@boot.art
6fa60000-6fb68000 rw-p 00000000 103:2d 122862                            /data/dalvik-cache/arm/system@framework@boot-core-libart.art
6fb68000-6fb7a000 r--p 00108000 103:2d 122862                            /data/dalvik-cache/arm/system@framework@boot-core-libart.art
6fb7a000-6fbad000 rw-p 00000000 103:2d 122984                            /data/dalvik-cache/arm/system@framework@boot-conscrypt.art
6fbad000-6fbb0000 r--p 00033000 103:2d 122984                            /data/dalvik-cache/arm/system@framework@boot-conscrypt.art
6fbb0000-6fbdf000 rw-p 00000000 103:2d 123043                            /data/dalvik-cache/arm/system@framework@boot-okhttp.art
6fbdf000-6fbe2000 r--p 0002f000 103:2d 123043                            /data/dalvik-cache/arm/system@framework@boot-okhttp.art
6fbe2000-6fc50000 rw-p 00000000 103:2d 123191                            /data/dalvik-cache/arm/system@framework@boot-bouncycastle.art
6fc50000-6fc57000 r--p 0006e000 103:2d 123191                            /data/dalvik-cache/arm/system@framework@boot-bouncycastle.art
6fc57000-6fcb2000 rw-p 00000000 103:2d 123332                            /data/dalvik-cache/arm/system@framework@boot-apache-xml.art
6fcb2000-6fcb9000 r--p 0005b000 103:2d 123332                            /data/dalvik-cache/arm/system@framework@boot-apache-xml.art
6fcb9000-6fcf4000 rw-p 00000000 103:2d 123558                            /data/dalvik-cache/arm/system@framework@boot-ext.art
6fcf4000-6fcff000 r--p 0003b000 103:2d 123558                            /data/dalvik-cache/arm/system@framework@boot-ext.art
6fcff000-70579000 rw-p 00000000 103:2d 124192                            /data/dalvik-cache/arm/system@framework@boot-framework.art

...

Let me know if the full log may help.

brendanzagaeski commented 5 years ago

@alexshikov, thanks! If we're lucky, the best additional clue will appear in the device log file (for example accessible using the adb logcat command). The extra clue that will hopefully be there is the backtrace from the crashing process, including both a Cause: line and a backtrace: line, similar to the log seen at the bottom of the original description for #2920. If by chance you're debugging the app, then the issue you're seeing might in fact be https://github.com/xamarin/xamarin-android/issues/2920 itself.

If the backtrace does not match the backtrace shown in https://github.com/xamarin/xamarin-android/issues/2920 or https://github.com/xamarin/xamarin-android/issues/2521, then please create a new issue and paste the backtrace there to help make it easy for any other users who might run across the same problem you're seeing to track the investigation. Thanks!

mfeingol commented 5 years ago

I'm running into the same startup crash problem after upgrading to VS 2019, which is fixed by disabling llvm. This was working fine with VS 2017.

I've attempted to use the llvmopts workaround mentioned above, but when release builds using that are deployed, I see the following errors:

4>XA3001: Could not AOT the assembly: HtmlAgilityPack.dll
4>XA3001: Could not AOT the assembly: Sideroads.Android.dll
4>XA3001: Could not AOT the assembly: Innovative.Geometry.Angle.dll
4>XA3001: Could not AOT the assembly: Geocoding.Google.dll
4>XA3001: Could not AOT the assembly: GeoTimeZone.dll
4>XA3001: Could not AOT the assembly: Geocoding.Core.dll
4>XA3001: Could not AOT the assembly: ImageCircle.Forms.Plugin.dll
4>XA3001: Could not AOT the assembly: FormsViewGroup.dll
4>XA3001: Could not AOT the assembly: Geo.dll
4>XA3001: Could not AOT the assembly: DocumentFormat.OpenXml.dll

What can I provide to help diagnose this issue? Thanks.

brendanzagaeski commented 5 years ago

@mfeingol, you've probably already tried, but as one quick first idea, there's a chance that running Build > Clean on the project or deleting the obj directory might help with the "Could not AOT the assembly" errors. If not, a good next step would be to check the diagnostic MSBuild output for additional information about how the AOT step failed. If that additional information doesn't make it clear how to resolve the problem, I'd recommend to attach the diagnostic build output on a new issue, and I or another member of the team can take a look. Thanks!

Steps to collect diagnostic build output (on Windows):

  1. Set Tools > Options > Project and Solutions [section] > Build and Run [subsection] > MSBuild project build output verbosity to Diagnostic.
  2. Attempt to build and package your app with AOT enabled once more.
  3. Open the View > Output window, and set Show output from to Build Order.
  4. Make sure the Output window is selected, and then choose File > Save Output As to save the contents to a text file. Or copy and paste the build output into a text file.
mfeingol commented 5 years ago

Okay, thanks, Brendan. I feel silly. Deleting bin/obj helped get the deployment working, and the AndroidAotAdditionalArguments workaround fixed the startup crash. And hopefully we'll see a proper fix for https://github.com/xamarin/xamarin-android/issues/2521 soon.

brendanzagaeski commented 5 years ago

Ah, good. Glad to hear that helped! And no worries. I think there are some scenarios around llvmopts that will need to be fixed up in the build logic so that manual cleanup of the output files won't be necessary when those options change. When I get a chance, I'll aim to experiment with those scenarios and file an issue about them.

brendanzagaeski commented 5 years ago

Important invalidation of the workaround: As another user and I were looking at this same problem on https://github.com/xamarin/xamarin-android/issues/2966, we discovered something I should have realized sooner. The workaround of adjusting $(AndroidAotAdditionalArguments) is only valid if the project is targeting no architectures other than armeabi-v7a. It is important not to have those adjustments applied to the arm64-v8a architecture. Otherwise the original crash symptoms will happen again, but this time on the 64-bit architecture.

I did a bit of follow-up testing around this, and it looks like it is technically still possible to work around the issue by customizing the whole _BuildApkEmbed target (see https://github.com/xamarin/xamarin-android/issues/2966#issuecomment-484281295 for details), but where possible, it's likely best to wait for a servicing update that includes the upstream fix from Mono instead.

mfeingol commented 5 years ago

Any sense of which VS version will include the fix?

brendanzagaeski commented 5 years ago

In case anyone might want to test out a preview version that includes the fix, Visual Studio 2019 version 16.1 Preview 2 that was published today includes Xamarin.Android SDK version 9.3.0.14, which has the fix. I did a quick first check using that version without any other workarounds, and I got the expected behavior.

Barring unexpected complications, the corresponding preview version of the Xamarin.Android SDK in Visual Studio for Mac should be available a little later this week too.

davidevosti commented 5 years ago

This bug seems to happen again when using Xamarin.Android 10 and with Profiled AOT enabled. By downgrading to Xamarin.Android 9.4.1.0 the app won't crash

iamlawrencev commented 5 years ago

@davidevosti happens to me as well on Android 10 SDK. Unfortunately I cannot downgrade as to work on Android's dark mode.

brendanzagaeski commented 5 years ago

@davidevosti, @iamlawrencev, thanks for the information! If either of you could submit a new issue that describes what you're seeing so the team can take a look, that would be perfect. Thanks for your patience!

davidevosti commented 5 years ago

Hi Brendan.

I'll do it, I just need some time to restore that environment. I'll put the link once I've done that.

Cheers

On Wed, Oct 9, 2019 at 6:04 AM Brendan Zagaeski notifications@github.com wrote:

@davidevosti https://github.com/davidevosti, @iamlawrencev https://github.com/iamlawrencev, thanks for the information! If either of you could submit a new issue that describes what you're seeing so the team can take a look, that would be perfect. Thanks for your patience!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xamarin/xamarin-android/issues/2960?email_source=notifications&email_token=AAATHB2CM65PEX4Z5PCMSATQNVJ4DA5CNFSM4HFFHPFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAWPGKY#issuecomment-539816747, or mute the thread https://github.com/notifications/unsubscribe-auth/AAATHB3WMQN45HZIS7KPQX3QNVJ4DANCNFSM4HFFHPFA .

davidevosti commented 4 years ago

It seems that as of Xamarin.Android 10.0.3.0 it is fixed again.