-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Bug] "open link PB mode Fenix" and hit back, IllegalStateExceptionandroidx.fragment.app.FragmentManager in ensureExecReady, FragmentManager has been destroyed #8374
Comments
I tried to reproduce this but for me the PWA opens and functions correctly. Can someone from QA try to reproduce this? |
I tried to reproduce this issue but without any success. Devices:
Build: Firefox Preview Nightly 2/21 #20520606. |
I also can no longer reproduce this. |
Closing as fixed |
Hi, Still reproducible on the latest ❗ Not reproducible on Google Pixel 3a (Android 9) ► Crashlog --------- beginning of crash
2020-02-26 11:35:06.682 29357-29357/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.mozilla.fenix.nightly, PID: 29357
java.lang.RuntimeException: Unable to resume activity {org.mozilla.fenix.nightly/org.mozilla.fenix.nightly.App}: java.lang.RuntimeException: Failed to call observer method
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4278)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4319)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2065)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7555)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Caused by: java.lang.RuntimeException: Failed to call observer method
at androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:6)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeMethodsForEvent(ClassesInfoCache.java:2)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeCallbacks(ClassesInfoCache.java:1)
at androidx.lifecycle.ReflectiveGenericLifecycleObserver.onStateChanged(ReflectiveGenericLifecycleObserver.java:1)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:3)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:9)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:12)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:5)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:2)
at androidx.fragment.app.Fragment.performStart(Fragment.java:7)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:108)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:4)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:218)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3)
at androidx.fragment.app.Fragment.performStart(Fragment.java:14)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:108)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:4)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:218)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:18)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:1)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1340)
at android.app.Activity.performStart(Activity.java:7364)
at android.app.Activity.performRestart(Activity.java:7439)
at android.app.Activity.performResume(Activity.java:7444)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4246)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4319)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2065)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7555)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Caused by: java.lang.IllegalStateException: SET SESSION: Current activity: HomeActivity Other activity: ExternalAppBrowserActivity
at mozilla.components.browser.engine.gecko.GeckoEngineView.render(GeckoEngineView.kt:17)
at mozilla.components.feature.session.EngineViewPresenter.renderSession$feature_session_release(EngineViewPresenter.kt:1)
at mozilla.components.feature.session.SessionFeature.start(SessionFeature.kt:6)
at mozilla.components.support.base.feature.ViewBoundFeatureWrapper.start$support_base_release(ViewBoundFeatureWrapper.kt:1)
at mozilla.components.support.base.feature.LifecycleBinding.start(ViewBoundFeatureWrapper.kt:1)
at java.lang.reflect.Method.invoke(Native Method)
at androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback(ClassesInfoCache.java:4)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeMethodsForEvent(ClassesInfoCache.java:2)
at androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeCallbacks(ClassesInfoCache.java:1)
at androidx.lifecycle.ReflectiveGenericLifecycleObserver.onStateChanged(ReflectiveGenericLifecycleObserver.java:1)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:3)
at androidx.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:9)
at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:12)
at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:5)
at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:2)
at androidx.fragment.app.Fragment.performStart(Fragment.java:7)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:108)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:4)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:218)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3)
at androidx.fragment.app.Fragment.performStart(Fragment.java:14)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:108)
at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:4)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:218)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3)
at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:18)
at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:1)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1340)
at android.app.Activity.performStart(Activity.java:7364)
at android.app.Activity.performRestart(Activity.java:7439)
at android.app.Activity.performResume(Activity.java:7444)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4246)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4319)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2065)
at android.os.Handler.dispatchMessage(Handler.java:109)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7555)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)
Caused by: java.lang.IllegalStateException: Display already acquired
at org.mozilla.geckoview.GeckoSession.acquireDisplay(GeckoSession.java:5)
2020-02-26 11:35:06.682 29357-29357/? E/AndroidRuntime: at org.mozilla.geckoview.GeckoView.setSession(GeckoView.java:7)
at mozilla.components.browser.engine.gecko.GeckoEngineView.render(GeckoEngineView.kt:10)
... 39 more
2020-02-26 11:35:06.683 29357-29357/? I/mozac/CrashReporter: Received crash: UncaughtExceptionCrash(throwable=java.lang.RuntimeException: Unable to resume activity {org.mozilla.fenix.nightly/org.mozilla.fenix.nightly.App}: java.lang.RuntimeException: Failed to call observer method, breadcrumbs=[Breadcrumb(message=Changing to fragment homeFragment, isCustomTab: false, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:34:40 GMT+02:00 2020), Breadcrumb(message=Changing to fragment settingsFragment, isCustomTab: false, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:34:43 GMT+02:00 2020), Breadcrumb(message=Changing to fragment privateBrowsingFragment, isCustomTab: false, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:34:44 GMT+02:00 2020), Breadcrumb(message=Changing to fragment settingsFragment, isCustomTab: false, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:34:54 GMT+02:00 2020), Breadcrumb(message=Changing to fragment homeFragment, isCustomTab: false, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:34:55 GMT+02:00 2020), Breadcrumb(message=Changing to fragment externalAppBrowserFragment, isCustomTab: true, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:34:58 GMT+02:00 2020), Breadcrumb(message=Changing to fragment externalAppBrowserFragment, isCustomTab: true, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:35:06 GMT+02:00 2020), Breadcrumb(message=Changing to fragment browserFragment, isCustomTab: false, data={}, category=DestinationChanged, level=INFO, type=DEFAULT, date=Wed Feb 26 11:35:06 GMT+02:00 2020)])
2020-02-26 11:35:06.683 29357-29357/? I/mozac/CrashReporter: Showing prompt |
Thanks @AndiAJ ! Slightly different trace now but that's good info to keep looking into |
With the original STR I'm still seeing on my Pixel 3 (but only sometimes)
|
This seems to be related to one of the most common signatures we are seeing on Nightly. Crash in [@ java.lang.IllegalStateException: at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java)] bug 1641040 |
I'm going to dupe these to #10709, and I've moved STRs over bc these all have the same crash signature. |
My bad, this is not the same bug as #10709, will do some un-duping. |
…r finishing activities
…r finishing activities
A few things we decided to do here for this bug:
|
I was able to reproduce the crash on OnePlus 5T (Android 9) on 6/5 Nightly build, with the following steps:
Fenix either crashes or displayed the "Unable to send RETRY" snackbar. https://crash-stats.mozilla.org/report/index/4e6c3a43-8992-4286-bed1-701680200605 |
I got an ANR error with these steps on 77.0.0-beta2. |
@softvision-miralobontiu I think this might be a different bug, but is also fragmentmanager related. Stack trace here specifically is |
Okay, here's some really consistent STR for me, at least 1/5 times. Have open links in Private Browsing turned on The crash seems to happen when the PB system icon goes away. |
@liuche with those step, I can repro on Nightly ~1/5 times, but I'm seeing a native crash (id bc606679-2815-41ea-9c81-e0b87e3809fb) , not this FragmentManager trace :/ |
I also just repro-ed this on the most recent Nightly, and I'm also getting a native crash, here's the socorro link: https://crash-stats.mozilla.org/report/index/c2d90164-a401-4802-bd6d-7658f0200618 Not sure why it changed. It also looks like this has decreased in Sentry over the last couple of weeks: https://sentry.prod.mozaws.net/operations/firefox-nightly/?query=is%3Aunresolved+ensureexec&statsPeriod=14d |
I was able to repro the fragmentmanager crash once, but of the 5 times I crashed with similar STR to #8374 (comment), 4 were the native crash |
Do we know why this was a native crash sometimes - is it two issues somehow, and we're only handling one of them? Or the native crash is getting triggered racily. |
We've tried the steps to reproduce this on Fenix Beta 78.0.1 & 79.0.1 and looks like it is fixed. Marking this as fixed and closing. |
6/3 UPDATE
There's a recent significant spike of this crash in Nightly starting May, 19:
https://sentry.prod.mozaws.net/operations/fenix-nightly/issues/6457309/
Various cases of this fixed before: https://github.com/mozilla-mobile/fenix/issues?q=is%3Aissue+FragmentManager+has+been+destroyed+is%3Aclosed
Steps to reproduce
Expected behavior
The PWA will be launched
Actual behavior
The PWA activity appears briefly, but then fenix crashes.
Logcat
Device information
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: