You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App Crash (Android)
androidx.fragment.app.FragmentManager.checkStateLoss
Java.Lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.3
Affected platforms
Android
Affected platform versions
Android 9, Android 10, Android 11
Did you find any workaround?
No response
Relevant log output
Xamarin Exception Stack:
Java.Lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args)
at Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeAbstractInt32Method(String encodedMember, IJavaPeerable self, JniArgumentValue* parameters)
at AndroidX.Fragment.App.BackStackRecord.Commit()
at Microsoft.Maui.Platform.NavigationRootManager.SetContentView(IView view)
at Microsoft.Maui.Platform.NavigationRootManager.Disconnect()
at Microsoft.Maui.Handlers.WindowHandler.DisconnectHandler(NavigationRootManager navigationRootManager)
at Microsoft.Maui.Handlers.WindowHandler.OnDisconnectHandler(Object platformView)
at Microsoft.Maui.Handlers.ElementHandler.DisconnectHandler(Object platformView)
at Microsoft.Maui.Handlers.ElementHandler.Microsoft.Maui.IElementHandler.DisconnectHandler()
at Microsoft.Maui.Controls.Element.SetHandler(IElementHandler newHandler)
at Microsoft.Maui.Controls.Element.set_Handler(IElementHandler value)
at Microsoft.Maui.Platform.ElementExtensions.SetHandler(Context nativeElement, IElement element, IMauiContext context)
at Microsoft.Maui.Platform.ElementExtensions.SetWindowHandler(Activity platformWindow, IWindow window, IMauiContext context)
at Microsoft.Maui.Platform.ApplicationExtensions.CreatePlatformWindow(Activity activity, IApplication application, Bundle savedInstanceState)
at Microsoft.Maui.MauiAppCompatActivity.OnCreate(Bundle savedInstanceState)
at EMP.PDA.MainActivity.OnCreate(Bundle savedInstanceState)
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_(IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState)
at Android.Runtime.JNINativeWrapper.Wrap_JniMarshal_PPL_V(_JniMarshal_PPL_V callback, IntPtr jnienv, IntPtr klazz, IntPtr p0)
at java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1632)
at androidx.fragment.app.FragmentManager.enqueueAction(FragmentManager.java:1672)
at androidx.fragment.app.BackStackRecord.commitInternal(BackStackRecord.java:341)
at androidx.fragment.app.BackStackRecord.commit(BackStackRecord.java:306)
at crc643e9f0f68c1688c10.MainActivity.n_onCreate(Native Method)
at crc643e9f0f68c1688c10.MainActivity.onCreate(MainActivity.java:45)
at android.app.Activity.performCreate(Activity.java:7994)
at android.app.Activity.performCreate(Activity.java:7978)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1548)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3406)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3607)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2068)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7680)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:423)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Thread 2:
0 dalvik.system.VMStack.getThreadStackTrace(VMStack.java:-2)
1 java.lang.Thread.getStackTrace(Thread.java:1736)
2 java.lang.Thread.getAllStackTraces(Thread.java:1812)
3 com.microsoft.appcenter.crashes.Crashes.saveUncaughtException(Crashes.java:1157)
4 com.microsoft.appcenter.crashes.WrapperSdkExceptionManager.saveWrapperException(WrapperSdkExceptionManager.java:58)
5 crc643e9f0f68c1688c10.MainActivity.n_onCreate(MainActivity.java:-2)
6 crc643e9f0f68c1688c10.MainActivity.onCreate(MainActivity.java:45)
7 android.app.Activity.performCreate(Activity.java:7994)
8 android.app.Activity.performCreate(Activity.java:7978)
9 android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1548)
10 android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3406)
11 android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3607)
12 android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
13 android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
14 android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
15 android.app.ActivityThread$H.handleMessage(ActivityThread.java:2068)
16 android.os.Handler.dispatchMessage(Handler.java:106)
17 android.os.Looper.loop(Looper.java:223)
18 android.app.ActivityThread.main(ActivityThread.java:7680)
19 java.lang.reflect.Method.invokeNative(Method.java:-2)
20 java.lang.reflect.Method.invoke(Method.java:423)
21 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
22 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
The text was updated successfully, but these errors were encountered:
Error Message : "Can not perform this action after onSaveInstanceState"
private void checkStateLoss() {
if (mStateSaved) {
throw new IllegalStateException(
"Can not perform this action after onSaveInstanceState");
}
if (mNoTransactionsBecause != null) {
throw new IllegalStateException(
"Can not perform this action inside of " + mNoTransactionsBecause);
}
}
Description
App Crash (Android)
androidx.fragment.app.FragmentManager.checkStateLoss
Java.Lang.IllegalStateException: Can not perform this action after onSaveInstanceState
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.3
Affected platforms
Android
Affected platform versions
Android 9, Android 10, Android 11
Did you find any workaround?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: