java.lang.RuntimeException: org.json.JSONException: Value null at pageWidth of type org.json.JSONObject$1 cannot be converted to double

VERIFIED FIXED

Status

()

Firefox for Android
General
VERIFIED FIXED
6 years ago
6 years ago

People

(Reporter: aaronmt, Assigned: kats)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: strwanted)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
W/System.err( 3857): java.lang.RuntimeException: org.json.JSONException: Value null at pageWidth of type org.json.JSONObject$1 cannot be converted to double
W/System.err( 3857): 	at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.updateViewport(GeckoSoftwareLayerClient.java:157)
W/System.err( 3857): 	at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.endDrawing(GeckoSoftwareLayerClient.java:167)
W/System.err( 3857): 	at org.mozilla.gecko.GeckoAppShell.nativeRun(Native Method)
W/System.err( 3857): 	at org.mozilla.gecko.GeckoAppShell.nativeRun(Native Method)
W/System.err( 3857): 	at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:448)
W/System.err( 3857): 	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:115)

--
Samsung Nexus S (Android 4.0.1)
20111129104428
http://hg.mozilla.org/projects/birch/rev/7df6863adc7e
(Reporter)

Comment 1

6 years ago
Missed the bottom bits

W/System.err( 5049): Caused by: org.json.JSONException: Value null at pageWidth of type org.json.JSONObject$1 cannot be converted to double
W/System.err( 5049): 	at org.json.JSON.typeMismatch(JSON.java:100)
W/System.err( 5049): 	at org.json.JSONObject.getDouble(JSONObject.java:412)
W/System.err( 5049): 	at org.mozilla.gecko.gfx.ViewportMetrics.<init>(ViewportMetrics.java:83)
W/System.err( 5049): 	at org.mozilla.gecko.gfx.GeckoSoftwareLayerClient.updateViewport(GeckoSoftwareLayerClient.java:132)
W/System.err( 5049): 	... 5 more
I'm seeing this too. Happens if I load yahoo.com as the first page after starting the browser. It happens because the viewport getter in browser.js has doc != null but doc.body and doc.documentElement not defined. pageWidth ends up as a NaN and JSON.stringify stringifies it into a null.
Created attachment 578007 [details] [diff] [review]
Patch
Attachment #578007 - Flags: review?(doug.turner)

Updated

6 years ago
Attachment #578007 - Flags: review?(doug.turner) → review+
https://hg.mozilla.org/projects/birch/rev/f605f17ba73d
Assignee: nobody → kgupta
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(Reporter)

Comment 6

6 years ago
Samsung Nexus S (Android 2.3.6)
20111201040252
http://hg.mozilla.org/projects/birch/rev/d71c91775f9b
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.