Bug 53702 - MasterDetailPage dispose results in IllegalStateException
Summary: MasterDetailPage dispose results in IllegalStateException
Status: RESOLVED DUPLICATE of bug 46494
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-03-22 06:54 UTC by Dave Friedel
Modified: 2017-03-22 23:00 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 DUPLICATE of bug 46494

Description Dave Friedel 2017-03-22 06:54:12 UTC
We are using your AppCompat and have a MasterDetailPage but when we dispose of the app via the OS - it is creating the following error outside of our codebase.  We are unsure how to resolve this.

java.lang.IllegalStateException: Activity has been destroyed
android.support.v4.app.FragmentManagerImpl.enqueueAction()FragmentManager.java:1515
android.support.v4.app.BackStackRecord.commitInternal()BackStackRecord.java:638
android.support.v4.app.BackStackRecord.commitAllowingStateLoss()BackStackRecord.java:621
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onDestroy(Native Method)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onDestroy()FormsAppCompatActivity.java:80
android.app.Activity.performDestroy()Activity.java:6112
android.app.Instrumentation.callActivityOnDestroy()Instrumentation.java:1140
android.app.ActivityThread.performDestroyActivity()ActivityThread.java:3658
android.app.ActivityThread.handleDestroyActivity()ActivityThread.java:3689
android.app.ActivityThread.access$1400()ActivityThread.java:144
android.app.ActivityThread$H.handleMessage()ActivityThread.java:1332
android.os.Handler.dispatchMessage()Handler.java:102
android.os.Looper.loop()Looper.java:135
android.app.ActivityThread.main()ActivityThread.java:5221
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke()Method.java:372
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:899
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:694
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()<27c17fe440cf491ba8255bcefade6e02>: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.App.Activity.n_OnDestroy(IntPtr jnienv, IntPtr native__this)Android.App.Activity.cs:2981
at (wrapper dynamic-method) System.Object:44c82161-ff2b-499d-9738-250cf31ef84a (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:1515
android.support.v4.app.BackStackRecord.commitInternal()BackStackRecord.java:638
android.support.v4.app.BackStackRecord.commitAllowingStateLoss()BackStackRecord.java:621
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.n_onDestroy(Native Method)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsAppCompatActivity.onDestroy()FormsAppCompatActivity.java:80
android.app.Activity.performDestroy()Activity.java:6112
android.app.Instrumentation.callActivityOnDestroy()Instrumentation.java:1140
android.app.ActivityThread.performDestroyActivity()ActivityThread.java:3658
android.app.ActivityThread.handleDestroyActivity()ActivityThread.java:3689
android.app.ActivityThread.access$1400()ActivityThread.java:144
android.app.ActivityThread$H.handleMessage()ActivityThread.java:1332
android.os.Handler.dispatchMessage()Handler.java:102
android.os.Looper.loop()Looper.java:135
android.app.ActivityThread.main()ActivityThread.java:5221
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke()Method.java:372
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:899
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:694
Comment 1 Jimmy [MSFT] 2017-03-22 23:00:57 UTC

*** This bug has been marked as a duplicate of bug 46494 ***