Closed Bug 1484960 Opened 7 years ago Closed 7 years ago

Crash in java.lang.IllegalStateException: at org.mozilla.gecko.GeckoAppShell.setDisplayDensityOverride(GeckoAppShell.java)

Categories

(GeckoView :: General, defect)

Unspecified
Android
defect
Not set
critical

Tracking

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 unaffected, firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox61 --- unaffected
firefox62 --- unaffected
firefox63 --- fixed

People

(Reporter: calixte, Assigned: rbarker)

References

(Blocks 1 open bug)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(1 file)

This bug was filed from the Socorro interface and is report bp-12e7fceb-d72e-4cf8-9c65-5ea290180821. ============================================================= java.lang.IllegalStateException at org.mozilla.gecko.GeckoAppShell.setDisplayDensityOverride(GeckoAppShell.java:1011) at org.mozilla.geckoview.GeckoRuntime.init(GeckoRuntime.java:111) at org.mozilla.geckoview.GeckoRuntime.getDefault(GeckoRuntime.java:54) at org.mozilla.geckoview.GeckoView.onAttachedToWindow(GeckoView.java:339) at android.view.View.dispatchAttachedToWindow(View.java:17445) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3326) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3333) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3333) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3333) at android.view.ViewGroup.addViewInner(ViewGroup.java:4977) ... ============================================================= There is 1 crash in nightly 63 with buildid 20180819100140. In analyzing the backtrace, the regression may have been introduced by patch [1] to fix bug 1483420. [1] https://hg.mozilla.org/mozilla-central/rev?node=b439cdd35e49
Flags: needinfo?(rbarker)
Jim, this looks like a race condition to me in Fennec. The only way this exception can be thrown is if GeckoAppShell.getDensity() is called before GeckoRuntime.init(); I think it can be fixed by adding a null check to GeckoAppShell.setDisplayDensityOverride() which I'll add, but the race condition in Fennec probably isn't great.
Flags: needinfo?(rbarker) → needinfo?(nchen)
Assignee: nobody → rbarker
I think it's happening because we are calling `GeckoRuntime.init()` twice -- once from `GeckoApplication.createRuntime()` and once from `GeckoRuntime.getDefault()`. I think the right solution is to unify the two sources of `GeckoRuntime`, so that `GeckoRuntime.getDefault`, in Fennec, will return the same runtime created by `GeckoApplication`.
Flags: needinfo?(nchen)
(In reply to Randall Barker [:rbarker] from comment #1) > Jim, this looks like a race condition to me in Fennec. The only way this > exception can be thrown is if GeckoAppShell.getDensity() is called before > GeckoRuntime.init(); I think it can be fixed by adding a null check to > GeckoAppShell.setDisplayDensityOverride() which I'll add, but the race > condition in Fennec probably isn't great. Adding a null-check in `setDisplayDensityOverride` will defeat the purpose of this exception, which is to catch double-calling situations like this, right?
Comment on attachment 9002868 [details] Bug 1484960 - Remove IllegalStateException throw on multiple calls to overrides in GeckoAppShell r=jchen Jim Chen [:jchen] [:darchons] has approved the revision.
Attachment #9002868 - Flags: review+
Pushed by rbarker@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8d09209d2ee1 Remove IllegalStateException throw on multiple calls to overrides in GeckoAppShell r=jchen
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Product: Firefox for Android → GeckoView
Keywords: crash, regression
Target Milestone: Firefox 63 → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: