E Caused by: java.lang.NullPointerException: Attempt to read from field 'int flow.KeyManager$ManagedServices.uses' on a null object reference
E at flow.KeyManager.decrementAndMaybeRemoveKey(KeyManager.java:131)
E at flow.KeyManager.tearDown(KeyManager.java:97)
E at flow.Flow$PendingTraversal.onTraversalCompleted(Flow.java:348)
E at co.recharge.consumer.transition.FlowKeyChanger$startTransition$1.onNext(FlowKeyChanger.kt:336)
E at co.recharge.consumer.transition.FlowKeyChanger$startTransition$1.onNext(FlowKeyChanger.kt:333)
E at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)
E at rx.internal.operators.OnSubscribeOnAssembly$OnAssemblySubscriber.onNext(OnSubscribeOnAssembly.java:124)
E at rx.internal.operators.OperatorObserveOn$ObserveOnSubscriber.call(OperatorObserveOn.java:224)
E at rx.android.schedulers.LooperScheduler$ScheduledAction.run(LooperScheduler.java:107)
Looks like duplicate of #194 ?
@loganj shouldn't KeyChanger or Dispatcher be lifecycle-aware to complete or cancel animated state transitions when host is paused? Is there any best-practice or example about this?
1.0.0-alpha3
Activity.onBackPressed()
LoadingScreenView
finishes loading its data, kicks off a call to transition fromLoadingScreen
->MapScreen
Activity.onPause
firesActivity.onDestroy
fires,KeyManager.tearDown()
is calledLoadingScreen
key, crashesThis is the first call to
KeyManager.tearDown
:And the actual crash:
I'm not at all sure what the real fix is here.