Closed Bug 1797464 Opened 2 years ago Closed 2 years ago

Crash in [@ mozilla::gfx::FeatureState::Instance::IsInitialized]

Categories

(Core :: Graphics, defect)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
relnote-firefox --- 106+
firefox-esr102 --- unaffected
firefox106 + fixed
firefox107 + fixed
firefox108 + fixed

People

(Reporter: aryx, Assigned: sotaro)

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

~260 crashes from 220 installations of Firefox 106.0 and 106.0.1, all on Windows. No crashes for earlier versions.

Occlusion is mentioned in the stack. sotaro, could you take a look at these crashes? Thank you in advance.

Crash report: https://crash-stats.mozilla.org/report/index/88df4472-86b4-48d3-b5f4-d56620221025

Reason: EXCEPTION_ACCESS_VIOLATION_READTop 10 frames of crashing thread:

0  xul.dll  mozilla::gfx::FeatureState::Instance::IsInitialized const  gfx/config/gfxFeature.h:134
0  xul.dll  mozilla::gfx::FeatureState::IsInitialized const  gfx/config/gfxFeature.h:121
0  xul.dll  mozilla::gfx::FeatureState::IsEnabled const  gfx/config/gfxFeature.cpp:17
0  xul.dll  mozilla::gfx::gfxConfig::IsEnabled  gfx/config/gfxConfig.cpp:25
1  xul.dll  nsWindow::MaybeEnableWindowOcclusion  widget/windows/nsWindowGfx.cpp:407
1  xul.dll  nsWindow::DestroyCompositor  widget/windows/nsWindowGfx.cpp:458
2  xul.dll  nsWindow::Destroy  widget/windows/nsWindow.cpp:1273
3  xul.dll  mozilla::AppWindow::Destroy  xpfe/appshell/AppWindow.cpp:659
4  xul.dll  mozilla::AppWindow::~AppWindow  xpfe/appshell/AppWindow.cpp:154
5  xul.dll  mozilla::AppWindow::Release  xpfe/appshell/AppWindow.cpp:162
Flags: needinfo?(sotaro.ikeda.g)

I take the bug.

Flags: needinfo?(sotaro.ikeda.g)
Assignee: nobody → sotaro.ikeda.g
Severity: -- → S2

Sotaro, given that this is a startup crash, I would probably take a patch in a 106 dot release if we find a fix, ideally before we hit RC week for 107.

On nightly, majority of crashes seemed to happen in nsAppShellService::JustCreateTopWindow() like the following.

When the crash happened, AppWindow was destroyed in nsAppShellService::JustCreateTopWindow(). The JustCreateTopWindow() seemed to return early at NS_ENSURE_SUCCESS() or NS_ENSURE_TRUE().

If first AppWindow is destroyed in nsAppShellService::JustCreateTopWindow() because of error, the first window could be destroyed before calling gfxConfig::Init().

gfxConfig::Init() is called from gfxPlatform::GetPlatform(). gfxPlatform::GetPlatform() is called just before creating compositor by nsBaseWidget::CreateCompositor()

And during destroying the AppWindow, nsWindow::Destroy() is called. Then it calls nsWindow::DestroyCompositor(). gfxConfig::IsEnabled() is called be before gfxConfig::Init().

Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a8858873d38b Enable/disable window occlusion only when compositor session exists on Windows r=gfx-reviewers,lsalzman
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch

Sotaro, could you request uplift for beta and release please? If it proves to work in 107 beta 7 we may still have time to ship it in a 106 dot release next week. Thanks.

Flags: needinfo?(sotaro.ikeda.g)

Lee, could you request uplift? Thanks

Flags: needinfo?(lsalzman)

Comment on attachment 9300485 [details]
Bug 1797464 - Enable/disable window occlusion only when compositor session exists on Windows

Beta/Release Uplift Approval Request

  • User impact if declined: startup crash could happen when Firefox fails to start.
  • 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 patch just add mCompositorSession check.
  • String changes made/needed: none
  • Is Android affected?: No
Flags: needinfo?(sotaro.ikeda.g)
Attachment #9300485 - Flags: approval-mozilla-release?
Attachment #9300485 - Flags: approval-mozilla-beta?
Flags: needinfo?(lsalzman)

Comment on attachment 9300485 [details]
Bug 1797464 - Enable/disable window occlusion only when compositor session exists on Windows

Approved for 107.0b7.

Attachment #9300485 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9300485 [details]
Bug 1797464 - Enable/disable window occlusion only when compositor session exists on Windows

Approved for 106.0.3, thanks.

Attachment #9300485 - Flags: approval-mozilla-release? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: