Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after onPause of app, Lifecycle issue. #110

Open
CarlosCMD opened this issue Jul 14, 2024 · 1 comment
Open

Crash after onPause of app, Lifecycle issue. #110

CarlosCMD opened this issue Jul 14, 2024 · 1 comment

Comments

@CarlosCMD
Copy link

Please complete the following information:

  • Library Version [e.g. v2.2.4]
  • Affected Device(s) [Android x86 Android 9.0]

Describe the Bug:
Crash with the following log occurred after interacting with the menu(in recycler view) and after switching to another app in multi-window:
java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onPause(androidx.lifecycle.LifecycleOwner)" at androidx.lifecycle.FullLifecycleObserverAdapter.onStateChanged(FullLifecycleObserverAdapter.java:45) at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354) at androidx.lifecycle.LifecycleRegistry.backwardPass(LifecycleRegistry.java:284) at androidx.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:302) at androidx.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:148) at androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:134) at androidx.lifecycle.ReportFragment.dispatch(ReportFragment.java:68) at androidx.lifecycle.ReportFragment.dispatch(ReportFragment.java:144) at androidx.lifecycle.ReportFragment.onPause(ReportFragment.java:122) at android.app.Fragment.performPause(Fragment.java:2723) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1353) at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1576) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1637) at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3046) at android.app.FragmentManagerImpl.dispatchPause(FragmentManager.java:3012) at android.app.FragmentController.dispatchPause(FragmentController.java:215) at android.app.Activity.performPause(Activity.java:7337) at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1465) at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4021) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3986) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3938) at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:45) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:518) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Expected Behavior:

No crash in onPause in default lifecycle

@CarlosCMD
Copy link
Author

Even after adding powerMenu.setLifecycleOwner(ViewTreeLifecycleOwner.get(myView));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant