If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

VERIFIED FIXED in Firefox 48

Status

()

Firefox for Android
Profile Handling
--
critical
VERIFIED FIXED
a year ago
a year 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

a year 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

a year 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
(Reporter)

Comment 3

a year ago
Regression window:
Last good build: 2016-04-05
First bad build: 2016-04-06
pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=d9f50aa0a1aaf90499b85c31e0f329b762e80fdd&tochange=68c0b7d6f16ce5bb023e08050102b5f2fe4aacd8
Likely Jim's Gecko Service stuff.
Flags: needinfo?(nchen)
Keywords: regressionwindow-wanted
Assignee: nobody → nchen
tracking-fennec: ? → 48+
Flags: needinfo?(nchen)
(Assignee)

Comment 5

a year ago
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)
(Assignee)

Comment 6

a year ago
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)
(Assignee)

Comment 7

a year ago
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)
(Assignee)

Updated

a year ago
Blocks: 1270870

Updated

a year ago
Attachment #8749670 - Flags: review?(ahunt) → review+

Updated

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

Updated

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

Comment 9

a year ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/ba36438e7258
https://hg.mozilla.org/integration/mozilla-inbound/rev/710f4c21891e
https://hg.mozilla.org/integration/mozilla-inbound/rev/fe2780a12fd3

Comment 10

a year 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: a year ago
status-firefox49: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
(Assignee)

Comment 11

a year ago
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

a year 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)
(Assignee)

Comment 16

a year ago
Created attachment 8755516 [details] [diff] [review]
Combined patch for Aurora
Flags: needinfo?(nchen) → needinfo?(cbook)
Attachment #8755516 - Flags: review+

Comment 17

a year 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)
(Assignee)

Comment 19

a year ago
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+
  https://hg.mozilla.org/releases/mozilla-aurora/rev/12f53b845cb9
status-firefox48: affected → fixed

Updated

a year ago
Depends on: 1275152
(Reporter)

Comment 21

a year 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.