Closed Bug 1401737 Opened 2 years ago Closed 2 years ago

Crash in java.lang.IllegalStateException: Already registered Gecko:ScheduleRun at org.mozilla.gecko.EventDispatcher.registerListener(EventDispatcher.java)

Categories

(Firefox for Android :: General, defect, critical)

All
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 58
Tracking Status
fennec + ---
firefox56 --- unaffected
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: jchen, Assigned: jchen)

References

Details

(Keywords: crash)

Crash Data

Attachments

(6 files)

This bug was filed from the Socorro interface and is 
report bp-4c6ccee1-add1-4c47-a355-159020170920.
=============================================================

First crash was with the 9-14 Nightly. Seems like GeckoApplication.onCreate is getting called multiple times.
Add a diagnostic crash for the unexpected case where
GeckoService.register() is called a second time. We know the stack for
the second call, but we want to know the stack for the first call, so we
introduce this intentional crash. r=me for trivial diagnostic patch
which will be backed out ASAP.
Attachment #8911032 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/40023b79401d
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Add a way to append app notes to the crash report from Java, so we can
associate additional crash data with the crash.
Attachment #8915229 - Flags: review?(snorp)
Consolidate GeckoAppShell initialization to GeckoApplication.onCreate
instead of spreading it out over different Activities. r=me for trivial
patch.
Attachment #8915230 - Flags: review+
Back out the part 1 diagnostic crash and introduce another diagnostic
crash that will hopefully include more details. r=me for trivial patch.
Attachment #8915231 - Flags: review+
Attachment #8915229 - Flags: review?(snorp) → review+
Pushed by nchen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/70203c5f6d17
2. Add GeckoAppShell.appendAppNotesToCrashReport; r=snorp
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9224d3e7de6
3. Consolidate GeckoAppShell initialization; r=me
https://hg.mozilla.org/integration/mozilla-inbound/rev/9c9bf73f5a4e
4. Moar diagnostic crash; r=me
There are 28 crashes with signature "java.lang.IllegalStateException: Bug 1401737 diagnostic crash at org.mozilla.gecko.GeckoService.register(GeckoService.java)" in nightly 58 starting with buildid 20170928100122.
Crash Signature: [@ java.lang.IllegalStateException: Already registered Gecko:ScheduleRun at org.mozilla.gecko.EventDispatcher.registerListener(EventDispatcher.java)] → [@ java.lang.IllegalStateException: Already registered Gecko:ScheduleRun at org.mozilla.gecko.EventDispatcher.registerListener(EventDispatcher.java)] [@ java.lang.IllegalStateException: Bug 1401737 diagnostic crash at org.mozilla.gecko.GeckoService.regis…
There are 5 crashes in nightly with signature "java.lang.IllegalStateException: Bug 1401737 diagnostic crash 2 at org.mozilla.gecko.GeckoApplication.onCreate(GeckoApplication.java)"
:jchen, could you investigate please ?
Crash Signature: org.mozilla.gecko.GeckoService.register(GeckoService.java)] → org.mozilla.gecko.GeckoService.register(GeckoService.java)] [@ java.lang.IllegalStateException: Bug 1401737 diagnostic crash 2 at org.mozilla.gecko.GeckoApplication.onCreate(GeckoApplication.java)]
Flags: needinfo?(nchen)
Handle rare cases where GeckoApplication is recreated when Fennec is
alive. In such cases, we need to unregister certain event listeners from
the old GeckoApplication so we can register again under the new one.
Also make GeckoActivityMonitor and TelemetryBackgroundReceiver better
handle GeckoApplication instance changes.
Attachment #8917038 - Flags: review?(esawin)
Comment on attachment 8917038 [details] [diff] [review]
6. Handle GeckoApplication recreation (v1)

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

::: mobile/android/base/java/org/mozilla/gecko/telemetry/TelemetryBackgroundReceiver.java
@@ +74,5 @@
>      private static final String DEFAULT_PROFILE = "default";
>  
>      private static final TelemetryBackgroundReceiver instance = new TelemetryBackgroundReceiver();
>  
> +    private boolean initialized;

mInitialized, although non-GeckoView Java code seems to suffer from inconsistent code styles.
Attachment #8917038 - Flags: review?(esawin) → review+
Yeah, that file seems to use the no-prefix style (see `instance` above).
Flags: needinfo?(nchen)
[Tracking Requested - why for this release]:
tracking-fennec: --- → ?
Keywords: leave-open
Is this something we should be considering for 57 backport or can it ride the 58 train?
Flags: needinfo?(snorp)
tracking-fennec: ? → +
Flags: needinfo?(snorp)
I'll assume this is a wontfix given where we are in the cycle.
You need to log in before you can comment on or make changes to this bug.