ArrayIndexOutOfBoundsException in advanceBounce()

VERIFIED FIXED in Firefox 11

Status

()

Firefox for Android
General
P1
normal
VERIFIED FIXED
6 years ago
11 months ago

People

(Reporter: kats, Assigned: kats)

Tracking

unspecified
Firefox 12
All
Android
Points:
---

Firefox Tracking Flags

(firefox11 fixed, firefox12 fixed, fennec11+)

Details

Attachments

(1 attachment, 1 obsolete attachment)

From a build that already has cset 08599b3e8590

E/GeckoApp(10888): java.lang.ArrayIndexOutOfBoundsException: length=16; index=-1
E/GeckoApp(10888):      at org.mozilla.gecko.ui.PanZoomController$BounceRunnable.advanceBounce(PanZoomController.java:629)
E/GeckoApp(10888):      at org.mozilla.gecko.ui.PanZoomController$BounceRunnable.run(PanZoomController.java:616)
E/GeckoApp(10888):      at android.os.Handler.handleCallback(Handler.java:605)
E/GeckoApp(10888):      at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoApp(10888):      at android.os.Looper.loop(Looper.java:137)
E/GeckoApp(10888):      at org.mozilla.gecko.GeckoApp$33.run(GeckoApp.java:1526)
E/GeckoApp(10888):      at android.os.Handler.handleCallback(Handler.java:605)
E/GeckoApp(10888):      at android.os.Handler.dispatchMessage(Handler.java:92)
E/GeckoApp(10888):      at android.os.Looper.loop(Looper.java:137)
E/GeckoApp(10888):      at android.app.ActivityThread.main(ActivityThread.java:4424)
E/GeckoApp(10888):      at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoApp(10888):      at java.lang.reflect.Method.invoke(Method.java:511)
E/GeckoApp(10888):      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/GeckoApp(10888):      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/GeckoApp(10888):      at dalvik.system.NativeStart.main(Native Method)
Created attachment 585780 [details] [diff] [review]
Guard against yet another possible race

This race is a product of the animation timer turning around and posting things to the UI thread. This means that even if the animation timer is cancelled, there may be a runnable already scheduled on the UI thread.
Attachment #585780 - Flags: review?(pwalton)
Comment on attachment 585780 [details] [diff] [review]
Guard against yet another possible race

Actually the FlingRunnable suffers from this too. I'll have a more generic patch up shortly.
Attachment #585780 - Attachment is obsolete: true
Attachment #585780 - Flags: review?(pwalton)
Created attachment 585820 [details] [diff] [review]
Stop queued runnables from running after animation timer is cancelled
Attachment #585820 - Flags: review?(pwalton)
Try run was green: https://tbpl.mozilla.org/?tree=Try&rev=a39024138e30

I'm also seeing this exception come up pretty often while hammering on robotium stuff, so it would be good to get this in before robotium is hooked up.

Updated

6 years ago
Priority: -- → P1
tracking-fennec: --- → 11+
Comment on attachment 585820 [details] [diff] [review]
Stop queued runnables from running after animation timer is cancelled

Review of attachment 585820 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good.
Attachment #585820 - Flags: review?(pwalton) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/91a8e4c55adb
Merged to mozilla-central early per QA request. This is crashing several devices on startup.

Note to sheriff: This will possibly cause a conflict; the inbound patch is identical to this one and can be dropped.

http://hg.mozilla.org/mozilla-central/rev/c7e27452a143
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
status-firefox11: --- → affected
status-firefox12: --- → fixed
Depends on: 713586
Nexus S, 20120106, Flash 11
Status: RESOLVED → VERIFIED
Comment on attachment 585820 [details] [diff] [review]
Stop queued runnables from running after animation timer is cancelled

[Approval Request Comment]
Regression caused by (bug #): none
User impact if declined: Fennec crashes with ArrayIndexOutOfBoundsException
Testing completed (on m-c, etc.): m-c
Risk to taking this patch (and alternatives if risky): Other regressions with pan/zoom behaviour. I wouldn't consider it high risk since the change is mostly rearranging code and adding guards.
Attachment #585820 - Flags: approval-mozilla-aurora?
Comment on attachment 585820 [details] [diff] [review]
Stop queued runnables from running after animation timer is cancelled

[Triage Comment]
Mobile only - approved for Aurora
Attachment #585820 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/77855ed1e430
status-firefox11: affected → fixed

Updated

6 years ago
Target Milestone: --- → Firefox 12
You need to log in before you can comment on or make changes to this bug.