-
Notifications
You must be signed in to change notification settings - Fork 22
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
App crashes in don't keep activities mode #36
Comments
We are having exactly the same problem. I will also vote to merge the: |
|
@sockeqwe I have about 300 crashes with this same error in my production application. |
This is quite a showstopper when it comes to certain devices, can this be merged? @sockeqwe |
There is a stable crash after such steps:
The reason is in MvpConductorLifecycleListener.
When there is a controller in backstack (TasksController) method postCreateView will not be invoked. So presenter equals to null. But when you press home button it invokes postDestroy method and throws NullPointerException.
com.hannesdorfmann.mosby3.conductor.sample E/AndroidRuntime: FATAL EXCEPTION: main Process: com.hannesdorfmann.mosby3.conductor.sample, PID: 1277 java.lang.RuntimeException: Unable to destroy activity {com.hannesdorfmann.mosby3.conductor.sample/com.hannesdorfmann.mosby3.conductor.sample.MainActivity}: java.lang.NullPointerException: Presenter returned from getPresenter() is null in com.hannesdorfmann.mosby3.conductor.sample.tasks.TasksController@9221574 at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4383) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4401) at android.app.ActivityThread.-wrap5(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) Caused by: java.lang.NullPointerException: Presenter returned from getPresenter() is null in com.hannesdorfmann.mosby3.conductor.sample.tasks.TasksController@9221574 at com.hannesdorfmann.mosby3.mvp.conductor.delegate.MvpConductorLifecycleListener.postDestroy(MvpConductorLifecycleListener.java:81) at com.bluelinelabs.conductor.Controller.performDestroy(Controller.java:1076) at com.bluelinelabs.conductor.Controller.removeViewReference(Controller.java:972) at com.bluelinelabs.conductor.Controller.destroy(Controller.java:1097) at com.bluelinelabs.conductor.Controller.activityDestroyed(Controller.java:859) at com.bluelinelabs.conductor.Router.onActivityDestroyed(Router.java:558) at com.bluelinelabs.conductor.ActivityHostedRouter.onActivityDestroyed(ActivityHostedRouter.java:61) at com.bluelinelabs.conductor.internal.LifecycleHandler.destroyRouters(LifecycleHandler.java:209) at com.bluelinelabs.conductor.internal.LifecycleHandler.onDestroy(LifecycleHandler.java:160) at android.app.Fragment.performDestroy(Fragment.java:2768) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1432) at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1557) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1618) at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3027) at android.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:3007) at android.app.FragmentController.dispatchDestroy(FragmentController.java:244) at android.app.Activity.performDestroy(Activity.java:7217)
The text was updated successfully, but these errors were encountered: