Closed Bug 842418 Opened 8 years ago Closed 8 years ago

org.json.JSONException: Value null at minZoom of type org.json.JSONObject$1 cannot be converted to double @ ZoomConstraints.java:27

Categories

(Firefox for Android :: Toolbar, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 22
Tracking Status
firefox21 --- fixed

People

(Reporter: aaronmt, Unassigned)

References

Details

Attachments

(1 file)

02-18 16:24:17.382 E/GeckoApp( 8616): org.json.JSONException: Value null at minZoom of type org.json.JSONObject$1 cannot be converted to double
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.json.JSON.typeMismatch(JSON.java:96)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.json.JSONObject.getDouble(JSONObject.java:412)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.ZoomConstraints.<init>(ZoomConstraints.java:27)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.GeckoApp.handleMessage(GeckoApp.java:860)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.BrowserApp.handleMessage(BrowserApp.java:491)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.util.EventDispatcher.dispatchEvent(EventDispatcher.java:75)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.GeckoAppShell.handleGeckoMessage(GeckoAppShell.java:1811)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:305)
02-18 16:24:17.382 E/GeckoApp( 8616): 	at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:113)

https://tbpl.mozilla.org/php/getParsedLog.php?id=19858238&tree=Mozilla-Inbound
My guess is this is a regression from bug 840722 and might have something to do with the prototype setting the values to null:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#5612

Should we pick better defaults? Maybe use Nan, which we use in other places and might be better for JSON:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#3777
Blocks: 840722
The property of ViewportMetadata instance always gets any values which does not inherit from ViewportMetadata.prototype.
http://hg.mozilla.org/mozilla-central/file/e8f8a3f6f1f6/mobile/android/chrome/content/browser.js#l5599

However, the constructor don't check parameter's member values. If aMetadata.minZoom = "bar" is passed, the constructor will set "bar" to his instance's |minZoom| as string.

I agree that we should specify a value which is more suitable type for ViewportMetadata.prototype. But I think also we need a stack trace information in details for resolving the root of this bug.
From a code inspection I don't see any code path that could result in this. If nobody else can see one either I think we should back out bug 840722 until we can figure it out.
Backout bug 840722, or specify a value type.
Duplicate of this bug: 842706
(In reply to Tetsuharu OHZEKI [:saneyuki_s] from comment #4)
> Created attachment 715592 [details] [diff] [review]
> specify value types
> 
> Backout bug 840722, or specify a value type.

I'm leery of making a change like this without properly understanding the codepath that is causing the problem. I'll back out bug 840722.
Fixed by backout of bug 840722: https://hg.mozilla.org/integration/mozilla-inbound/rev/7210fcb55aae
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #6)
> 
> I'm leery of making a change like this without properly understanding the
> codepath that is causing the problem. I'll back out bug 840722.

OK. I understand.
The full log for the "rc" test on that try build still has the same exceptions, so the patch doesn't fix the underlying problem.
I fully agree the backout of bug 840722.
Push to Aurora:
https://hg.mozilla.org/releases/mozilla-aurora/rev/60d687faf510
Target Milestone: --- → Firefox 22
You need to log in before you can comment on or make changes to this bug.