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

Composer crashes when an invalid mail address is about to be shown in recipient selector #1607

Closed
morckx opened this Issue Sep 9, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@morckx
Contributor

morckx commented Sep 9, 2016

Steps to reproduce

  1. create a contact with a name and an invalid mail address, e. g. "(none)"
  2. click '+' to compose new message
  3. type first letters of the contact name until it should be shown

Logcat

09-09 22:12:26.740 10531 10531 E AndroidRuntime: FATAL EXCEPTION: main
09-09 22:12:26.740 10531 10531 E AndroidRuntime: Process: com.fsck.k9, PID: 10531
09-09 22:12:26.740 10531 10531 E AndroidRuntime: Theme: themes:{default=overlay:com.brit.swiftdark, fontPkg:com.brit.swiftdark, com.android.systemui=overlay:com.brit.s
wiftdark, com.android.systemui.navbar=overlay:com.brit.swiftdark}
09-09 22:12:26.740 10531 10531 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null obj
ect reference
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.text.SpannableString.<init>(SpannableString.java:30)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.text.Spannable$Factory.newSpannable(Spannable.java:67)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at com.fsck.k9.activity.compose.RecipientAdapter.highlightText(RecipientAdapter.java:182)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at com.fsck.k9.activity.compose.RecipientAdapter.bindView(RecipientAdapter.java:92)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at com.fsck.k9.activity.compose.RecipientAdapter.getView(RecipientAdapter.java:72)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.AbsListView.obtainView(AbsListView.java:2346)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.ListPopupWindow$DropDownListView.obtainView(ListPopupWindow.java:1734)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.ListView.measureHeightOfChildren(ListView.java:1281)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.ListPopupWindow.buildDropDown(ListPopupWindow.java:1209)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.ListPopupWindow.show(ListPopupWindow.java:584)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.AutoCompleteTextView.showDropDown(AutoCompleteTextView.java:1106)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at com.fsck.k9.view.RecipientSelectView.showDropDown(RecipientSelectView.java:226)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.AutoCompleteTextView.updateDropDownForFilter(AutoCompleteTextView.java:975)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.AutoCompleteTextView.-wrap2(AutoCompleteTextView.java)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.widget.AutoCompleteTextView$PopupDataSetObserver$1.run(AutoCompleteTextView.java:1300)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:148)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:5463)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-09 22:12:26.740 10531 10531 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-09 22:12:26.741  1716  4127 W ActivityManager:   Force finishing activity com.fsck.k9/.activity.MessageCompose

Environment

K-9 Mail version: 5.111 (master)

Android version:
6.0.1

morckx added a commit to morckx/k-9 that referenced this issue Sep 9, 2016

morckx added a commit to morckx/k-9 that referenced this issue Sep 9, 2016

@cketti cketti added the bug label Sep 10, 2016

@cketti cketti added this to the v5.200 milestone Sep 10, 2016

@cketti cketti closed this in #1608 Sep 13, 2016

cketti added a commit that referenced this issue Sep 13, 2016

Merge pull request #1608
Don't try to show invalid mail addresses in recipient selector

Fixes #1607
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment