Bug 58260 - App destroy and recreate main activity on Samsung S7
Summary: App destroy and recreate main activity on Samsung S7
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.4
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
Depends on:
Reported: 2017-07-19 21:10 UTC by Hector Suarez
Modified: 2017-07-26 23:37 UTC (History)
3 users (show)

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

Sample project to recreate issue with Galaxy S7 (124.97 KB, application/zip)
2017-07-19 21:12 UTC, Hector Suarez
Log Cat (723.04 KB, text/plain)
2017-07-21 19:26 UTC, Hector Suarez

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 for Bug 58260 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Hector Suarez 2017-07-19 21:10:01 UTC
We have an Enterprise App targeted to Samsung Galaxy S7, and we are having a strange behaviour which causes our app to crash.

  Apparently the App Destroys and creates again the main activity on Samsung S7. I'm attaching a simple project and in order to replicate this issue just run the app in a Samsung Galaxy S7 (SAMSUNG-SM-G930V) with Android 7.0 and place a breakpoint in MainActivity base.OnDestroy();  when you run the app, after some seconds/minutes... the app runs this piece of code for no reason. By the way we are only executing this app no other one. You will notice we have LaunchMode = LaunchMode.SingleInstance, in place this is required on our App due to an Active Directory Web Login with Kinvey SDK.

Visual Studio Community 2017 for Mac
Version 7.0.1 (build 24)
Installation UUID: a0f1bf11-fbf7-4792-8d0c-9fe13c902abf
	Mono (2017-02/5077205) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 500010001


.NET Core
Runtime: /usr/local/share/dotnet/dotnet
SDK: /usr/local/share/dotnet/sdk/1.0.3/Sdks
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks

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

Apple Developer Tools
Xcode 8.3.3 (12175.1)
Build 8E3004b

Version: (Visual Studio Community)
Hash: d2270eec
Branch: d15-2
Build date: 2017-05-22 16:30:53-0400

Version: (Visual Studio Community)
Android SDK: /Users/hectorsuarez/Library/android-sdk
	Supported Android versions:
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.3
SDK Build Tools Version: 25.0.2

Java SDK: /usr
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Android Designer EPL code available here:

Version: (Visual Studio Community)

Xamarin Inspector
Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

Build Information
Release ID: 700010024
Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9
Build date: 2017-05-19 05:44:51-04
Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93
Build lane: monodevelop-lion-d15-2

Operating System
Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64

This is what the Application Output window is displaying then executing the onDestroy

[Mono] [0xcb3fe920] worker finishing
Thread finished: <Thread Pool> #10
[InputMethodManager] HSI from window - flag : 0 Pid : 31889
Thread started: <Thread Pool> #12
Thread started: <Thread Pool> #13
[Mono] [0xcb3fe920] worker starting
Loaded assembly: System.Runtime.Serialization.dll [External]
[Mono] Image addref System.Runtime.Serialization[0xca5fb980] -> System.Runtime.Serialization.dll[0xc8793100]: 2
[Mono] Prepared to set up assembly 'System.Runtime.Serialization' (System.Runtime.Serialization.dll)
[Mono] Assembly System.Runtime.Serialization[0xca5fb980] added to domain RootDomain, ref_count=1
[Mono] AOT: image 'System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/com.companyname.com_propelics_s7issue-1/lib/arm/libaot-System.Runtime.Serialization.dll.so" not found
[Mono] AOT: image '/usr/local/lib/mono/aot-cache/arm/System.Runtime.Serialization.dll.so' not found: dlopen failed: library "/data/app/com.companyname.com_propelics_s7issue-1/lib/arm/libaot-System.Runtime.Serialization.dll.so" not found
[Mono] Config attempting to parse: 'System.Runtime.Serialization.dll.config'.
[Mono] Config attempting to parse: '/usr/local/etc/mono/assemblies/System.Runtime.Serialization/System.Runtime.Serialization.config'.
[Mono] Assembly Ref addref Xamarin.Forms.Platform.Android[0xdf18d1e0] -> System.Runtime.Serialization[0xca5fb980]: 2
[Mono] [0xcb2fd920] worker starting
[Mono] Assembly Ref addref System.Runtime.Serialization[0xca5fb980] -> System.Xml[0xdf18ebc0]: 4
[Mono] Assembly Ref addref System.Runtime.Serialization[0xca5fb980] -> mscorlib[0xe865f1c0]: 40
Loaded assembly: System.ServiceModel.Internals.dll [External]
[Mono] Image addref System.ServiceModel.Internals[0xca5fbf80] -> System.ServiceModel.Internals.dll[0xc8791d00]: 2
[Mono] Prepared to set up assembly 'System.ServiceModel.Internals' (System.ServiceModel.Internals.dll)
[Mono] Assembly System.ServiceModel.Internals[0xca5fbf80] added to domain RootDomain, ref_count=1
[Mono] AOT: image 'System.ServiceModel.Internals.dll.so' not found: dlopen failed: library "/data/app/com.companyname.com_propelics_s7issue-1/lib/arm/libaot-System.ServiceModel.Internals.dll.so" not found
[Mono] AOT: image '/usr/local/lib/mono/aot-cache/arm/System.ServiceModel.Internals.dll.so' not found: dlopen failed: library "/data/app/com.companyname.com_propelics_s7issue-1/lib/arm/libaot-System.ServiceModel.Internals.dll.so" not found
[Mono] Config attempting to parse: 'System.ServiceModel.Internals.dll.config'.
[Mono] Config attempting to parse: '/usr/local/etc/mono/assemblies/System.ServiceModel.Internals/System.ServiceModel.Internals.config'.
[Mono] Assembly Ref addref System.Runtime.Serialization[0xca5fb980] -> System.ServiceModel.Internals[0xca5fbf80]: 2
[Mono] Assembly Ref addref System.ServiceModel.Internals[0xca5fbf80] -> mscorlib[0xe865f1c0]: 41
[Mono] Assembly Ref addref Xamarin.Forms.Platform.Android[0xdf18d1e0] -> System.Xml[0xdf18ebc0]: 5
Comment 1 Hector Suarez 2017-07-19 21:12:42 UTC
Created attachment 23670 [details]
Sample project to recreate issue with Galaxy S7
Comment 2 Jimmy [MSFT] 2017-07-20 23:18:12 UTC
I ran the attached project on an S7 in test cloud but it did not appear to crash with this issue. We will need to locate an S7 so we can test this with locally and confirm.

In the meantime, could you gather the adb log[1] from the device and attach it to the report? Thanks!
Comment 3 Jimmy [MSFT] 2017-07-20 23:21:02 UTC
Forgot to add the link in my last comment: https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/version-logs/#Android_adb_logcat_logs
Comment 4 Hector Suarez 2017-07-20 23:49:23 UTC
Sure Jimmy will do attach the adb log, and yes we tested with another Samsung S7 Model and works normally, It seems something related to the Verizon build its the Samsung S7 SM-G930V
Comment 5 Hector Suarez 2017-07-21 19:26:04 UTC
Created attachment 23725 [details]
Log Cat

This is the log cat runned with the sample app attached, what I did is just run the app and let it run until I got the OnDestroy/OnCreate events twice, then saved the logcat