DCSurfaceVideo calls CloseHandle on the swap chain which throws 0xC0000008: invalid handle.
Categories
(Core :: Graphics, defect)
Tracking
()
People
(Reporter: Zaggy1024, Assigned: sotaro)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
(deleted),
application/json
|
Details | |
(deleted),
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
|
Details |
When viewing an H264 video while debugging in Windows, then reloading the page, an exception is thrown in ReleaseDecodeSwapChainResources. The exception details are here:
Exception thrown at 0x00007FFF13150C7A (ntdll.dll) in firefox.exe: 0xC0000008: An invalid handle was specified.
In some instances, I observed that the DCSurfaceVideo was being freed before ReleaseDecodeSwapChainResources was called, but sometimes the handle is also still set to a valid value such as 0x000000e8b712d150.
Raw data from about:support in the debug environment is attached.
Stack trace:
ntdll.dll!KiRaiseUserExceptionDispatcher()
KernelBase.dll!CloseHandle()
[Inline Frame] xul.dll!mozilla::wr::DCSurfaceVideo::ReleaseDecodeSwapChainResources() Line 1172
xul.dll!mozilla::wr::DCSurfaceVideo::CalculateSwapChainSize(mozilla::gfx::BaseMatrix<float> & aTransform) Line 871
xul.dll!mozilla::wr::DCLayerTree::AddSurface(mozilla::wr::NativeSurfaceId aId, const mozilla::wr::Transform3D<float,mozilla::wr::DevicePixel,mozilla::wr::DevicePixel> & aTransform, mozilla::wr::Box2D<int,mozilla::wr::DevicePixel> aClipRect, mozilla::wr::ImageRendering aImageRendering) Line 556
xul.dll!mozilla::wr::RenderCompositorANGLE::AddSurface(mozilla::wr::NativeSurfaceId aId, const mozilla::wr::Transform3D<float,mozilla::wr::DevicePixel,mozilla::wr::DevicePixel> & aTransform, mozilla::wr::Box2D<int,mozilla::wr::DevicePixel> aClipRect, mozilla::wr::ImageRendering aImageRendering) Line 895
xul.dll!wr_compositor_add_surface(void * aCompositor, mozilla::wr::NativeSurfaceId aId, const mozilla::wr::Transform3D<float,mozilla::wr::DevicePixel,mozilla::wr::DevicePixel> * aTransform, mozilla::wr::Box2D<int,mozilla::wr::DevicePixel> aClipRect, mozilla::wr::ImageRendering aImageRendering) Line 45
xul.dll!webrender_bindings::bindings::impl$21::add_surface(webrender_bindings::bindings::WrCompositor * self, webrender::composite::NativeSurfaceId id, euclid::transform3d::Transform3D<f32,webrender_api::units::DevicePixel,webrender_api::units::DevicePixel> transform, euclid::box2d::Box2D<i32,webrender_api::units::DevicePixel> clip_rect, webrender_api::display_item::ImageRendering image_rendering) Line 1361
xul.dll!webrender::composite::CompositeState::composite_native(webrender_api::color::ColorF self, slice$<euclid::box2d::Box2D<i32,webrender_api::units::DevicePixel>> clear_color, ref_mut$<dyn$<webrender::composite::Compositor>>) Line 6341
xul.dll!webrender::renderer::Renderer::draw_frame(webrender::frame_builder::Frame * self, enum$<core::option::Option<euclid::size::Size2D<i32,webrender_api::units::DevicePixel>>> frame, unsigned __int64 device_size, webrender::renderer::RenderResults * buffer_age) Line 4740
xul.dll!webrender::renderer::Renderer::render_impl(webrender_api::DocumentId self, webrender::internal_types::RenderedDocument * doc_id, enum$<core::option::Option<euclid::size::Size2D<i32,webrender_api::units::DevicePixel>>> active_doc, unsigned __int64 device_size) Line 2024
xul.dll!webrender::renderer::Renderer::render(euclid::size::Size2D<i32,webrender_api::units::DevicePixel> self, unsigned __int64 buffer_age) Line 1744
xul.dll!webrender_bindings::bindings::wr_renderer_render(webrender::renderer::Renderer * renderer, int width, int height, unsigned __int64 buffer_age, webrender::renderer::RendererStats * out_stats, thin_vec::ThinVec<euclid::box2d::Box2D<i32,webrender_api::units::DevicePixel>> * out_dirty_rects) Line 620
xul.dll!mozilla::wr::RendererOGL::UpdateAndRender(const mozilla::Maybe<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>> & aReadbackSize, const mozilla::Maybe<mozilla::wr::ImageFormat> & aReadbackFormat, const mozilla::Maybe<mozilla::Range<unsigned char>> & aReadbackBuffer, bool * aNeedsYFlip, mozilla::wr::RendererStats * aOutStats) Line 185
xul.dll!mozilla::wr::RenderThread::UpdateAndRender(mozilla::wr::WrWindowId aWindowId, const mozilla::layers::BaseTransactionId<mozilla::VsyncIdType> & aStartId, const mozilla::TimeStamp & aStartTime, bool aRender, const mozilla::Maybe<mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits>> & aReadbackSize, const mozilla::Maybe<mozilla::wr::ImageFormat> & aReadbackFormat, const mozilla::Maybe<mozilla::Range<unsigned char>> & aReadbackBuffer, bool * aNeedsYFlip) Line 537
xul.dll!mozilla::wr::RenderThread::HandleFrameOneDoc(mozilla::wr::WrWindowId aWindowId, bool aRender) Line 393
[Inline Frame] xul.dll!mozilla::detail::RunnableMethodArguments<mozilla::wr::WrWindowId,bool>::applyImpl(mozilla::wr::RenderThread * o, void(mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId, bool) m, mozilla::Tuple<StoreCopyPassByConstLRef<mozilla::wr::WrWindowId>,StoreCopyPassByConstLRef<bool>> & args, std::integer_sequence<unsigned long long,0,1>) Line 1147
[Inline Frame] xul.dll!mozilla::detail::RunnableMethodArguments<mozilla::wr::WrWindowId,bool>::apply(mozilla::wr::RenderThread * o, void(mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId, bool) m) Line 1153
xul.dll!mozilla::detail::RunnableMethodImpl<mozilla::wr::RenderThread *,void (mozilla::wr::RenderThread::*)(mozilla::wr::WrWindowId, bool),1,mozilla::RunnableKind::Standard,mozilla::wr::WrWindowId,bool>::Run() Line 1203
xul.dll!nsThread::ProcessNextEvent(bool aMayWait, bool * aResult) Line 1174
xul.dll!NS_ProcessNextEvent(nsIThread * aThread, bool aMayWait) Line 465
xul.dll!mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate * aDelegate) Line 330
xul.dll!MessageLoop::RunHandler() Line 374
xul.dll!MessageLoop::Run() Line 356
xul.dll!nsThread::ThreadFunc(void * aArg) Line 380
nss3.dll!_PR_NativeRunThread(void * arg) Line 408
nss3.dll!pr_root(void * arg) Line 140
[External Code]
[Inline Frame] mozglue.dll!mozilla::interceptor::FuncHook<mozilla::interceptor::WindowsDllInterceptor<mozilla::interceptor::VMSharingPolicyShared>,void (*)(int, void *, void *)>::operator()(int & aArgs, void * & aArgs, void * & aArgs) Line 150
mozglue.dll!patched_BaseThreadInitThunk(int aIsInitialThread, void * aStartAddress, void * aThreadParam) Line 568
[External Code]
ni :sotaro as I've been told you might know something about this.
Assignee | ||
Comment 2•3 years ago
|
||
Thanks for reporting. I take a bug.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 3•3 years ago
|
||
Oh, the problem happened by my mistake :(
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
Assignee | ||
Comment 6•3 years ago
|
||
Comment on attachment 9272780 [details]
Bug 1765214 - Fix DCSurfaceVideo::mSwapChainSurfaceHandle initialization
Beta/Release Uplift Approval Request
- User impact if declined: An exception is thrown when video is loaded. It is caught when debugger is attached. YUV overlay is enabled on beta now by Bug 1760724.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The change just initialize DCSurfaceVideo::mSwapChainSurfaceHandle to 0.
- String changes made/needed: none
Updated•3 years ago
|
Comment 7•3 years ago
|
||
Set release status flags based on info from the regressing bug 1460499
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 9•3 years ago
|
||
Comment on attachment 9272780 [details]
Bug 1765214 - Fix DCSurfaceVideo::mSwapChainSurfaceHandle initialization
Approved for 100.0b8
Comment 10•3 years ago
|
||
bugherder uplift |
Updated•3 years ago
|
Updated•3 years ago
|
Description
•