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

NullPointerException after activity recreation #88

Open
appach22 opened this issue Sep 15, 2019 · 0 comments
Open

NullPointerException after activity recreation #88

appach22 opened this issue Sep 15, 2019 · 0 comments

Comments

@appach22
Copy link

appach22 commented Sep 15, 2019

I'm having an exception after leaving an activity with gallery and bringing it back in the case activity was destroyed by system while being in background (you can easily reproduce it if you turn on "Don't keep activities" setiing in a Developer options).
EDIT: happens only while recreation takes place after returning to the gallery fragment from a child fragment

     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.veinhorn.scrollgalleryview.HackyViewPager.setLocked(boolean)' on a null object reference
        at com.veinhorn.scrollgalleryview.ImageFragment.onCreateView(ImageFragment.java:67)
        at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2439)
        at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1460)
        at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
        at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
        at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
        at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3229)
        at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
        at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:620)
        at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:178)

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

1 participant