Last Comment Bug 731034 - crash [@ java.lang.IndexOutOfBoundsException: charAt: 1 >= length 1: at android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java)]
: crash [@ java.lang.IndexOutOfBoundsException: charAt: 1 >= length 1: at andro...
Status: VERIFIED FIXED
[native-crash]
: crash
Product: Firefox for Android
Classification: Client Software
Component: Keyboards and IME (show other bugs)
: 14 Branch
: ARM Android
: -- critical (vote)
: Firefox 14
Assigned To: Chris Peterson [:cpeterson]
:
: Jim Chen [:jchen] [:darchons]
Mentors:
Depends on: 726393
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-27 15:31 PST by Naoki Hirata :nhirata (please use needinfo instead of cc)
Modified: 2012-11-10 11:13 PST (History)
8 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
verified
verified
+


Attachments
bug-731034-clamp-keydown-selection.patch (2.00 KB, patch)
2012-03-12 17:11 PDT, Chris Peterson [:cpeterson]
blassey.bugs: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Splinter Review

Description Naoki Hirata :nhirata (please use needinfo instead of cc) 2012-02-27 15:31:09 PST
This bug was filed from the Socorro interface and is 
report bp-b38c6bd8-34fe-4c85-9362-db3c42120221 .
============================================================= 
java.lang.IndexOutOfBoundsException: charAt: 1 >= length 1
	at android.text.SpannableStringBuilder.charAt(SpannableStringBuilder.java:112)
	at org.mozilla.gecko.GeckoInputConnection.onTextChanged(GeckoInputConnection.java:459)
	at android.text.SpannableStringBuilder.sendTextChange(SpannableStringBuilder.java:889)
	at android.text.SpannableStringBuilder.change(SpannableStringBuilder.java:352)
	at android.text.SpannableStringBuilder.change(SpannableStringBuilder.java:269)
	at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:432)
	at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:409)
	at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:28)
	at android.text.method.QwertyKeyListener.onKeyDown(QwertyKeyListener.java:222)
	at android.text.method.TextKeyListener.onKeyDown(TextKeyListener.java:132)
	at org.mozilla.gecko.GeckoInputConnection.processKeyDown(GeckoInputConnection.java:684)
	at org.mozilla.gecko.GeckoInputConnection.onKeyPreIme(GeckoInputConnection.java:638)
	at org.mozilla.gecko.gfx.LayerView.onKeyPreIme(LayerView.java:150)
	at android.view.View.dispatchKeyEventPreIme(View.java:3876)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:794)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:794)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:794)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:794)
	at android.view.ViewRoot.deliverKeyEvent(ViewRoot.java:2637)
	at android.view.ViewRoot.handleMessage(ViewRoot.java:1953)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:143)
	at org.mozilla.gecko.GeckoApp$34.run(GeckoApp.java:1807)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:143)
	at android.app.ActivityThread.main(ActivityThread.java:4196)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
	at dalvik.system.NativeStart.main(Native Method)

Only one crash so far : 
Build : 20120221031301
'HTC Vision'
Comment 1 Tony Chung [:tchung] 2012-03-12 09:06:14 PDT
nom'ing for triage.
Comment 2 Chris Peterson [:cpeterson] 2012-03-12 17:11:06 PDT
Created attachment 605235 [details] [diff] [review]
bug-731034-clamp-keydown-selection.patch

Clamp current selection before processing key down events to avoid IndexOutOfBoundsException.
Comment 3 Chris Peterson [:cpeterson] 2012-03-13 10:17:56 PDT
Waiting for bug 726393 to land before checkin-needed.
Comment 4 Chris Peterson [:cpeterson] 2012-03-15 12:26:49 PDT
Bug 726393 landed, so this bug is now ready for checkin-needed.
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-03-15 17:13:48 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/6106fe49a28d
Comment 6 Marco Bonardo [::mak] 2012-03-16 06:31:02 PDT
https://hg.mozilla.org/mozilla-central/rev/6106fe49a28d
Comment 7 Chris Peterson [:cpeterson] 2012-03-19 12:18:26 PDT
Comment on attachment 605235 [details] [diff] [review]
bug-731034-clamp-keydown-selection.patch

[Approval Request Comment]
Regression caused by (bug #): N/A
User impact if declined: Keyboard crash
Testing completed (on m-c, etc.): m-c
Risk to taking this patch (and alternatives if risky): Android Java only.
String changes made by this patch: N/A
Comment 8 Alex Keybl [:akeybl] 2012-03-20 13:04:40 PDT
Comment on attachment 605235 [details] [diff] [review]
bug-731034-clamp-keydown-selection.patch

[Triage Comment]
Mobile only - approved for Aurora 13.
Comment 9 Mark Finkle (:mfinkle) (use needinfo?) 2012-03-24 09:05:51 PDT
https://hg.mozilla.org/releases/mozilla-aurora/rev/1aed4f63bb78
Comment 10 Paul Feher 2012-06-06 00:48:02 PDT
I'm setting this as verified/fixed since it wasn't reported for the last 4 weeks.

Note You need to log in before you can comment on or make changes to this bug.