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

RESOLVED FIXED in Firefox 22

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
5 years ago
2 years ago

People

(Reporter: Scoobidiver (away), Assigned: Margaret)

Tracking

(5 keywords)

22 Branch
Firefox 23
ARM
Android
crash, regression, reproducible, topcrash, verifyme
Points:
---

Firefox Tracking Flags

(firefox21 unaffected, firefox22+ fixed, firefox23+ fixed, fennec+)

Details

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

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
There are two crashes from the same user in 22.0a1/20130304, including bp-63c6bf69-2087-4736-a312-e2d202130305.

java.lang.NullPointerException
	at org.mozilla.gecko.BrowserApp.onActivityResult(BrowserApp.java:339)
	at android.app.Activity.dispatchActivityResult(Activity.java:5293)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:3439)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:3486)
	at android.app.ActivityThread.access$1100(ActivityThread.java:150)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:5193)
	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:795)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
	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.BrowserApp.onActivityResult%28BrowserApp.java%29
(Reporter)

Updated

5 years ago
status-firefox22: --- → affected
Assignee: nobody → wjohnston
(Reporter)

Comment 1

5 years ago
The regression range might be:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3362afba690e&tochange=86c98c4d36da
status-firefox21: --- → unaffected
Keywords: regression
Version: Trunk → Firefox 22
Duplicate of this bug: 852783
From comment 0

Firefox crashes on switching back from camera app.  Reproduced on Firefox nightly on S2 running jelly bean.

Testcase:
1. Open http://html5.merge.nl/file-api.php and click on browse button
2. Choose camera and take a picture 
3. Select the picture and the browser should crash
(Reporter)

Updated

5 years ago
Keywords: reproducible
(Reporter)

Comment 4

5 years ago
It's #6 top crasher in 22.0a1.
tracking-fennec: --- → ?
tracking-firefox22: --- → ?
Keywords: topcrash
tracking-fennec: ? → 22+

Updated

5 years ago
tracking-firefox22: ? → +
(Reporter)

Updated

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

Comment 5

5 years ago
It's #46 crasher in 22.0a2 and #15 in 23.0a1.
tracking-fennec: 22+ → ?
tracking-firefox22: + → ?
Keywords: topcrash

Updated

5 years ago
tracking-firefox22: ? → +
tracking-firefox23: --- → +
tracking-fennec: ? → +
#20 crasher on 23
#60 crasher on 22
(Reporter)

Comment 7

5 years ago
There's a spike in crashes starting in 23.0a1/20130418. The regression range for the spike is:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=50ab959f4bd1&tochange=3ada6a2fd0c6
Keywords: topcrash
(Reporter)

Comment 8

5 years ago
It spiked also in 22.0a2/20130418. The Aurora regression range for the spike is:
http://hg.mozilla.org/releases/mozilla-aurora/pushloghtml?fromchange=f342569a36f2&tochange=071e2690ff7a
There are two possible candidates that belong to both ranges: bug 858323 and bug 860326.
(Reporter)

Comment 9

5 years ago
Note that after these sharp spikes, it's now #1 top crasher in 22.0a2 and #4 in 23.0a1 over the last three days.
(Assignee)

Comment 10

5 years ago
I'll look into this.
Assignee: wjohnston → margaret.leibovic
(Assignee)

Comment 11

5 years ago
Created attachment 740446 [details] [diff] [review]
patch

Apparently null checks are hard. The fact that there were crashes before my patch in bug 860326 makes me think that data can be null even if resultCode == Activity.RESULT_OK, so we should check that.

I broke up the logic a bit more here to try to make it all really clear what's going on.

Also, this makes me realize that the fact that we always call fromAwesomeBarSearch() is wrong, since we go through this code path for any activity result, not just the awesome screen. We can address that in a follow-up though.
Attachment #740446 - Flags: review?(wjohnston)
(Assignee)

Comment 12

5 years ago
It looks like this is originally a regression from bug 839602, and it appears to have been exacerbated by bug 860326 .
Blocks: 839602
(Assignee)

Comment 13

5 years ago
Created attachment 740991 [details] [diff] [review]
better patch
Attachment #740446 - Attachment is obsolete: true
Attachment #740446 - Flags: review?(wjohnston)
Attachment #740991 - Flags: review?(wjohnston)
Attachment #740991 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/9cd4b8d02649
Status: NEW → RESOLVED
Last Resolved: 5 years ago
status-firefox23: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
(Assignee)

Comment 16

5 years ago
Comment on attachment 740991 [details] [diff] [review]
better patch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 839602 (exacerbated by bug 860326)
User impact if declined: crashes
Testing completed (on m-c, etc.): landed on m-c 
Risk to taking this patch (and alternatives if risky): I thought the other patches were low-risk, and they caused this crash! The main risk here is that the crash might not be totally fixed, but I think it should work.
String or IDL/UUID changes made by this patch: n/a
Attachment #740991 - Flags: approval-mozilla-aurora?
Comment on attachment 740991 [details] [diff] [review]
better patch

looks ok to land as we still have a few weeks on aurora.Lets keep an eye on the crash-volume to see if the crashes go away else we may have to perform a backout here if needed.
Attachment #740991 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+

Updated

5 years ago
Keywords: verifyme
I can't verify this bug because the page http://html5.merge.nl/file-api.php has been changed, so I'm not able to reproduce the steps from comment 3.
You need to log in before you can comment on or make changes to this bug.