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

NPE with Activity#isChangingConfigurations #26

Open
jbiral opened this issue Jun 16, 2017 · 6 comments
Open

NPE with Activity#isChangingConfigurations #26

jbiral opened this issue Jun 16, 2017 · 6 comments

Comments

@jbiral
Copy link

jbiral commented Jun 16, 2017

When the app is stopped and restarted quickly, I intermittently get into this state:

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.Activity.isChangingConfigurations()' on a null object reference
       at com.hannesdorfmann.mosby3.mvp.conductor.delegate.MvpConductorLifecycleListener.preDestroyView(MvpConductorLifecycleListener.java:73)
       at com.bluelinelabs.conductor.Controller.removeViewReference(Controller.java:898)
       at com.bluelinelabs.conductor.Controller.detach(Controller.java:886)
       at com.bluelinelabs.conductor.Controller$8.onDetached(Controller.java:965)
       at com.bluelinelabs.conductor.internal.ViewAttachHandler.reportDetached(ViewAttachHandler.java:103)
       at com.bluelinelabs.conductor.internal.ViewAttachHandler.onViewDetachedFromWindow(ViewAttachHandler.java:58)
       at android.view.View.dispatchDetachedFromWindow(View.java:16782)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3429)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3421)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3421)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3421)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3421)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3421)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3421)
       at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3421)
       at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3718)
       at android.view.ViewRootImpl.doDie(ViewRootImpl.java:6691)
       at android.view.ViewRootImpl.die(ViewRootImpl.java:6668)
       at android.view.WindowManagerGlobal.removeViewLocked(WindowManagerGlobal.java:476)
       at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:414)
       at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:128)
       at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4683)
       at android.app.ActivityThread.-wrap7(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1703)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:154)
       at android.app.ActivityThread.main(ActivityThread.java:6776)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

I don't think there is much I can do since it seems to be internal to the library. Could you please investigate?

@sockeqwe
Copy link
Owner

sockeqwe commented Jun 16, 2017 via email

@jbiral
Copy link
Author

jbiral commented Jun 16, 2017

Thanks, I have open the issue on Conductor too. I don't have any good way to repro this, unfortunately. I use MvpController as my base Controller class, and sometimes we've seen this crash. I will keep you updated if I can get to know more about it.

@dimsuz
Copy link

dimsuz commented Oct 2, 2017

I have 9 crashes in my Firebase console with exactly this stack trace.
Judging from analytics events which in my case get attached to the crashes, this happens when user opens some activity and then presses "back" button.

I am not able to reproduce this manually either...

@dimsuz
Copy link

dimsuz commented Oct 2, 2017

Mosby Conductor version is 3.0.0, Conductor version is 2.1.4

@sockeqwe
Copy link
Owner

sockeqwe commented Oct 2, 2017

I have the same issue on about 0.5 % of my users in 1 of my apps. I can't reproduce it either.
I have informed Erik about that issue. bluelinelabs/Conductor#315

I went through the source code. There is very little Mosby can do here, it seems like am conductor bug but couldn't reproduce it.

@dimsuz
Copy link

dimsuz commented Oct 2, 2017

I see, thanks, will folow that issue too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants