Closed Tom-Alphero closed 3 years ago
Now that I've been looking into it further I believe it's because I was only creating the child router if it wasn't null
if (contentRouter == null) {
contentRouter = this.getChildRouter(view.findViewById(R.id.childChangeHandlerFrameLayout), "mainRouter")
}
Removing the if
fixes the crash. Leaving up for others.
I've been getting a few reports in production of this and have been able to reproduce it. I'm not 100% of the cause but when executing a transaction on a Router, it crashes as its
container
field is null after being cleared at some point, I assume inControllerHostedRouter.removeHost()
? It could be due to the interactions between LifecycleController, LiveData and ViewModel, idk.Sample app: ReproConductorCrash.zip
To reproduce:
Let me know if more info needed!