Release assert in canPlayType when using GMP decoder for unencrypted <video>

RESOLVED FIXED

Status

()

defect
P2
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: cpearce, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

I get a MOZ_RELEASE_ASSERT on http://pearce.org.nz/h when I use a GMP to decode and play non-encrypted <video>.

Looks like the sync dispatch we do in MediaDataDecoderProxy::Shutdown() can cause the cycle collector and (MP4Decoder::CanCreateH264Decoder) to re-enter.

Assertion failure: !mDoingStableStates, at c:/Users/cpearce/src/mozilla/purple/xpcom/base/CycleCollectedJSRuntime.cpp:1057
#01: mozilla::CycleCollectedJSRuntime::AfterProcessTask (c:\users\cpearce\src\mozilla\purple\xpcom\base\cyclecollectedjsruntime.cpp:1094)
#02: XPCJSRuntime::AfterProcessTask (c:\users\cpearce\src\mozilla\purple\js\xpconnect\src\xpcjsruntime.cpp:3624)
#03: nsThread::ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:892)
#04: NS_ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\glue\nsthreadutils.cpp:277)
#05: nsThread::DispatchInternal (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:589)
#06: nsThread::Dispatch (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:614)
#07: nsIEventTarget::Dispatch (c:\users\cpearce\src\mozilla\purple\objdir\dist\include\nsieventtarget.h:37)
#08: mozilla::MediaDataDecoderProxy::Shutdown (c:\users\cpearce\src\mozilla\purple\dom\media\platforms\agnostic\gmp\mediadatadecoderproxy.cpp:95)
#09: mozilla::H264Converter::Shutdown (c:\users\cpearce\src\mozilla\purple\dom\media\platforms\wrappers\h264converter.cpp:115)
#10: mozilla::MP4Decoder::CanCreateH264Decoder (c:\users\cpearce\src\mozilla\purple\dom\media\fmp4\mp4decoder.cpp:318)
#11: mozilla::MP4Decoder::CanHandleMediaType (c:\users\cpearce\src\mozilla\purple\dom\media\fmp4\mp4decoder.cpp:151)
#12: mozilla::IsMP4SupportedType (c:\users\cpearce\src\mozilla\purple\dom\media\decodertraits.cpp:353)
#13: mozilla::DecoderTraits::IsMP4Type (c:\users\cpearce\src\mozilla\purple\dom\media\decodertraits.cpp:361)
#14: mozilla::DecoderTraits::CanHandleMediaType (c:\users\cpearce\src\mozilla\purple\dom\media\decodertraits.cpp:536)
#15: mozilla::dom::HTMLMediaElement::GetCanPlay (c:\users\cpearce\src\mozilla\purple\dom\html\htmlmediaelement.cpp:2690)
#16: mozilla::dom::HTMLMediaElement::LoadFromSourceChildren (c:\users\cpearce\src\mozilla\purple\dom\html\htmlmediaelement.cpp:1045)
#17: mozilla::dom::HTMLMediaElement::SelectResource (c:\users\cpearce\src\mozilla\purple\dom\html\htmlmediaelement.cpp:960)
#18: mozilla::dom::HTMLMediaElement::SelectResourceWrapper (c:\users\cpearce\src\mozilla\purple\dom\html\htmlmediaelement.cpp:896)
#19: nsRunnableMethodArguments<>::apply<mozilla::dom::HTMLMediaElement,void (__thiscall mozilla::dom::HTMLMediaElement::*)(void)> (c:\users\cpearce\src\mozilla\purple\objdir\dist\include\nsthreadutils
.h:662)
#20: nsRunnableMethodImpl<void (__thiscall mozilla::dom::HTMLMediaElement::*)(void),1>::Run (c:\users\cpearce\src\mozilla\purple\objdir\dist\include\nsthreadutils.h:870)
#21: mozilla::dom::nsSyncSection::Run (c:\users\cpearce\src\mozilla\purple\dom\html\htmlmediaelement.cpp:812)
#22: mozilla::CycleCollectedJSRuntime::ProcessStableStateQueue (c:\users\cpearce\src\mozilla\purple\xpcom\base\cyclecollectedjsruntime.cpp:1048)
#23: mozilla::CycleCollectedJSRuntime::AfterProcessTask (c:\users\cpearce\src\mozilla\purple\xpcom\base\cyclecollectedjsruntime.cpp:1102)
#24: XPCJSRuntime::AfterProcessTask (c:\users\cpearce\src\mozilla\purple\js\xpconnect\src\xpcjsruntime.cpp:3624)
#25: nsThread::ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:892)
#26: NS_ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\glue\nsthreadutils.cpp:277)
#27: nsThread::DispatchInternal (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:589)
#28: nsThread::Dispatch (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:614)
#29: nsIEventTarget::Dispatch (c:\users\cpearce\src\mozilla\purple\objdir\dist\include\nsieventtarget.h:37)
#30: mozilla::MediaDataDecoderProxy::Shutdown (c:\users\cpearce\src\mozilla\purple\dom\media\platforms\agnostic\gmp\mediadatadecoderproxy.cpp:95)
#31: mozilla::H264Converter::Shutdown (c:\users\cpearce\src\mozilla\purple\dom\media\platforms\wrappers\h264converter.cpp:115)
#32: mozilla::MP4Decoder::CanCreateH264Decoder (c:\users\cpearce\src\mozilla\purple\dom\media\fmp4\mp4decoder.cpp:318)
#33: mozilla::MP4Decoder::CanHandleMediaType (c:\users\cpearce\src\mozilla\purple\dom\media\fmp4\mp4decoder.cpp:151)
#34: mozilla::IsMP4SupportedType (c:\users\cpearce\src\mozilla\purple\dom\media\decodertraits.cpp:353)
#35: mozilla::DecoderTraits::IsMP4Type (c:\users\cpearce\src\mozilla\purple\dom\media\decodertraits.cpp:361)
#36: mozilla::DecoderTraits::CanHandleCodecsType (c:\users\cpearce\src\mozilla\purple\dom\media\decodertraits.cpp:446)
#37: mozilla::DecoderTraits::CanHandleMediaType (c:\users\cpearce\src\mozilla\purple\dom\media\decodertraits.cpp:518)
#38: mozilla::dom::HTMLMediaElement::GetCanPlay (c:\users\cpearce\src\mozilla\purple\dom\html\htmlmediaelement.cpp:2690)
#39: mozilla::dom::HTMLMediaElement::CanPlayType (c:\users\cpearce\src\mozilla\purple\dom\html\htmlmediaelement.cpp:2696)
#40: mozilla::dom::HTMLMediaElementBinding::canPlayType (c:\users\cpearce\src\mozilla\purple\objdir\dom\bindings\htmlmediaelementbinding.cpp:382)
#41: mozilla::dom::GenericBindingMethod (c:\users\cpearce\src\mozilla\purple\dom\bindings\bindingutils.cpp:2602)
#42: js::CallJSNative (c:\users\cpearce\src\mozilla\purple\js\src\jscntxtinlines.h:235)
#43: js::Invoke (c:\users\cpearce\src\mozilla\purple\js\src\vm\interpreter.cpp:763)
#44: Interpret (c:\users\cpearce\src\mozilla\purple\js\src\vm\interpreter.cpp:3067)
#45: js::RunScript (c:\users\cpearce\src\mozilla\purple\js\src\vm\interpreter.cpp:704)
#46: js::ExecuteKernel (c:\users\cpearce\src\mozilla\purple\js\src\vm\interpreter.cpp:978)
#47: js::Execute (c:\users\cpearce\src\mozilla\purple\js\src\vm\interpreter.cpp:1012)
#48: Evaluate (c:\users\cpearce\src\mozilla\purple\js\src\jsapi.cpp:4447)
#49: Evaluate (c:\users\cpearce\src\mozilla\purple\js\src\jsapi.cpp:4473)
#50: JS::Evaluate (c:\users\cpearce\src\mozilla\purple\js\src\jsapi.cpp:4528)
#51: nsJSUtils::EvaluateString (c:\users\cpearce\src\mozilla\purple\dom\base\nsjsutils.cpp:224)
#52: nsJSUtils::EvaluateString (c:\users\cpearce\src\mozilla\purple\dom\base\nsjsutils.cpp:287)
#53: nsScriptLoader::EvaluateScript (c:\users\cpearce\src\mozilla\purple\dom\base\nsscriptloader.cpp:1198)
#54: nsScriptLoader::ProcessRequest (c:\users\cpearce\src\mozilla\purple\dom\base\nsscriptloader.cpp:1016)
#55: nsScriptLoader::ProcessScriptElement (c:\users\cpearce\src\mozilla\purple\dom\base\nsscriptloader.cpp:799)
#56: nsScriptElement::MaybeProcessScript (c:\users\cpearce\src\mozilla\purple\dom\base\nsscriptelement.cpp:142)
#57: nsIScriptElement::AttemptToExecute (c:\users\cpearce\src\mozilla\purple\dom\base\nsiscriptelement.h:221)
#58: nsHtml5TreeOpExecutor::RunScript (c:\users\cpearce\src\mozilla\purple\parser\html\nshtml5treeopexecutor.cpp:662)
#59: nsHtml5TreeOpExecutor::RunFlushLoop (c:\users\cpearce\src\mozilla\purple\parser\html\nshtml5treeopexecutor.cpp:490)
#60: FlushTimerCallback (c:\users\cpearce\src\mozilla\purple\parser\html\nshtml5treeopexecutor.cpp:249)
#61: nsTimerImpl::Fire (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nstimerimpl.cpp:437)
#62: nsTimerEvent::Run (c:\users\cpearce\src\mozilla\purple\xpcom\threads\timerthread.cpp:272)
#63: nsThread::ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\threads\nsthread.cpp:874)
#64: NS_ProcessNextEvent (c:\users\cpearce\src\mozilla\purple\xpcom\glue\nsthreadutils.cpp:277)
#65: mozilla::ipc::MessagePump::Run (c:\users\cpearce\src\mozilla\purple\ipc\glue\messagepump.cpp:95)
#66: MessageLoop::RunInternal (c:\users\cpearce\src\mozilla\purple\ipc\chromium\src\base\message_loop.cc:235)
#67: MessageLoop::RunHandler (c:\users\cpearce\src\mozilla\purple\ipc\chromium\src\base\message_loop.cc:228)
#68: MessageLoop::Run (c:\users\cpearce\src\mozilla\purple\ipc\chromium\src\base\message_loop.cc:202)
#69: nsBaseAppShell::Run (c:\users\cpearce\src\mozilla\purple\widget\nsbaseappshell.cpp:158)
#70: nsAppShell::Run (c:\users\cpearce\src\mozilla\purple\widget\windows\nsappshell.cpp:178)
#71: nsAppStartup::Run (c:\users\cpearce\src\mozilla\purple\toolkit\components\startup\nsappstartup.cpp:281)
#72: XREMain::XRE_mainRun (c:\users\cpearce\src\mozilla\purple\toolkit\xre\nsapprunner.cpp:4292)
#73: XREMain::XRE_main (c:\users\cpearce\src\mozilla\purple\toolkit\xre\nsapprunner.cpp:4389)
#74: XRE_main (c:\users\cpearce\src\mozilla\purple\toolkit\xre\nsapprunner.cpp:4478)
#75: do_main (c:\users\cpearce\src\mozilla\purple\browser\app\nsbrowserapp.cpp:212)
#76: NS_internal_main (c:\users\cpearce\src\mozilla\purple\browser\app\nsbrowserapp.cpp:399)
#77: wmain (c:\users\cpearce\src\mozilla\purple\toolkit\xre\nswindowswmain.cpp:131)
#78: __tmainCRTStartup (f:\dd\vctools\crt\crtw32\startup\crt0.c:255)
#79: BaseThreadInitThunk[KERNEL32 +0x17c04]
#80: __RtlUserThreadStart[ntdll +0x5ad1f]
#81: _RtlUserThreadStart[ntdll +0x5acea]
Priority: -- → P2
Fixed by Bug 1212670.
Status: NEW → RESOLVED
Closed: 4 years ago
Depends on: 1212670
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.