Closed Bug 1111387 Opened 5 years ago Closed 5 years ago

[EME][MSE] Crash starting up EME during MSE shutdown

Categories

(Core :: Audio/Video, defect)

x86_64
Windows 8.1
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla37
Tracking Status
firefox36 --- fixed
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

I happened upon a crash while EME is starting up during browser shutdown.

Main thread:

xul.dll!mozilla::BlockingResourceBase::CheckAcquire() Line 271	C++
xul.dll!mozilla::OffTheBooksMutex::Lock() Line 382	C++
xul.dll!mozilla::Monitor::Lock() Line 35	C++
xul.dll!mozilla::MonitorAutoLock::MonitorAutoLock(mozilla::Monitor & aMonitor) Line 79	C++
xul.dll!mozilla::MediaTaskQueue::Dispatch(mozilla::TemporaryRef<nsIRunnable> aRunnable) Line 34	C++
xul.dll!mozilla::TrackBuffer::QueueInitializeDecoder(mozilla::SourceBufferDecoder * aDecoder) Line 356	C++
xul.dll!nsRunnableMethodImpl<bool (__thiscall mozilla::TrackBuffer::*)(mozilla::SourceBufferDecoder *),mozilla::SourceBufferDecoder *,1>::Run() Line 365	C++
xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Line 830	C++
xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Line 265	C++

TrackBuffer::mTaskQueue is null, but TrackBuffer::QueueInitializeDecoder is dereferencing it.

I assume that TrackBuffer::SetCDMProxy() is dispatching a task to call TrackBuffer::QueueInitializeDecoder(), which is running after we've run TrackBuffer::Shutdown() which nulls mTaskQueue.

I guess we should null-check mTaskQueue in TrackBuffer::QueueInitializeDecoder()?
Add the obvious null-check...
Assignee: nobody → cpearce
Status: NEW → ASSIGNED
Attachment #8536219 - Flags: review?(cajbir.bugzilla)
Attachment #8536219 - Flags: review?(cajbir.bugzilla) → review+
https://hg.mozilla.org/mozilla-central/rev/6461117552cd
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Comment on attachment 8536219 [details] [diff] [review]
Patch: Add null check

Approval Request Comment
[Feature/regressing bug #]: MSE
[User impact if declined]: Less consistent testing, sites more likely to serve Flash video.
[Describe test coverage new/current, TBPL]: Landed on m-c.
[Risks and why]: Low. Clean and straightforward change.
[String/UUID change made/needed]: None.
Attachment #8536219 - Flags: approval-mozilla-aurora?
Attachment #8536219 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Mass update firefox-status to track EME uplift.
You need to log in before you can comment on or make changes to this bug.