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 InkPageIndicator #215

Open
AllanWang opened this issue Sep 24, 2017 · 2 comments
Open

NPE in InkPageIndicator #215

AllanWang opened this issue Sep 24, 2017 · 2 comments
Assignees

Comments

@AllanWang
Copy link

Relevant Crashlytics
Relevant Java Class

I have not changed anything notable in the indicator, but essentially, there is a situation where dotCenterX is null. It's a bit hard to pinpoint the reason as most of the variables are initialized at different times.

A possible solution is to simply initialize everything, even if it means being an empty array. Maybe you'll have a better idea of what the actual cause is though.

@jam0cam
Copy link

jam0cam commented Apr 19, 2019

I'm also having this issue,..., and after a bit of debugging, it appears that in the failing case,
onDraw is being called before onMeasure. onMeasure is where it sets up dotCenterX.

I find that this bug occurs when there is a chance in pager size. For example, the ViewPager was initially size 1, then it becomes size 5, and it fails to re-measure itself. This is very hard to reproduce. It doesn't happen all the time.

@keyboardsurfer
Copy link
Collaborator

I couldn't access the Crashlytics log. Assigning to Nick for further triage.

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

4 participants