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

[BUG] Cannot add the same observer with different lifecycles #113

Closed
walkingice opened this issue May 9, 2022 · 1 comment · Fixed by #114
Closed

[BUG] Cannot add the same observer with different lifecycles #113

walkingice opened this issue May 9, 2022 · 1 comment · Fixed by #114
Assignees
Labels
bug Something isn't working

Comments

@walkingice
Copy link
Member

androidx.lifecycle.LiveData.observe (LiveData.java:199)
org.mozilla.rocket.menu.BottomSheetHomeMenuFragment.initMenuItems (BottomSheetHomeMenuFragment.kt:120)
org.mozilla.rocket.menu.BottomSheetHomeMenuFragment.onCreateView (BottomSheetHomeMenuFragment.kt:62)
androidx.fragment.app.Fragment.performCreateView (Fragment.java:2963)
androidx.fragment.app.DialogFragment.performCreateView (DialogFragment.java:489)
androidx.fragment.app.FragmentStateManager.createView (FragmentStateManager.java:518)
androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:282)
androidx.fragment.app.FragmentManager.executeOpsTogether (FragmentManager.java:2189)
androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute (FragmentManager.java:2100)
androidx.fragment.app.FragmentManager.execPendingActions (FragmentManager.java:2002)
androidx.fragment.app.FragmentManager$5.run (FragmentManager.java:524)
android.os.Handler.handleCallback (Handler.java:883)
android.os.Handler.dispatchMessage (Handler.java:100)
android.os.Looper.loop (Looper.java:237)
android.app.ActivityThread.main (ActivityThread.java:7817)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1027) 
@walkingice walkingice added the bug Something isn't working label May 9, 2022
@walkingice walkingice self-assigned this May 9, 2022
@walkingice
Copy link
Member Author

an empty observer might be single static instance in JVM

walkingice added a commit that referenced this issue May 9, 2022
An empty observer might use a single static object, which cause a
problem in LiveData/Observer.

to fix #113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant