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

VERIFIED FIXED in Firefox 48

Status

()

--
critical
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: sorina, Assigned: jchen)

Tracking

({crash, regression})

Trunk
Firefox 49
All
Android
crash, regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

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

Details

(crash signature)

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

3 years ago
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)
(Reporter)

Updated

3 years ago
Duplicate of this bug: 1055686
[Tracking Requested - why for this release]: regression
tracking-fennec: --- → ?
tracking-firefox48: --- → ?
tracking-firefox49: --- → ?
Keywords: regression, regressionwindow-wanted
OS: Unspecified → Android
Hardware: Unspecified → All
Likely Jim's Gecko Service stuff.
Flags: needinfo?(nchen)
Keywords: regressionwindow-wanted
Assignee: nobody → nchen
tracking-fennec: ? → 48+
Flags: needinfo?(nchen)
Created attachment 8749670 [details] [diff] [review]
Guard against onPause being called without onResume (v1)

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)
Created attachment 8749671 [details] [diff] [review]
Don't try to switch to guest profile (v1)

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)
Created attachment 8749672 [details] [diff] [review]
Always detect guest mode first (v1)

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)
Blocks: 1270870

Updated

3 years ago
Attachment #8749670 - Flags: review?(ahunt) → review+

Updated

3 years ago
Attachment #8749671 - Flags: review?(margaret.leibovic) → review+

Updated

3 years ago
Attachment #8749672 - Flags: review?(margaret.leibovic) → review+
Tracking for 48/49.
tracking-firefox48: ? → +
tracking-firefox49: ? → +

Comment 10

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/ba36438e7258
https://hg.mozilla.org/mozilla-central/rev/710f4c21891e
https://hg.mozilla.org/mozilla-central/rev/fe2780a12fd3
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox49: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 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?
(Reporter)

Comment 12

3 years ago
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).
status-firefox49: fixed → verified
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)
Created attachment 8755516 [details] [diff] [review]
Combined patch for Aurora
Flags: needinfo?(nchen) → needinfo?(cbook)
Attachment #8755516 - Flags: review+

Comment 17

3 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/a2c46d6880e2
status-firefox48: affected → fixed
Flags: needinfo?(cbook)
This caused a permafail on aurora: https://treeherder.mozilla.org/logviewer.html#?job_id=2649836&repo=mozilla-aurora

Backed out in https://hg.mozilla.org/releases/mozilla-aurora/rev/9c28c3b843d9
status-firefox48: fixed → affected
Flags: needinfo?(nchen)
Created attachment 8756087 [details] [diff] [review]
Combined patch for Aurora (v2)

Oops! Here's a new patch.
Attachment #8755516 - Attachment is obsolete: true
Flags: needinfo?(nchen)
Attachment #8756087 - Flags: review+

Updated

3 years ago
Depends on: 1275152
(Reporter)

Comment 21

3 years ago
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
status-firefox48: fixed → verified
You need to log in before you can comment on or make changes to this bug.