Closed Bug 1300139 Opened 3 years ago Closed 3 years ago

Intermittent java-exception | java.lang.NullPointerException at java.lang.String.<init>(String.java:447)

Categories

(Firefox for Android :: Testing, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 51
Tracking Status
firefox51 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: gbrown)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): >>> REPORTING UNCAUGHT EXCEPTION FROM THREAD 110 ("GeckoDLCCatalog-Load")
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): java.lang.NullPointerException
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at java.lang.String.<init>(String.java:447)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.nextString(JSONTokener.java:210)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.nextValue(JSONTokener.java:107)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.readObject(JSONTokener.java:385)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.nextValue(JSONTokener.java:100)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.readArray(JSONTokener.java:430)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.nextValue(JSONTokener.java:103)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.readObject(JSONTokener.java:385)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONTokener.nextValue(JSONTokener.java:100)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONObject.<init>(JSONObject.java:154)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.json.JSONObject.<init>(JSONObject.java:171)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.mozilla.gecko.dlc.catalog.DownloadContentCatalog.loadFromDisk(DownloadContentCatalog.java:221)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): 	at org.mozilla.gecko.dlc.catalog.DownloadContentCatalog$2.run(DownloadContentCatalog.java:187)
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505): Main thread (1) stack:
09:35:09     INFO -  09-02 02:34:52.859 E/GeckoCrashHandler( 2505):     android.os.MessageQueue.nativePollOnce(Native Method)
09:35:09     INFO -  09-02 02:34:52.869 I/Robocop ( 2505): {"message":"true should equal true","time":1472808892857,"source":"robocop","status":"PASS","test":"testFormHistory","thread":null,"subtest":"Password was found","action":"test_status","pid":null}
09:35:09     INFO -  09-02 02:34:52.889 I/Robocop ( 2505): {"message":"1 should equal 1","time":1472808892886,"source":"robocop","status":"PASS","test":"testFormHistory","thread":null,"subtest":"Correct number updated","action":"test_status","pid":null}
09:35:09     INFO -  09-02 02:34:52.889 E/GeckoCrashHandler( 2505):     android.os.MessageQueue.next(MessageQueue.java:132)
09:35:09     INFO -  09-02 02:34:52.889 E/GeckoCrashHandler( 2505):     android.os.Looper.loop(Looper.java:124)
09:35:09     INFO -  09-02 02:34:52.889 E/GeckoCrashHandler( 2505):     android.app.ActivityThread.main(ActivityThread.java:5103)
09:35:09     INFO -  09-02 02:34:52.889 E/GeckoCrashHandler( 2505):     java.lang.reflect.Method.invokeNative(Native Method)
09:35:09     INFO -  09-02 02:34:52.899 E/GeckoCrashHandler( 2505):     java.lang.reflect.Method.invoke(Method.java:525)
09:35:09     INFO -  09-02 02:34:52.929 I/Robocop ( 2505): {"message":"1 should equal 1","time":1472808892916,"source":"robocop","status":"PASS","test":"testFormHistory","thread":null,"subtest":"List is correct length","action":"test_status","pid":null}
09:35:09     INFO -  09-02 02:34:52.929 E/GeckoCrashHandler( 2505):     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09:35:09     INFO -  09-02 02:34:52.929 E/GeckoCrashHandler( 2505):     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09:35:09     INFO -  09-02 02:34:52.929 E/GeckoCrashHandler( 2505):     dalvik.system.NativeStart.main(Native Method)
Attached patch catch NPESplinter Review
I'm not sure of what happened here, but it seems reasonable to handle an NPE the same as a JSON exception.


BTW, do you want/expect this code to be running during tests?
Assignee: nobody → gbrown
Attachment #8787688 - Flags: review?(s.kaspari)
(In reply to Geoff Brown [:gbrown] (PTO Sept 7-12) from comment #2)
> BTW, do you want/expect this code to be running during tests?

Yeah, we should disable this code path during tests.
Comment on attachment 8787688 [details] [diff] [review]
catch NPE

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

Mhhh. Not really happy to catch NullPointerException (instead of avoiding calling methods on 'null') here, but this seems to be somewhere in Android framework code and cannot be avoided. I wonder how this happened though.. well, thanks for writing the patch! :)
Attachment #8787688 - Flags: review?(s.kaspari) → review+
Comment on attachment 8787688 [details] [diff] [review]
catch NPE

Oh, can you add a comment linking this bug, so that someone reading this code knows why we are catching NullPointerException here?
OK, will add comment on landing.
Pushed by gbrown@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c27d9a2bc261
Handle JSON NPE in DownloadContentCatalog; r=sebastian
Priority: -- → P1
https://hg.mozilla.org/mozilla-central/rev/c27d9a2bc261
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51
You need to log in before you can comment on or make changes to this bug.