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 #315

Closed
jbiral opened this issue Jun 16, 2017 · 3 comments
Closed

NPE with Activity#isChangingConfigurations #315

jbiral opened this issue Jun 16, 2017 · 3 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? This might be related to Mosby too, I will create an issue for it as well.

@EricKuck
Copy link
Member

EricKuck commented Jul 5, 2017

I've been trying to reproduce this for a while now and haven't had any luck. Do you have any additional details or steps I can take to see it happen?

@sockeqwe
Copy link
Contributor

I have seen this issue too but couldn't reproduce it ...

Basically activity.getController() returns null in preDestroyView() sometimes for very few users (3 of 700 users). Unfortunately I don't know when this happens.

Here is the crashlytics link:
http://crashes.to/s/5169854fdb5

and here is the source code of the app:
https://github.com/OpenConference/DroidconBerlin2017

@EricKuck
Copy link
Member

EricKuck commented Nov 4, 2020

This should be fixed with #629. Feel free to reopen if that's not the case.

@EricKuck EricKuck closed this as completed Nov 4, 2020
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