Bug 48704 - use shared runtime second deployment breaks the app at <unknown> <0xffffffff>
Summary: use shared runtime second deployment breaks the app at <unknown> <0xffffffff>
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2016-12-02 12:56 UTC by andrii.kozhyn
Modified: 2017-08-23 21:17 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description andrii.kozhyn 2016-12-02 12:56:13 UTC
Steps 
- Delete all xamarin/mono related apps from the device
- Make sure that Use shared runtime and use fast deployment boxes 
- Run debug of the app
- Stop debugging
- Run deploy and debug second time
As a result application crashes with native exception at start. Unchecking use shared runtime fixes an issue. Stack trace:

12-02 14:48:18.083 E/mono-rt (26930): Stacktrace:
12-02 14:48:18.083 E/mono-rt (26930): 
12-02 14:48:18.083 E/mono-rt (26930):   at <unknown> <0xffffffff>
12-02 14:48:18.083 E/mono-rt (26930):   at Ninject.Components.ComponentContainer.GetAll<T_REF> () <IL 0x00010, 0x0009b>
12-02 14:48:18.083 E/mono-rt (26930):   at Ninject.Modules.ModuleLoader.LoadModules (System.Collections.Generic.IEnumerable`1<string>) <IL 0x0000b, 0x000fb>
12-02 14:48:18.083 E/mono-rt (26930):   at Ninject.KernelBase.Load (System.Collections.Generic.IEnumerable`1<string>) <IL 0x0000e, 0x000ef>
12-02 14:48:18.083 E/mono-rt (26930):   at Ninject.KernelBase..ctor (Ninject.Components.IComponentContainer,Ninject.INinjectSettings,Ninject.Modules.INinjectModule[]) <IL 0x000b7, 0x00593>
12-02 14:48:18.083 E/mono-rt (26930):   at Ninject.KernelBase..ctor (Ninject.Modules.INinjectModule[]) <IL 0x0000c, 0x000b7>
12-02 14:48:18.083 E/mono-rt (26930):   at Ninject.StandardKernel..ctor (Ninject.Modules.INinjectModule[]) <IL 0x00002, 0x00063>
12-02 14:48:18.084 E/mono-rt (26930):   at %Namespace%.Ninject.NinjectMvxIocProvider..ctor (Ninject.Modules.INinjectModule[]) [0x00000] in %path%\Ninject\NinjectMvxIoCProvider.cs:21
12-02 14:48:18.084 E/mono-rt (26930):   at %Namespace%.Ninject.NinjectIoCAdapterSetup.CreateIocProvider () [0x0001c] in %Path%\%Namespace%\Ninject\NinjectIoCAdapterSetup.cs:25
12-02 14:48:18.084 E/mono-rt (26930):   at %Namespace%.Setup.CreateIocProvider () [0x00001] in %Path%\%Namespace%\Setup.cs:38
12-02 14:48:18.084 E/mono-rt (26930):   at MvvmCross.Core.Platform.MvxSetup.InitializeIoC () <IL 0x00001, 0x0006f>
12-02 14:48:18.084 E/mono-rt (26930):   at MvvmCross.Core.Platform.MvxSetup.InitializePrimary () <IL 0x0003f, 0x001d3>
12-02 14:48:18.084 E/mono-rt (26930):   at MvvmCross.Droid.Platform.MvxAndroidSetupSingleton.InitializeFromSplashScreen (MvvmCross.Droid.Views.IMvxAndroidSplashScreenActivity) <IL 0x0004b, 0x00297>
12-02 14:48:18.084 E/mono-rt (26930):   at MvvmCross.Droid.Views.MvxSplashScreenActivity.OnCreate (Android.OS.Bundle) <IL 0x00012, 0x000f3>
12-02 14:48:18.084 E/mono-rt (26930):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/3511/ce955cc0/source/monodroid/src/Mono.Android/platforms/android-24/src/generated/Android.App.Activity.cs:2550
12-02 14:48:18.084 E/mono-rt (26930):   at (wrapper dynamic-method) object.fae9a314-e0b8-422a-b9f3-191d07d561c6 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
12-02 14:48:18.084 E/mono-rt (26930):   at (wrapper native-to-managed) object.fae9a314-e0b8-422a-b9f3-191d07d561c6 (intptr,intptr,intptr) <IL 0x00022, 0x000f7>
12-02 14:48:18.084 E/mono-rt (26930): 
12-02 14:48:18.084 E/mono-rt (26930): Attempting native Android stacktrace:
12-02 14:48:18.084 E/mono-rt (26930): 
12-02 14:48:18.086 E/mono-rt (26930): 	Could not unwind with `libunwind.so`: dlopen failed: library "%path%/lib/arm/libunwind.so" not found
12-02 14:48:18.086 E/mono-rt (26930): 	Could not unwind with `libcorkscrew.so`: dlopen failed: library "%path%/lib/arm/libcorkscrew.so" not found
12-02 14:48:18.086 E/mono-rt (26930): 
12-02 14:48:18.086 E/mono-rt (26930): 	No options left to get a native stacktrace :-(
12-02 14:48:18.086 E/mono-rt (26930): 
12-02 14:48:18.086 E/mono-rt (26930): =================================================================
12-02 14:48:18.086 E/mono-rt (26930): Got a SIGSEGV while executing native code. This usually indicates
12-02 14:48:18.086 E/mono-rt (26930): a fatal error in the mono runtime or one of the native libraries 
12-02 14:48:18.086 E/mono-rt (26930): used by your application.
12-02 14:48:18.086 E/mono-rt (26930): =================================================================
12-02 14:48:18.086 E/mono-rt (26930): 
12-02 14:48:18.086 F/libc    (26930): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 26930 (lutions.Vtester)
Comment 1 andrii.kozhyn 2016-12-05 12:14:08 UTC
Random crashes appear even after first deployment on Nexus 10 device with android 6 installed.
Comment 2 andrii.kozhyn 2016-12-06 15:58:02 UTC
Actually use shared runtime not helping. 
Heere is a stack trace from logcat:

12-06 17:42:43.699: E/mono-rt(3235): Stacktrace:
12-06 17:42:43.699: E/mono-rt(3235):   at <unknown> <0xffffffff>
12-06 17:42:43.699: E/mono-rt(3235):   at System.Linq.Enumerable/WhereEnumerableIterator`1<TSource_REF>.Where (System.Func`2<TSource_REF, bool>) <0x00043>
12-06 17:42:43.699: E/mono-rt(3235):   at System.Linq.Enumerable.Where<TSource_REF> (System.Collections.Generic.IEnumerable`1<TSource_REF>,System.Func`2<TSource_REF, bool>) <0x000a7>
12-06 17:42:43.699: E/mono-rt(3235):   at MvvmCross.Droid.Platform.MvxAndroidSetupSingleton.FindSetupType () <0x00333>
12-06 17:42:43.699: E/mono-rt(3235):   at MvvmCross.Droid.Platform.MvxAndroidSetupSingleton.CreateSetup (Android.Content.Context) <0x0002b>
12-06 17:42:43.699: E/mono-rt(3235):   at MvvmCross.Droid.Platform.MvxAndroidSetupSingleton.EnsureSingletonAvailable (Android.Content.Context) <0x000bf>
12-06 17:42:43.699: E/mono-rt(3235):   at MvvmCross.Droid.Views.MvxSplashScreenActivity.OnCreate (Android.OS.Bundle) <0x00033>
12-06 17:42:43.699: E/mono-rt(3235):   at WB.UI.Interviewer.Activities.SplashActivity.OnCreate (Android.OS.Bundle) <0x0003b>
12-06 17:42:43.699: E/mono-rt(3235):   at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) <0x0005b>
12-06 17:42:43.699: E/mono-rt(3235):   at (wrapper dynamic-method) object.1938791d-a06a-4b03-b430-8332102e67c4 (intptr,intptr,intptr) <0x00043>
12-06 17:42:43.699: E/mono-rt(3235):   at (wrapper native-to-managed) object.1938791d-a06a-4b03-b430-8332102e67c4 (intptr,intptr,intptr) <0x000b3>
12-06 17:42:43.699: E/mono-rt(3235): Attempting native Android stacktrace:
12-06 17:42:43.701: E/mono-rt(3235): 	Could not unwind with `libunwind.so`: dlopen failed: library "/data/app/%app%-1/lib/arm/libunwind.so" not found
12-06 17:42:43.701: E/mono-rt(3235): 	Could not unwind with `libcorkscrew.so`: dlopen failed: library "/data/app/%app%-1/lib/arm/libcorkscrew.so" not found
12-06 17:42:43.701: E/mono-rt(3235): 	No options left to get a native stacktrace :-(
12-06 17:42:43.701: E/mono-rt(3235): =================================================================
12-06 17:42:43.701: E/mono-rt(3235): Got a SIGSEGV while executing native code. This usually indicates
12-06 17:42:43.701: E/mono-rt(3235): a fatal error in the mono runtime or one of the native libraries 
12-06 17:42:43.701: E/mono-rt(3235): used by your application.
12-06 17:42:43.701: E/mono-rt(3235): =================================================================
12-06 17:42:43.701: A/libc(3235): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 3235 (ons.interviewer)
12-06 17:42:43.701: W/(184): debuggerd: handling request: pid=3235 uid=10533 gid=10533 tid=3235
12-06 17:42:43.718: A/DEBUG(3252): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
12-06 17:42:43.718: A/DEBUG(3252): Build fingerprint: 'google/volantis/flounder:7.0/NRD91N/3318108:user/release-keys'
12-06 17:42:43.718: A/DEBUG(3252): Revision: '0'
12-06 17:42:43.718: A/DEBUG(3252): ABI: 'arm'
12-06 17:42:43.718: A/DEBUG(3252): pid: 3235, tid: 3235, name: ons.interviewer  >>> %app% <<<
12-06 17:42:43.718: A/DEBUG(3252): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
12-06 17:42:43.718: A/DEBUG(3252):     r0 caf90ca8  r1 00004001  r2 00000000  r3 caf90cb8
12-06 17:42:43.718: A/DEBUG(3252):     r4 00000008  r5 e487427c  r6 00001f3c  r7 00000011
12-06 17:42:43.718: A/DEBUG(3252):     r8 00001f38  r9 00000011  sl caf90ca8  fp ffe9d630
12-06 17:42:43.718: A/DEBUG(3252):     ip e48742c0  sp ffe9d600  lr e46a42fc  pc e4616a60  cpsr 800e0010
12-06 17:42:43.719: A/DEBUG(3252): backtrace:
12-06 17:42:43.719: A/DEBUG(3252):     #00 pc 000dda60  /data/app/Mono.Android.DebugRuntime-1/lib/arm64/libmonosgen-32bit-2.0.so
12-06 17:42:43.935: I/BootReceiver(585): Copying /data/tombstones/tombstone_02 to DropBox (SYSTEM_TOMBSTONE)
12-06 17:42:43.940: W/(184): debuggerd: resuming target 3235
12-06 17:42:43.943: W/ActivityManager(585):   Force finishing activity %app%/md5dffa28182372d4e44d1c1da5b40f256e.SplashActivity
12-06 17:42:43.946: E/JavaBinder(585): !!! FAILED BINDER TRANSACTION !!!  (parcel size = 112)

Target Android SDK version is 24

Versions:
Microsoft Visual Studio Professional 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

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

Package Installer   2.0.99
Makes it easier, faster and more convenient than ever to install Bower, npm, Yarn, JSPM, TSD, Typings and NuGet packages to any project

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Xamarin   4.2.1.64 (872717c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   7.0.2.37 (ce955cc)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   10.2.1.5 (44931ae)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 3 Prashant [MSFT] 2017-07-05 05:28:42 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue.  

Is this issue specific to Nexus 10 devices? Do you see this on any devices/emulators?
Comment 4 Cody Beyer (MSFT) 2017-08-23 21:17:13 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!