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 on Layout.getLineForOffset(int) Editor.java file #393

Open
jyotisakhareNira opened this issue Aug 15, 2020 · 9 comments

Comments

@jyotisakhareNira
Copy link

Recently migrated the project to AndroidX and below crash is happening only on Android 10 Xiaomi phones.
Please help

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.text.Layout.getLineForOffset(int)' on a null object reference at android.widget.Editor$ActionPinnedPopupWindow.computeLocalPosition(Editor.java:3255) at android.widget.Editor$PinnedPopupWindow.show(Editor.java:3577) at android.widget.Editor$ActionPinnedPopupWindow.show(Editor.java:3420) at android.widget.Editor$EmailAddPopupWindow.show(Editor.java:4944) at android.widget.Editor$1.run(Editor.java:1485) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7509) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)

@olegsvs
Copy link

olegsvs commented Sep 29, 2020

@jyotisakhare
Copy link

@olegsvs Yes. Were you able to reproduce the issue?

@olegsvs
Copy link

olegsvs commented Oct 5, 2020

@olegsvs Yes. Were you able to reproduce the issue?

Yes, analog crash report on xiaomi with miui based on android 10 on focus on edittext with email inputType

@jyotisakhareNira
Copy link
Author

@olegsvs will include this fix for my next release and let you know whether it worked.
I do not have the xiomi device so not able to test

@jyotisakhareNira
Copy link
Author

@olegsvs Can you please help with the steps to reproduce this issue?

@olegsvs
Copy link

olegsvs commented Oct 6, 2020

@olegsvs Can you please help with the steps to reproduce this issue?

Focus on edittext with textEmailAddress input type.

@choha
Copy link

choha commented Mar 1, 2021

@jyotisakhareNira has fixed it?

@jyotisakhareNira
Copy link
Author

@choha I have replaced it with normal TextInputLayout for Email fields

@choha
Copy link

choha commented Mar 1, 2021

we used AppCompatEditText ,when input email also crash

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