janheinrichmerker/material-intro

NullPointerException: Attempt to read from null array

firefinchdev opened this issue · 9 comments

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.softinit.iquitos.mainapp/com.softinit.iquitos.mainapp.ui.intro.AppIntroActivity}: java.lang.NullPointerException: Attempt to read from null array
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2830)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2909)
       at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4798)
       at android.app.ActivityThread.-wrap18(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1612)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6592)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)
Caused by java.lang.NullPointerException: Attempt to read from null array
       at com.heinrichreimersoftware.materialintro.view.InkPageIndicator.setSelectedPage(InkPageIndicator.java:626)
       at com.heinrichreimersoftware.materialintro.view.InkPageIndicator.onPageSelected(InkPageIndicator.java:221)
       at com.heinrichreimersoftware.materialintro.view.FadeableViewPager$OnPageChangeListenerWrapper.onPageSelected(FadeableViewPager.java:99)
       at androidx.viewpager.widget.ViewPager.dispatchOnPageSelected(ViewPager.java:1947)
       at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:665)
       at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:631)
       at androidx.viewpager.widget.ViewPager.onRestoreInstanceState(ViewPager.java:1462)
       at com.heinrichreimersoftware.materialintro.view.SwipeBlockableViewPager.onRestoreInstanceState(SwipeBlockableViewPager.java:179)
       at android.view.View.dispatchRestoreInstanceState(View.java:17654)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3726)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3732)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3732)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3732)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3732)
       at android.view.View.restoreHierarchyState(View.java:17632)
       at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2130)
       at android.app.Activity.onRestoreInstanceState(Activity.java:1106)
       at android.app.Activity.performRestoreInstanceState(Activity.java:1061)
       at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1281)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2803)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2909)
       at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4798)
       at android.app.ActivityThread.-wrap18(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1612)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6592)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:769)

Observed on Android 8, 9 devices.

@firefinchdev I'm still getting this error because it has not made its way into the release version

@badoyg
I created a fork for my own purpose. You may try that. https://github.com/firefinchdev/material-intro
I think I have already resolved the issue in my fork, but if it is not solved, dont expect me to resolve it. PRs are welcome.

How can I implement your fork in my project?

Read readme

@firefinchdev readme tells me to do this implementation 'com.heinrichreimersoftware:material-intro:2.0.0' but this release doesn't contain your fixed version

the fork's readme

Okay, thanks! Can you please add RTL support to your fork? It shouldn't take that long. It's the only thing that's missing.

Okay, thanks! Can you please add RTL support to your fork? It shouldn't take that long. It's the only thing that's missing.

No