Closed Bug 1505685 Opened 7 years ago Closed 7 years ago

Receiver not registered: HeadSetStateReceiver, PackageAddedReceiver

Categories

(Firefox for Android Graveyard :: General, defect)

All
Android
defect
Not set
normal

Tracking

(firefox63 wontfix, firefox64 fixed, firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox63 --- wontfix
firefox64 --- fixed
firefox65 --- fixed

People

(Reporter: petru, Assigned: petru)

References

Details

(Keywords: crash)

Crash Data

Attachments

(3 files, 2 obsolete files)

As a continuation of bug 1501648 this should be investigated more to find the culprit and fix it.
Assignee: nobody → petru.lingurar
Blocks: 1501648
Status: NEW → ASSIGNED
OS: Unspecified → Android
Speculative fix for avoiding the situation in which the initialization of Mma and registering of the PackageAddedReceiver continues on the background thread after BrowserActivity is destroyed and calls for unregistering the receiver. By registering the receiver on the main thread we have the benefit of sequentially execution which would guarantee that the registration is done before trying to unregister it.
Executing SwitchBoard.loadConfig() on a background thread is the main purpose of the AsyncConfigLoader so executing it immediately again in the same thread is redundant. Depends on D12031
Speculative fix. initialize() is called by Gecko on it's background thread after it started. The value for the "dom.audiochannel.mediaControl" preference also comes on a background thread. This both can end up registering the HeadSetStateReceiver while unregistering it happens only on the main thread. The patch tries to avoid the race condition by making sure Receiver's registering and unregistering is done serially on the main thread. Depends on D12032
Executing SwitchBoard.loadConfig() on a background thread is the main purpose of the AsyncConfigLoader so executing it immediately again in the same thread is redundant. Depends on D12031 Depends on D12031
Speculative fix. initialize() is called by Gecko on it's background thread after it started. The value for the "dom.audiochannel.mediaControl" preference also comes on a background thread. This both can end up registering the HeadSetStateReceiver while unregistering it happens only on the main thread. The patch tries to avoid the race condition by making sure Receiver's registering and unregistering is done serially on the main thread. Depends on D12032 Depends on D12305
Attachment #9026110 - Attachment is obsolete: true
Attachment #9026111 - Attachment is obsolete: true
The new differentials apparently were caused because "moz-phab don't yet support reordering/merging/adding/deleting commits". So after updating patches in a stack they should be submitted manually with arcanist, at least until bug 1481539 is resolved.
Keywords: checkin-needed
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/9344087c8d8e Part 1 - Register PackageAddedReceiver on the main thread; r=JanH https://hg.mozilla.org/integration/mozilla-inbound/rev/a46710b7723f Part 2 - Cleanup - remove second SwitchBoard.loadConfig(); r=JanH https://hg.mozilla.org/integration/mozilla-inbound/rev/6e2a67a9a9c9 Part 3 - Register HeadSetStateReceiver on the main thread; r=JanH
Keywords: checkin-needed
Flags: needinfo?(petru.lingurar)
Keywords: checkin-needed
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cbe820dfb9ad Part 1 - Register PackageAddedReceiver on the main thread; r=JanH https://hg.mozilla.org/integration/mozilla-inbound/rev/2a75f31dcd5f Part 2 - Cleanup - remove second SwitchBoard.loadConfig(); r=JanH https://hg.mozilla.org/integration/mozilla-inbound/rev/be4f02491218 Part 3 - Register HeadSetStateReceiver on the main thread; r=JanH
Keywords: checkin-needed
Crash Signature: [@ java.lang.IllegalArgumentException: at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java)]
Fixed on 64 through bug 1501648, which disabled the diagnostic crashes on Beta.
Depends on: 1509434
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: