Closed Bug 706207 Opened 14 years ago Closed 14 years ago

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

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: aaronmt, Assigned: kats)

Details

(Whiteboard: strwanted)

Attachments

(1 file)

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
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.
Attached patch Patch — — Splinter Review
Attachment #578007 - Flags: review?(doug.turner)
Attachment #578007 - Flags: review?(doug.turner) → review+
Assignee: nobody → kgupta
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Samsung Nexus S (Android 2.3.6) 20111201040252 http://hg.mozilla.org/projects/birch/rev/d71c91775f9b
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: