Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Crash due to null pointer exception #6

@basmasrour

Description

@basmasrour

Somehow when I close the story (by back button) the story completes viewing, so the storiesList is null after calling onDestroy() but the nextStory() called.
the crash details:
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference
at omari.hamza.storyview.StoryView.nextStory(StoryView.java:223)
at omari.hamza.storyview.utils.ViewPagerAdapter$2.onLoadFailed(ViewPagerAdapter.java:82)
at com.bumptech.glide.request.SingleRequest.onLoadFailed(SingleRequest.java:668)
at com.bumptech.glide.request.SingleRequest.onLoadFailed(SingleRequest.java:636)
at com.bumptech.glide.load.engine.EngineJob.callCallbackOnLoadFailed(EngineJob.java:172)
at com.bumptech.glide.load.engine.EngineJob$CallLoadFailed.run(EngineJob.java:398)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions