Bug 53373 - Crash after app switching?
Summary: Crash after app switching?
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.1 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-03-15 19:45 UTC by Shay
Modified: 2017-10-13 18:28 UTC (History)
4 users (show)

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


Attachments

Description Shay 2017-03-15 19:45:16 UTC
I experienced this crash today as well:
The scenario was something like :
1. The app was updating a list in the background with progress indicator blocking user input
2. The user clicked on the home button in android
3. The user then attempted to switch back to the app => crash.

java.lang.IllegalStateException: Activity has been destroyed
android.support.v4.app.FragmentManagerImpl.enqueueAction()FragmentManager.java:1864
android.support.v4.app.BackStackRecord.commitInternal()BackStackRecord.java:649
android.support.v4.app.BackStackRecord.commitAllowingStateLoss()BackStackRecord.java:614
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onDestroy(Native Method)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onDestroy()FormsAppCompatActivity.java:80
android.app.Activity.performDestroy()Activity.java:6189
android.app.Instrumentation.callActivityOnDestroy()Instrumentation.java:1164
android.app.ActivityThread.performDestroyActivity()ActivityThread.java:3778
android.app.ActivityThread.handleDestroyActivity()ActivityThread.java:3809
android.app.ActivityThread.access$1400()ActivityThread.java:155
android.app.ActivityThread$H.handleMessage()ActivityThread.java:1371
android.os.Handler.dispatchMessage()Handler.java:102
android.os.Looper.loop()Looper.java:135
android.app.ActivityThread.main()ActivityThread.java:5343
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke()Method.java:372
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:905
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:700
Xamarin caused by: Java.Lang.IllegalStateException: Activity has been destroyed
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()exceptionservicescommon.cs:143
Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method)JniEnvironment.g.cs:11464
Android.Runtime.JNIEnv.CallIntMethod(IntPtr jobject, IntPtr jmethod)JNIEnv.g.cs:186
Android.Support.V4.App.FragmentTransactionInvoker.CommitAllowingStateLoss()<7a2a36256f1648ecbd0c15a75bc5a349>:0
Xamarin.Forms.Platform.Android.AppCompat.MasterDetailContainer.Dispose(bool disposing)
Java.Lang.Object.Dispose()Object.cs:203
Xamarin.Forms.Platform.Android.AppCompat.MasterDetailPageRenderer.Dispose(bool disposing)
Java.Lang.Object.Dispose()Object.cs:203
Xamarin.Forms.Platform.Android.AppCompat.Platform.SetPage(Page newRoot)
Xamarin.Forms.Platform.Android.AppCompat.Platform.Dispose()
Xamarin.Forms.Platform.Android.FormsAppCompatActivity.OnDestroy()
Android.Support.V4.App.FragmentActivity.n_OnDestroy(IntPtr jnienv, IntPtr native__this)<7a2a36256f1648ecbd0c15a75bc5a349>:0
at (wrapper dynamic-method) System.Object:588fe40e-5327-48e3-8067-fbe86caa2cc0 (intptr,intptr)
--- End of managed Java.Lang.IllegalStateException stack trace ---
java.lang.IllegalStateException: Activity has been destroyed
android.support.v4.app.FragmentManagerImpl.enqueueAction()FragmentManager.java:1864
android.support.v4.app.BackStackRecord.commitInternal()BackStackRecord.java:649
android.support.v4.app.BackStackRecord.commitAllowingStateLoss()BackStackRecord.java:614
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onDestroy(Native Method)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onDestroy()FormsAppCompatActivity.java:80
android.app.Activity.performDestroy()Activity.java:6189
android.app.Instrumentation.callActivityOnDestroy()Instrumentation.java:1164
android.app.ActivityThread.performDestroyActivity()ActivityThread.java:3778
android.app.ActivityThread.handleDestroyActivity()ActivityThread.java:3809
android.app.ActivityThread.access$1400()ActivityThread.java:155
android.app.ActivityThread$H.handleMessage()ActivityThread.java:1371
android.os.Handler.dispatchMessage()Handler.java:102
android.os.Looper.loop()Looper.java:135
android.app.ActivityThread.main()ActivityThread.java:5343
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke()Method.java:372
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:905
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:700



---

=== Xamarin Studio Business ===

Version 6.2 (build 1821)
Installation UUID: 07360e74-2c80-443b-94a1-6221c776bc97
Runtime:
	Mono 4.8.0 (mono-4.8.0-branch/e4a3cf3) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 408000495

=== NuGet ===

Version: 3.5.0.0

=== Xamarin.Profiler ===

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

=== Apple Developer Tools ===

Xcode 8.2.1 (11766.1)
Build 8C1002

=== Xamarin.iOS ===

Version: 10.4.0.123 (Xamarin Business)
Hash: 35d1ccd
Branch: cycle9
Build date: 2017-02-16 17:40:00-0500

=== Xamarin.Mac ===

Version: 3.0.0.393 (Xamarin Business)

=== Xamarin Inspector ===

Version: 1.1.2.0
Hash: cdc01b9
Branch: 1.1-release
Build date: Wed, 22 Feb 2017 23:24:11 GMT

=== Xamarin.Android ===

Version: 7.1.0.41 (Xamarin Business)
Android SDK: /Users/shayo/Library/Android/sdk
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		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.1

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

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 602001821
Git revision: d41b6e51f3fa46a1943f2e31a778d28a7c73d069
Build date: 2017-02-17 15:18:19-05
Xamarin addins: 1363a8d943bab7700c93a97474060b6734aa7f94
Build lane: monodevelop-lion-cycle9

=== Operating System ===

Mac OS X 10.12.3
Darwin Shays-MacBook-Pro.local 16.4.0 Darwin Kernel Version 16.4.0
    Thu Dec 22 22:53:21 PST 2016
    root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
Comment 1 Cody Beyer (MSFT) 2017-06-27 21:29:13 UTC
Hello.

This is normally caused by a bug within the app itself, rather than a bug in Xamarin.Android. The only way I can cause this error to occur is to destroy an activity when backgrounded, and then attempt to open said activity. Are you able to provide a copy of the app which demonstrates this issue?
Comment 2 Jon Douglas [MSFT] 2017-10-13 18:28:44 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!

Note You need to log in before you can comment on or make changes to this bug.