Crash in mozilla::gl::GLContext::MakeCurrent const

RESOLVED FIXED in Firefox 63

Status

()

defect
--
critical
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: gsvelto, Assigned: nical)

Tracking

({crash, regression})

unspecified
mozilla63
Unspecified
macOS
Points:
---

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox-esr60 unaffected, firefox61 unaffected, firefox62 unaffected, firefox63 fixed)

Details

(crash signature)

Attachments

(1 attachment)

Reporter

Description

10 months ago
This bug was filed from the Socorro interface and is
report bp-6bcb0a91-c2f1-4809-b3a0-b30480180801.
=============================================================

Top 10 frames of crashing thread:

0 XUL mozilla::gl::GLContext::MakeCurrent const gfx/gl/GLContext.h:3372
1 XUL mozilla::layers::DirectMapTextureSource::UpdateInternal gfx/layers/opengl/TextureHostOGL.cpp:360
2 XUL mozilla::layers::CompositorOGL::CreateDataTextureSourceAround mfbt/RefPtr.h:658
3 XUL mozilla::layers::BufferTextureHost::EnsureWrappingTextureSource gfx/layers/composite/TextureHost.cpp:752
4 XUL mozilla::layers::BufferTextureHost::PrepareTextureSource gfx/layers/composite/TextureHost.cpp:838
5 XUL mozilla::layers::ImageHost::SetCurrentTextureHost gfx/layers/composite/ImageHost.cpp:128
6 XUL mozilla::layers::ImageHost::UseTextureHost gfx/layers/composite/ImageHost.cpp:75
7 XUL mozilla::layers::CompositableParentManager::ReceiveCompositableUpdate gfx/layers/ipc/CompositableTransactionParent.cpp:169
8 XUL mozilla::layers::ImageBridgeParent::RecvUpdate gfx/layers/ipc/ImageBridgeParent.cpp:202
9 XUL mozilla::layers::PImageBridgeParent::OnMessageReceived ipc/ipdl/PImageBridgeParent.cpp:235

=============================================================

We encountered a similar issue in bug 1427112, the signature is the same but the stack is not so it's probably unrelated.
Assignee

Updated

10 months ago
Assignee: nobody → nical.bugzilla
Assignee

Comment 2

10 months ago
From the stack trace of the report and other similar signatures it appears that we are asking a gl compositor with no valid gl context to create a DirectMapTextureSource, which end up holding on to a null gl context reference. I added some checks to DirectMapTextureSource and also made sure it checks the result of MakeCurrent. I also avoided creating the texture source at all if there is no valid context since that's a better place to handle this particular issue IMO.
Comment on attachment 9002713 [details]
Bug 1484624 - Don't create texture sources if the compositor doesn't have a GL context. r=sotaro

Sotaro Ikeda [:sotaro] has approved the revision.
Attachment #9002713 - Flags: review+

Comment 4

10 months ago
Pushed by nsilva@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/389ffe7befee
Don't create texture sources if the compositor doesn't have a GL context. r=sotaro
https://hg.mozilla.org/mozilla-central/rev/389ffe7befee
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.