Closed Bug 1746170 Opened 3 years ago Closed 3 years ago

Crash in [@ nsWindow::RequestFocusWaylandWindow]

Categories

(Core :: Widget: Gtk, defect)

Firefox 97
defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox95 --- unaffected
firefox96 --- unaffected
firefox97 --- fixed

People

(Reporter: calixte, Assigned: stransky)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: crash, regression)

Crash Data

Attachments

(2 files)

Maybe Fission related. (DOMFissionEnabled=1)

Crash report: https://crash-stats.mozilla.org/report/index/8af725c2-eb8a-4331-9b1a-7ee000211215

Reason: SIGSEGV / SEGV_MAPERR

Top 10 frames of crashing thread:

0 libxul.so nsWindow::RequestFocusWaylandWindow widget/gtk/nsWindow.cpp:2890
1 libxul.so nsWindow::SetFocus widget/gtk/nsWindow.cpp:2980
2 libxul.so nsFocusManager::RaiseWindow dom/base/nsFocusManager.cpp:2986
3 libxul.so nsGlobalWindowOuter::FocusOuter dom/base/nsGlobalWindowOuter.cpp:5149
4 libxul.so mozilla::dom::Window_Binding::focus dom/bindings/WindowBinding.cpp:2038
5 libxul.so bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::CrossOriginThisPolicy, mozilla::dom::binding_detail::ThrowExceptions> dom/bindings/BindingUtils.cpp:3306
6 libxul.so Interpret js/src/vm/Interpreter.cpp:3243
7 libxul.so js::Call js/src/vm/Interpreter.cpp:552
8 libxul.so JS_CallFunctionValue js/src/vm/CallAndConstruct.cpp:53
9 libxul.so nsXPCWrappedJS::CallMethod js/xpconnect/src/XPCWrappedJSClass.cpp:973

There are 2 crashes (from 1 installation) in nightly 97 with buildid 20211214213409. In analyzing the backtrace, the regression may have been introduced by patch [1] to fix bug 1745590.

[1] https://hg.mozilla.org/mozilla-central/rev?node=56ddd953cd1c

Flags: needinfo?(stransky)

There may be two reasons for the crash:

  • gFocusWindow is destroyed so gFocusWindow->mShell is null
  • gtk_widget_get_window(gFocusWindow->mShell) returned null so it's not visible.
Flags: needinfo?(stransky)
Assignee: nobody → stransky
Status: NEW → ASSIGNED
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/8a19f480cdfc [Wayland] Check gFocusWindow visibility before we request xdg-activation, r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
No longer blocks: 1745590

The current build still crashes with the same signature. The STR is the same as in Bug 1745590. I don't have permissions to reopen the report.

Flags: needinfo?(stransky)

Is there any reproduction steps for it? Can you attach crash ID for that?
Thanks.

Status: RESOLVED → REOPENED
Flags: needinfo?(stransky) → needinfo?(tgnff242)
Resolution: FIXED → ---

Yes, here you are:

STR:

  1. Start Firefox in native Wayland.
  2. Bring up the file picker (Ctrl + O).
  3. Select a file to open.

Crash report on build 20211216094142 : https://crash-stats.mozilla.org/report/index/bp-94e08066-1b76-4e48-a731-d46600211216

I'm using KWin, in case it's important.

Flags: needinfo?(tgnff242)
Flags: needinfo?(stransky)

Hm, I can reproduce it with testsuite locally unde KDE:
MOZ_ENABLE_WAYLAND=1 ./mach mochitest toolkit/components/aboutconfig/test/browser/browser_clipboard.js

Flags: needinfo?(stransky)
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/c96dbabcb718 [Wayland] Really return from RequestFocusWaylandWindow when we're missing gFocusWindow r=emilio
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: