java.lang.NullPointerException: at org.mozilla.gecko.CameraImageResultHandler.onActivityResult(CameraImageResultHandler.java)

RESOLVED FIXED in Firefox 24

Status

()

--
critical
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: scoobidiver, Assigned: wesj)

Tracking

({crash, regression, topcrash})

24 Branch
Firefox 26
ARM
Android
crash, regression, topcrash
Points:
---

Firefox Tracking Flags

(firefox23 unaffected, firefox24+ fixed, firefox25 fixed, firefox26 fixed, fennec24+)

Details

(Whiteboard: [native-crash], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
There's one crash in 24.0a1/20130531: bp-59a34f28-1299-483b-b288-b573e2130531.

It might be related to bug 878415.

java.lang.NullPointerException
	at org.mozilla.gecko.CameraImageResultHandler.onActivityResult(CameraImageResultHandler.java:38)
	at org.mozilla.gecko.ActivityHandlerHelper.handleActivityResult(ActivityHandlerHelper.java:340)
	at org.mozilla.gecko.GeckoApp.onActivityResult(GeckoApp.java:2128)
	at org.mozilla.gecko.BrowserApp.onActivityResult(BrowserApp.java:843)
	at android.app.Activity.dispatchActivityResult(Activity.java:5293)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:3315)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3362)
	at android.app.ActivityThread.access$1100(ActivityThread.java:141)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1282)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:5041)
	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:793)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.gecko.CameraImageResultHandler.onActivityResult%28CameraImageResultHandler.java%29
(Reporter)

Comment 1

5 years ago
Hit by two users so a regression. The regression range is:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f66d956d188e&tochange=3c6f2394995d
status-firefox23: --- → unaffected
Keywords: regression
Version: Trunk → Firefox 24
(Reporter)

Updated

5 years ago
status-firefox25: --- → affected
(Reporter)

Comment 2

5 years ago
It's #4 crasher in 24.0a2 and #26 in 25.0a1.
tracking-fennec: --- → ?
tracking-firefox24: --- → ?
Keywords: topcrash
Assignee: nobody → wjohnston
tracking-fennec: ? → 24+

Updated

5 years ago
tracking-firefox24: ? → +
(Assignee)

Comment 3

5 years ago
Created attachment 779252 [details] [diff] [review]
result

I've had you review this before. We expect this will be null sometimes. Just forgot the check.

Callers can instantiate us with either a queue (which they then poll until we return a result), or with this callback interface.
Attachment #779252 - Flags: review?(liuche)
Comment on attachment 779252 [details] [diff] [review]
result

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

::: mobile/android/base/CameraImageResultHandler.java
@@ +43,5 @@
>  
>          File file = new File(Environment.getExternalStorageDirectory(), sImageName);
>          sImageName = "";
>  
> +        if (mFilePickerResult != null) {

What's the Fennec style for single-line ifs? I've seen it mostly no brackets in a lot of places (although I personally do prefer the brackets).
Attachment #779252 - Flags: review?(liuche) → review+
is this ready for checkin?
(Reporter)

Comment 6

5 years ago
Still #4 top crasher in 24.0a2 soon 24.0b1.
Patch in limbo. Is this the right fix?
Flags: needinfo?(wjohnston)
(Assignee)

Comment 8

5 years ago
Just needs to land (everywhere now...):
https://hg.mozilla.org/integration/fx-team/rev/74d364de5fbb

I'll ping for Aurora and Beta (24b) approval.
Flags: needinfo?(wjohnston)
(Assignee)

Comment 9

5 years ago
Comment on attachment 779252 [details] [diff] [review]
result

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 874689
User impact if declined: Crashes
Testing completed (on m-c, etc.): Landed in fx-team right now
Risk to taking this patch (and alternatives if risky): Very low risk. Just a bunch of null checks before using an object. Backout of the regressing patch is likely to cause more problems than this.
String or IDL/UUID changes made by this patch: None
Attachment #779252 - Flags: approval-mozilla-beta?
Attachment #779252 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/74d364de5fbb
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Comment on attachment 779252 [details] [diff] [review]
result

low risk patch which helps fix a top-crasher.Approving for aurora and beta.
Attachment #779252 - Flags: approval-mozilla-beta?
Attachment #779252 - Flags: approval-mozilla-beta+
Attachment #779252 - Flags: approval-mozilla-aurora?
Attachment #779252 - Flags: approval-mozilla-aurora+
(Assignee)

Comment 12

5 years ago
https://hg.mozilla.org/releases/mozilla-beta/rev/cb0f629f90fb - beta
https://hg.mozilla.org/releases/mozilla-aurora/rev/1f0fb0b3411f - aurora
status-firefox24: affected → fixed
status-firefox25: affected → fixed
status-firefox26: --- → fixed
You need to log in before you can comment on or make changes to this bug.