Closed Bug 1651088 Opened 7 months ago Closed 6 months ago

Crash in [@ java.util.NoSuchElementException: at java.util.ArrayDeque.removeFirst(]


(Core :: Audio/Video: Playback, defect)




81 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox78 --- unaffected
firefox79 + fixed
firefox80 + fixed
firefox81 + fixed


(Reporter: fluffyemily, Assigned: jhlin)




(Keywords: crash, regression, Whiteboard: [fxr:p1])

Crash Data


(1 file)

Crash in ExoPlayer2.

This bug is for crash report bp-82037c51-402b-4239-b1b9-481890200707.

Java stack trace:

	at java.util.ArrayDeque.removeFirst(
	at android.os.Handler.dispatchMessage(
	at android.os.Looper.loop(
Component: General → Audio/Video: Playback
Product: GeckoView → Core

Bryce, it looks like we're having some crashes inside exoplayer. Could you please take a look?

Flags: needinfo?(bvandyk)

This is a regression of bug 1628792. In the new version, ExoPlayerImpl.notifyListeners[1] relies on an instance variable pendingListenerNotifications to work, and must run on one single thread.

According to the "Threading Model" section of its Javadoc[2], an ExoPlayer instance must be accessed from a single application thread, but GeckoHlsPlayer doesn't follow this rule. I'll modify it to comply.


Assignee: nobody → jolin
Flags: needinfo?(bvandyk)
Severity: -- → S1

Might be worth sneaking this into a Fenix dot release if a low-risk patch is available.

This is currently the top content process crasher in Firefox Reality v11 (the current release).

Whiteboard: [fxr:p1]

The threading model described in the javadoc ( in tree)
requires that the player is accessed from a single thread. However current
GeckoHlsPlayer implementation violates this rule and uses the player from
Gecko main thread and other media task queues. Introduce methods to execute
code asynchronously and synchronously for GeckoHlsPlayer to follows the rule.
Also add comments documenting thread usages for some instance variables and
assertions in the begining of methods that need to be on the player thread
to help debugging.

Pushed by
ensure ExoPlayer instance operate on a single thread. r=geckoview-reviewers,snorp
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Please nominate this for Beta and Release approval when you get a chance.

Flags: needinfo?(jolin)

Thanks for the reminder! I will request the uplifting after the patch for bug 1638452 is landed and verified.

Flags: needinfo?(jolin)

Tracking for 79 given the volume. This would be good to get into a GV79 respin for next week's updated Fenix builds.

The patch landed in nightly and beta is affected.
:jhlin, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.
If yes, don't forget to request an uplift for the patches in the regression caused by this fix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(jolin)

Comment on attachment 9167512 [details]
Bug 1651088 - ensure ExoPlayer instance operate on a single thread. r?agi

Beta/Release Uplift Approval Request

  • User impact if declined: Browser crash when playing HLS video.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: Bug 1638452
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change dispatches works to a single thread and avoid race condition.
  • String changes made/needed: N/A
Flags: needinfo?(jolin)
Attachment #9167512 - Flags: approval-mozilla-release?
Attachment #9167512 - Flags: approval-mozilla-beta?

Comment on attachment 9167512 [details]
Bug 1651088 - ensure ExoPlayer instance operate on a single thread. r?agi

gv crash fix, approved for 80.0b8

Attachment #9167512 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9167512 [details]
Bug 1651088 - ensure ExoPlayer instance operate on a single thread. r?agi

Approved for Fenix 79.0.5.

Attachment #9167512 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.