Closed Bug 1586043 Opened 2 months ago Closed 2 months ago

MOZ_CRASH in MediaKeySystemAccessManager::Request if closing tab/window at wrong time


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




Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- unaffected
firefox67 --- unaffected
firefox68 --- unaffected
firefox69 --- unaffected
firefox70 --- unaffected
firefox71 --- fixed


(Reporter: bryce, Assigned: bryce)




(Keywords: regression)


(1 file)

It's possible to hit the MOZ_CRASH here if one closes a Window requesting MediaKeySystemAccess at just the right/wrong time. Easiest way to repro is to rapidly open and close a page that requests MediaKeySystemAccess, though I've only hit it a couple of times and it's taken me 10s of attempts each time.

I noticed this while debugging other EME related issues. We should downgrade this crash to a log as it causes pain when debugging and can conceivably be hit in normal usage.

Because it's possible to have the IPC fail when checking if MediaKeySystemAccess
should be allowed, we should gracefully handle the IPC failure case. If we don't
gracefully handle here, closing the tab during requestMediaKeySystemAccess can
result in crashing the content process.

Pushed by
Gracefully handle IPC failure when checking if MediaKeySystemAccess is allowed on Windows. r=dminor
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71


Is this issue verifiable manually?
If so, could you please provide QA with STR to verify it?

Thank you in advance!

Flags: needinfo?(bvandyk)

Because the issue is racy the STR are not guaranteed to cause the issue. I.e. you can repeat the steps on an affected build and should eventually hit the crash.

You could compare an affected nightly to one after the patch has been applied. If the fixed nightly doesn't fault after enough attempts it would be a positive indicator. However, it's hard to be entirely sure the bug is fixed because of its racy nature.


  • Open Firefox.
  • Keep the default tab open so that Firefox doesn't close as we open and close other tabs.
  • Rapidly open a tab, navigate to, and close the tab. I did this by having the URL on my clipboard and performing ctrl + t, ctrl + v, ctrl + w.
Flags: needinfo?(bvandyk)
Flags: qe-verify+


I didn't manage to reproduce the issue from the description, following the steps from comment 6 on all OS platforms using Fx 71.0a1 (2019-10-03). Are there some extra steps that can help us to reproduce the issue or any settings that must be changed? Or can you please verify that the issue is fixed in the environment which the issue occurred, in the latest Beta 71 build?

Thanks in advance.

Flags: needinfo?(bvandyk)

The issue should be Windows specific, and should be fixed in 71 beta. I don't think any release versions will exhibit the issue -- only certain nightly releases from the 71 cycle will have the problem.

Flags: needinfo?(bvandyk)
OS: Unspecified → Windows
You need to log in before you can comment on or make changes to this bug.