StoryView icon indicating copy to clipboard operation
StoryView copied to clipboard

Crash due to null pointer exception

Open basmasrour opened this issue 3 years ago • 0 comments

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)

basmasrour avatar Mar 30 '21 07:03 basmasrour