Last Comment Bug 724215 - java.lang.NullPointerException: at org.mozilla.gecko.GeckoEvent.addMotionPoint(GeckoEvent.java)
: java.lang.NullPointerException: at org.mozilla.gecko.GeckoEvent.addMotionPoin...
Status: VERIFIED FIXED
[native-crash][startupcrash]
: crash, regression, topcrash
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: 13 Branch
: ARM Android
: P1 critical (vote)
: Firefox 13
Assigned To: Wesley Johnston (:wesj)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-03 23:55 PST by Scoobidiver (away)
Modified: 2014-09-12 07:57 PDT (History)
6 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed
fixed
verified
11+


Attachments
Workaround patch (1.24 KB, patch)
2012-02-06 11:47 PST, Wesley Johnston (:wesj)
no flags Details | Diff | Splinter Review
Patch (1.25 KB, patch)
2012-02-07 11:58 PST, Wesley Johnston (:wesj)
doug.turner: review+
Details | Diff | Splinter Review
Patch (5.71 KB, patch)
2012-02-07 14:28 PST, Wesley Johnston (:wesj)
doug.turner: review+
doug.turner: approval‑mozilla‑aurora+
doug.turner: approval‑mozilla‑beta+
Details | Diff | Splinter Review

Description Scoobidiver (away) 2012-02-03 23:55:13 PST
It's a startup crash so far.
It first appeared in 13.0a1/20120202155221 on Feb 3rd with various devices.

The regression range might be (hard to determine for a startup crash and might be the result of Socorro 2.4.1):
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5b0900b3e71c&tochange=e777c939a3f9

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A%20at%20org.mozilla.gecko.GeckoEvent.addMotionPoint%28GeckoEvent.java%29
Comment 1 Doug Turner (:dougt) 2012-02-05 19:50:26 PST
wes, this is probably yours.  any idea what could be throwing?  Can you bullet proof or wrap with a try and prevent the exit()?
Comment 2 Wesley Johnston (:wesj) 2012-02-06 11:47:50 PST
Created attachment 594764 [details] [diff] [review]
Workaround patch

I'm not sure if this is to broad a try-catch. I'm also not exactly sure what the problem is here without more info. Potentially we don't have GeckoApp.mAppContext.getLayerController() or eckoApp.mAppContext.getWindowManager() yet?

Trying to reproduce...
Comment 3 Wesley Johnston (:wesj) 2012-02-06 12:15:17 PST
Comment on attachment 594764 [details] [diff] [review]
Workaround patch

Looking at this a bit more first...
Comment 4 Wesley Johnston (:wesj) 2012-02-07 11:58:17 PST
Created attachment 595120 [details] [diff] [review]
Patch

Ok. Still can't reproduce this. Dougt, is this the kind of protection you'd want, or I can wrap the calls into

GeckoApp.mAppContext.getLayerController() and 
GeckoApp.mAppContext.getWindowManager().getDefaultDisplay()

which seem more likely to be causing this (I'm not sure how we'd get to the point of calling addMotionPoint if the event is empty).
Comment 5 Doug Turner (:dougt) 2012-02-07 13:13:34 PST
Comment on attachment 595120 [details] [diff] [review]
Patch

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

I'd put the try inside of the method so that it can never throw.  r+ w/ that change.
Comment 6 Naoki Hirata :nhirata (please use needinfo instead of cc) 2012-02-07 13:43:36 PST
Talked to Laura, and figured out how to get the Java stack from Socorro:

Java stack : 
java.lang.NullPointerException
	at org.mozilla.gecko.GeckoEvent.addMotionPoint(GeckoEvent.java:198)
	at org.mozilla.gecko.GeckoEvent.<init>(GeckoEvent.java:178)
	at org.mozilla.gecko.GeckoAppShell$2.onTouch(GeckoAppShell.java:509)
	at org.mozilla.gecko.gfx.LayerController.onTouchEvent(LayerController.java:404)
	at org.mozilla.gecko.gfx.LayerView.onTouchEvent(LayerView.java:112)
	at android.view.View.dispatchTouchEvent(View.java:5541)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1684)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1684)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1684)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1684)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1957)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1684)
	at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1912)
	at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1371)
	at android.app.Activity.dispatchTouchEvent(Activity.java:2364)
	at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1860)
	at android.view.View.dispatchPointerEvent(View.java:5721)
	at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:2890)
	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2466)
	at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:845)
	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2475)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at org.mozilla.gecko.GeckoApp$32.run(GeckoApp.java:1777)
	at android.os.Handler.handleCallback(Handler.java:605)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4424)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
	at dalvik.system.NativeStart.main(Native Method)
Comment 7 Wesley Johnston (:wesj) 2012-02-07 14:28:54 PST
Created attachment 595184 [details] [diff] [review]
Patch

Sorry for the churn dougt. I'm a bit nervous my old try catch could lead to having mPoints = [null, null, null...] which i don't think would go over well in C++. This initializes them to Point(0,0) in the catch.
Comment 8 Wesley Johnston (:wesj) 2012-02-07 17:08:06 PST
i'll push to aurora in the morning assuming there's no issues on inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b1fad0b7354
Comment 9 Ed Morley [:emorley] 2012-02-08 09:01:32 PST
https://hg.mozilla.org/mozilla-central/rev/0b1fad0b7354
Comment 10 Scoobidiver (away) 2012-02-10 02:01:30 PST
There are no crashes in 13.0a1/20120209.
Comment 11 Wesley Johnston (:wesj) 2012-02-10 09:15:03 PST
I put this in the patch queue for Aurora and beta (although its currently bitrotted in both). dougt, are we using the patch queues anymore, or should i just unbitrot and push?
Comment 12 Doug Turner (:dougt) 2012-02-13 14:29:06 PST
unrot and push ;-D
Comment 13 Scoobidiver (away) 2012-02-16 23:56:37 PST
It's #1 top crasher in 12.0a2. Is it possible to push it in Aurora and Beta?
Comment 14 Wesley Johnston (:wesj) 2012-02-17 07:43:17 PST
Whoops. Yep. Will push when i get in in an hour. Thanks for the reminder.
Comment 15 Wesley Johnston (:wesj) 2012-02-17 09:27:30 PST
http://hg.mozilla.org/releases/mozilla-aurora/rev/f1319928a26a
Comment 16 Wesley Johnston (:wesj) 2012-02-17 09:31:12 PST
http://hg.mozilla.org/releases/mozilla-beta/rev/7571a84c7ec8
Comment 17 Cristian Nicolae (:xti) 2012-03-01 09:24:24 PST
Closing bug as verified fixed regarding comment #10
Comment 18 alex_mayorga 2012-03-29 10:30:41 PDT
Just crashed like bp-fc8ee5ac-bf54-4568-b55e-852d42120329 on yesterday's Nightly of Fennec
Is this a regression?
Comment 19 Scoobidiver (away) 2012-03-29 11:16:12 PDT
(In reply to alex_mayorga from comment #18)
> Is this a regression?
You were using 13.0a1/20120206031148 (1.5 month old) while the latest version is 14.0a1/20120329031156. Please upgrade if you want to help debug.
Comment 20 Mohit 2014-09-12 07:57:54 PDT Comment hidden (spam)

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