Closed Bug 1269682 Opened 8 years ago Closed 8 years ago

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

Categories

(Firefox for Android Graveyard :: Profile Handling, defect)

All
Android
defect
Not set
critical

Tracking

(firefox46 unaffected, firefox47 unaffected, firefox48+ verified, firefox49+ verified, fennec48+)

VERIFIED FIXED
Firefox 49
Tracking Status
firefox46 --- unaffected
firefox47 --- unaffected
firefox48 + verified
firefox49 + verified
fennec 48+ ---

People

(Reporter: sflorean, Assigned: jchen)

References

Details

(Keywords: crash, regression)

Crash Data

Attachments

(4 files, 1 obsolete file)

This bug was filed from the Socorro interface and is 
report bp-6a6834a6-1323-4209-bfed-296912160429.
=============================================================

Environment: 
Device: Nexus 5 (Android 6.0.1);
Build: Nightly 49.0a1 (2016-05-02);

Steps to reproduce:
1. Launch Firefox; 
2. Go to Tools-> New Guest Session;
3. Close Firefox.
4. Launch Firefox. 

Expected result:
Firefox opens and about:home is displayed.

Actual result:
Firefox crashes.

Stack Trace:
java.lang.IllegalStateException: Already registered Prompt:ShowTop
	at org.mozilla.gecko.EventDispatcher.registerListener(EventDispatcher.java:84)
	at org.mozilla.gecko.EventDispatcher.registerGeckoThreadListener(EventDispatcher.java:151)
	at org.mozilla.gecko.BrowserApp.onPause(BrowserApp.java:1101)
	at android.app.Activity.performPause(Activity.java:6348)
	at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1311)
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3367)
	at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3340)
	at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3315)
	at android.app.ActivityThread.-wrap13(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[Tracking Requested - why for this release]: regression
tracking-fennec: --- → ?
OS: Unspecified → Android
Hardware: Unspecified → All
Likely Jim's Gecko Service stuff.
Flags: needinfo?(nchen)
Assignee: nobody → nchen
tracking-fennec: ? → 48+
Flags: needinfo?(nchen)
When we try to restart Fennec immediately after launching Fennec, it's
possible for onPause to be called without a corresponding onResume being
called first. This patch guards against registering events twice due to
this quirk.
Attachment #8749670 - Flags: review?(ahunt)
BrowserApp has a snippet that tries to restart in guest profile if we're
supposed to be in it, but are currently not. This is vestigial code from
lock screen widget support, and should not be needed anymore.
Attachment #8749671 - Flags: review?(margaret.leibovic)
Always check for guest mode even if we don't have arguments, because
we can still be in guest mode even if we don't have arguments.
Attachment #8749672 - Flags: review?(margaret.leibovic)
Attachment #8749670 - Flags: review?(ahunt) → review+
Attachment #8749671 - Flags: review?(margaret.leibovic) → review+
Attachment #8749672 - Flags: review?(margaret.leibovic) → review+
Tracking for 48/49.
Comment on attachment 8749670 [details] [diff] [review]
Guard against onPause being called without onResume (v1)

Request for all patches.

Approval Request Comment
[Feature/regressing bug #]: Bug 1258554
[User impact if declined]: Crashes when entering guest mode
[Describe test coverage new/current, TreeHerder]: Local, m-c
[Risks and why]: Small; patches shouldn't really affect behavior besides fixing crash
[String/UUID change made/needed]: None
Attachment #8749670 - Flags: approval-mozilla-aurora?
Verified as fixed in build 49.0a1 2016-05-11;
Device: Nexus 5 (Android 6.0.1) and Asus Transformer Pad (Android 4.2.1).
Comment on attachment 8749670 [details] [diff] [review]
Guard against onPause being called without onResume (v1)

This patch fixes the crashes when entering guest mode and is verified. Take it in aurora.
Attachment #8749670 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Based on comment #13, take all patches in aurora.
Attachment #8749671 - Flags: approval-mozilla-aurora+
Attachment #8749672 - Flags: approval-mozilla-aurora+
has problems uplifting 

grafting 344048:ba36438e7258 "Bug 1269682 - Guard against onPause being called without onResume; r=ahunt"
merging mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
warning: conflicts while merging mobile/android/base/java/org/mozilla/gecko/BrowserApp.java! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Tomcats-MacBook-Pro-2:mozilla-central Tomcat$
Flags: needinfo?(nchen)
Attached patch Combined patch for Aurora (obsolete) — Splinter Review
Flags: needinfo?(nchen) → needinfo?(cbook)
Attachment #8755516 - Flags: review+
Flags: needinfo?(cbook)
Oops! Here's a new patch.
Attachment #8755516 - Attachment is obsolete: true
Flags: needinfo?(nchen)
Attachment #8756087 - Flags: review+
Depends on: 1275152
Verified as fixed in build 48.0a2 2016-05-26;
Device: Asus ZenPad 8 (Android 5.0.2) and Nexus 5 (Android 6.0.1).
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.