fenix icon indicating copy to clipboard operation
fenix copied to clipboard

Crash on Home Screen

Open ekager opened this issue 7 years ago • 3 comments

Steps to reproduce

  1. Open Session
  2. Click on "tabs" icon to go to Home
  3. Click on Menu -> Open Settings
  4. Click Back
  5. On Home Screen, click on your created session in list

Expected behavior

Session opens

Actual behavior

Crashes

io.reactivex.exceptions.OnErrorNotImplementedException: View androidx.coordinatorlayout.widget.CoordinatorLayout{957ab20 V.E...... .......D 0,0-1080,1962} does not have a NavController set at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:704) at io.reactivex.internal.functions.Functions$OnErrorMissingConsumer.accept(Functions.java:701) at io.reactivex.internal.observers.LambdaObserver.onError(LambdaObserver.java:77) at io.reactivex.internal.observers.LambdaObserver.onNext(LambdaObserver.java:67) at io.reactivex.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:309) at io.reactivex.subjects.PublishSubject.onNext(PublishSubject.java:229) at io.reactivex.subjects.SerializedSubject.onNext(SerializedSubject.java:105) at org.mozilla.fenix.home.tabs.TabsAdapter$TabViewHolder$1.onClick(TabsAdapter.kt:58) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.IllegalStateException: View androidx.coordinatorlayout.widget.CoordinatorLayout{957ab20 V.E...... .......D 0,0-1080,1962} does not have a NavController set at androidx.navigation.Navigation.findNavController(Navigation.java:83) at org.mozilla.fenix.home.HomeFragment$onViewCreated$1.accept(HomeFragment.kt:74) at org.mozilla.fenix.home.HomeFragment$onViewCreated$1.accept(HomeFragment.kt:39)

Device information

  • Android device: Pixel 3
  • Fenix version: Master as of Fri 2/15/19

┆Issue is synchronized with this Jira Task

ekager avatar Feb 15 '19 22:02 ekager

This was caused by https://github.com/mozilla-mobile/fenix/commit/ac145c0232ae1b39f583dd654cf98a71f2e22180

boek avatar Feb 16 '19 00:02 boek

Looks like the subscription in onCreateView is happening twice, capturing an old view. We'll have to account for the view lifecycle in these cases

boek avatar Feb 16 '19 02:02 boek

The crash is no longer reproducible, the home screen is successfully displayed when going back from the settings.

Verified on:

  • 1.0.1910 (Build #10642115)

Devices:

  • Nokia 6 (Android 7.1.1)
  • HTC Desire 820 (Android 6.0.1)

bsurd avatar Mar 06 '19 15:03 bsurd