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 in Fragment.setUserVisibleHint #442

Open
httpdispatch opened this issue May 22, 2013 · 0 comments
Open

NPE in Fragment.setUserVisibleHint #442

httpdispatch opened this issue May 22, 2013 · 0 comments

Comments

@httpdispatch
Copy link
Contributor

Reported on Google Play Crashes and ANRs. Don't know how to reproduce it but seems that it is because of delayed execution. (handler.post, which is used to overcome ABS problem JakeWharton/ActionBarSherlock#887). Will add some checks to the place.

java.lang.NullPointerException
at android.support.v4.app.Fragment.setUserVisibleHint(Fragment.java:801)
at com.trovebox.android.app.ui.adapter.FragmentPagerAdapter$3.run(FragmentPagerAdapter.java:144)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4867)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
at dalvik.system.NativeStart.main(Native Method)
httpdispatch added a commit to httpdispatch/mobile-android that referenced this issue May 22, 2013
- FragmentPagerAdapter: added handling of exception to preven app crash
in the setPrimaryItem method
- FragmentPagerAdapter: added tracking of additional parameters when the
exception occurs to determine the error cause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant