Crash in [@ mozilla::EventTargetChainItem::HandleEventTargetChain]
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox146 | + | fixed |
| firefox147 | --- | fixed |
People
(Reporter: diannaS, Assigned: stransky)
References
(Regression)
Details
(4 keywords, Whiteboard: [tbird crash])
Crash Data
Attachments
(4 files)
Crash report: https://crash-stats.mozilla.org/report/index/85a0b761-5b54-45e6-8b11-dafd30251104
Reason:
SIGSEGV / SEGV_MAPERR
Top 1 frame:
0 libxul.so mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::Event... dom/events/EventDispatcher.cpp:493
Crash report: https://crash-stats.mozilla.org/report/index/fa118784-e5e7-4976-8716-8c77e0251112
Reason:
SIGSEGV / SEGV_MAPERR
Top 2 frames:
0 libxul.so nsCOMPtr<mozilla::dom::EventTarget>::nsCOMPtr(nsCOMPtr<mozilla::dom::EventTar... xpcom/base/nsCOMPtr.h:385
0 libxul.so mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::Event... dom/events/EventDispatcher.cpp:495
Comment 1•9 months ago
|
||
This isn't actionable without some stack.
Comment 2•8 months ago
|
||
The bug is linked to a topcrash signature, which matches the following criterion:
- Top 5 desktop browser crashes on Linux on beta
:edgar, could you consider increasing the severity of this top-crash bug?
For more information, please visit BugBot documentation.
Comment 3•8 months ago
|
||
gsvelto, the crash reports are very broken. Do you have any ideas about this?
Comment 4•8 months ago
|
||
(In reply to Dianna Smith [:diannaS] from comment #0)
Crash report: https://crash-stats.mozilla.org/report/index/fa118784-e5e7-4976-8716-8c77e0251112
Bit flip confidence is 25 for this one. (Had trouble finding the other one in the relevant view.)
Comment 5•8 months ago
|
||
It must be some kind of stack-walking issue. We get the first frame on the stack, but then the stack walker immediately stumbles upon the end of the stack. I'm leaving the NI? because I have to investigate why that could be happening.
Comment 6•8 months ago
|
||
(Bumped to S2 due to the topcrash)
Comment 7•8 months ago
|
||
I looked over the recent reports and found that some of them have more frames on the stack.
- https://crash-stats.mozilla.org/report/index/eeb2fefa-400e-45ca-a80b-c47140251118
- https://crash-stats.mozilla.org/report/index/d9811c45-243c-49d8-b7db-c39940251118
- https://crash-stats.mozilla.org/report/index/f714c0cb-8498-4d74-86e3-7763b0251118
- https://crash-stats.mozilla.org/report/index/68bfa7b0-5012-4be2-b63f-12c020251118
All of them show a long recursive call in AppWindow::Center().
Comment 8•8 months ago
|
||
The crashes mostly happen on Linux. There was a recent change in the relevant code in bug 1992198 and it also seems to match the spike in crash reports. :stransky, could the spike be something related to the changes in bug 1992198? Thanks!
| Assignee | ||
Comment 9•8 months ago
|
||
Yes, looks like so. Where is the AppWindow::Center() used? Can it be tested somehow?
Comment 11•8 months ago
|
||
BTW this explains the broken stacks: the stackwalker is starting from a frame that is already outside of the stack mapping, so the walk stops straight away as it cannot find where the stack actually is.
Comment 12•8 months ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #9)
Yes, looks like so. Where is the AppWindow::Center() used? Can it be tested somehow?
AppWindow::Center() can be used while opening a top-level chrome window with centerscreen chrome flag, one case is "Create Profile Wizard", you can open it via clicking Create a New Profile in about:profiles.
But from the crash report in comment# 7, the uptime is pretty short (less than 10 sec) and I also see XPCOMSpinEventLoopStack has AppWindow::ShowModal. So it looks like the modal window is opened pretty soon after Firefox is launched, not sure what is it, can that be "Primary Password" dialog?
| Assignee | ||
Comment 13•8 months ago
|
||
Isn't there a new "choose profile" dialog at startup?
Comment 14•8 months ago
|
||
This issue is triggered when attempting to open the developer tools in separate-window mode. (set devtools.toolbox.host to "window")
Opening the developer tools immediately and reliably causes a crash. Here's my crash report: https://crash-stats.mozilla.org/report/index/6b750483-7af4-4ae9-a439-1f62a0251121#tab-details
I got this after updating to 146.0b5.
Workaround: open about:config and set devtools.toolbox.host to bottom
Comment 16•8 months ago
|
||
Thunderbird also has this crash signature. And like bug 1999259, approx 65% are startup crashes.
| Assignee | ||
Comment 17•8 months ago
|
||
(In reply to Bala M:BalaM314 from comment #14)
This issue is triggered when attempting to open the developer tools in separate-window mode. (set devtools.toolbox.host to "window")
Opening the developer tools immediately and reliably causes a crash. Here's my crash report: https://crash-stats.mozilla.org/report/index/6b750483-7af4-4ae9-a439-1f62a0251121#tab-details
I got this after updating to 146.0b5.
Workaround: open about:config and set
devtools.toolbox.hosttobottom
Tested and can't reproduce. Can you attach your about:support page? It may be seen on particular resolution/scale.
Thanks.
Comment 18•8 months ago
|
||
The bug is linked to a topcrash signature, which matches the following criteria:
- Top 10 desktop browser crashes on nightly (startup)
- Top 5 desktop browser crashes on Linux on beta
For more information, please visit BugBot documentation.
Comment 19•8 months ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #17)
Opening the developer tools immediately and reliably causes a crash. Here's my crash report: https://crash-stats.mozilla.org/report/index/6b750483-7af4-4ae9-a439-1f62a0251121#tab-details
FWIW, in the crash report, there is monitor information, not sure if this is what you are looking for, though..
"monitors":[{"screenWidth":1920,"screenHeight":1200,"defaultCSSScaleFactor":1.25,"contentsScaleFactor":1.25}]
Comment 22•8 months ago
|
||
Comment 23•8 months ago
|
||
I had the issue, as also already described it happens when opening the dev tools. As a workaround I could resolve it, by removing the xulstore.json from my profile.
I added the xulstore.json as attachment.
I have the suspicion that the last time I opened the dev tools (when it worked) was on an external monitor. But cannot say that for sure. Here is my output configuration from my laptop:
❯ swaymsg -t get_outputs
Output eDP-1 'BOE 0x0C8E Unknown' (focused)
Current mode: 2560x1600 @ 240.000 Hz
Power: on
Position: 0,0
Scale factor: 1.250000
Comment 24•8 months ago
|
||
I further looked into it, I can reproduce it with "width": "675", in the xulstore.json of the chrome://devtools/content/framework/toolbox-window.xhtml entry.
When changing it to 1015 (which was the value, after I removed the file) I can open the dev tools without any issue.
Comment 25•8 months ago
|
||
I think the crash in bug 2002717 is not a duplicate of this bug. Perhaps my problem is also related to a certain screen resolution combined with a certain scale. Therefore, I will add more details.
All the actions listed in this bug are normally worked out without crashes. Firefox crashes only when I trying to open the 'About Firefox' window.
I have Ubuntu 25.10 with current updates. The problem started reproducing from version 146, it wasn't reproducible before. It was reproduced today on the current beta of Firefox 146.0b9-1.
https://crash-stats.mozilla.org/report/index/bp-ab8c765a-c142-4ebe-bbcc-210b40251130
I have two screens on my laptop - own laptop screen and a 4K TV. The crashes only occur on the own laptop screen. It has the following parameters:
Resolution: 1920 x 1080 (16:9)
Scale: 125 %
Fractional scaling is enabled.
I should also add that in the current beta of Thunderbird 146.0b3-4, crashes on the same screen do not occur when the "About Thunderbird" window is opened.
I'm ready to provide additional information if necessary.
| Assignee | ||
Updated•8 months ago
|
Comment 26•8 months ago
|
||
(per comment #8, move to Widget: GTK for now)
| Assignee | ||
Comment 27•8 months ago
|
||
I tried with various screen resolution but I don't see it. Tested 1920x1200@1.25 and 1920x1080@1.25. I wonder if also titlebar is a factor here. Which desktop do you run? I'm testing under Gnome / Fedora 42.
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Updated•8 months ago
|
Comment 28•8 months ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #27)
I tried with various screen resolution but I don't see it. Tested 1920x1200@1.25 and 1920x1080@1.25. I wonder if also titlebar is a factor here. Which desktop do you run? I'm testing under Gnome / Fedora 42.
I am using sway and running Firefox without a titlebar. For me at least I can reproduce the error, when I change only the width (and leave the height untouched).
Usually when I then open the debugger tools, it tries to resize it to half my screen size.
But to be honest I am not sure how the half of my screen is 1015.
I have the following gap settings:
smart_gaps on
gaps inner 3
gaps outer 0
smart_borders on
default_border pixel 2
With these settings I would assume the width to be 1014 (= 2560/2/1.25 - 10).
Note when I for example set it to another value which works (for example 615), and then open the debugger, restart Firefox, the settings are again set to "half screen size", i.e. 1015.
Can I do further things to help you debug? I will later look, if I can provide you with a more detailed stacktrace or something similar (now I have some other meetings first).
| Assignee | ||
Comment 30•8 months ago
•
|
||
Can you please try to run on terminal with MOZ_LOG="Widget:5,WidgetPopup:5" env variable, make it crash and attach the output here?
Thanks.
| Assignee | ||
Comment 31•8 months ago
•
|
||
From all the reports it looks related to 125% screen scale, environment Sway/KDE/Gnome, Wayland and various resolutions.
Comment 32•8 months ago
|
||
As the crash log became quite big, I gzipped it.
Note I had set the value in the xulstore.json to 675 and my screen was only half, as I had on the other half my terminal open.
| Reporter | ||
Updated•8 months ago
|
| Assignee | ||
Comment 33•8 months ago
|
||
Thanks. Looks like rounding error while positioning the popup:
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: nsWindow::Move to [686 x 25] scale 1.250000 scaled [857.50 x 31.25]
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: bounds 0 x 0
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: nsWindow::NativeMoveResize mLastMoveRequest [686,25] mClientMargin [0,0] move 1 resize 0 to [686,25] -> [675 x 1230]
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: nsWindow::Move to [687 x 25] scale 1.250000 scaled [858.75 x 31.25]
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: bounds 686 x 25
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: nsWindow::NativeMoveResize mLastMoveRequest [687,25] mClientMargin [0,0] move 1 resize 0 to [687,25] -> [675 x 1230]
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: nsWindow::Move to [686 x 25] scale 1.250000 scaled [857.50 x 31.25]
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: bounds 687 x 25
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: nsWindow::NativeMoveResize mLastMoveRequest [686,25] mClientMargin [0,0] move 1 resize 0 to [686,25] -> [675 x 1230]
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: nsWindow::Move to [687 x 25] scale 1.250000 scaled [858.75 x 31.25]
[Parent 37926: Main Thread]: D/Widget [7fc324d80600]: bounds 686 x 25
so we're cycling over 687 x 25 / 686 x 25 values.
| Assignee | ||
Comment 34•8 months ago
|
||
I think we need to update AppWindow::Center() to just skip if difference is +/- screen scale (1.25 is ceiled scale 2).
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Updated•8 months ago
|
| Assignee | ||
Comment 36•8 months ago
|
||
Updated•8 months ago
|
Comment 37•8 months ago
|
||
The bug is marked as tracked for firefox146 (beta). However, the bug still has low priority.
:jstutte, could you please increase the priority for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
Updated•8 months ago
|
Comment 38•8 months ago
|
||
Comment 39•8 months ago
|
||
| bugherder | ||
Updated•8 months ago
|
Updated•8 months ago
|
Comment 41•8 months ago
|
||
Copying crash signatures from duplicate bugs.
| Reporter | ||
Comment 42•8 months ago
|
||
:stransky do you think this is low risk to uplift to the next planned dot release or should it ride the 147 train?
| Assignee | ||
Comment 44•7 months ago
|
||
Comment on attachment 9530802 [details]
Bug 1998188 Allow only one recursion of AppWindow::Center() r?emilio
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: Crashes on window centering on some screen sizes.
- Is this code covered by automated tests?: No
- 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): We restrict maximal recursion for re-center.
- String changes made/needed:
- Is Android affected?: Yes
Updated•7 months ago
|
| Reporter | ||
Comment 47•7 months ago
|
||
:stransky this doesn't cherry-pick cleanly to release (missing changes that were done in bug 1999619). Does bug 1999619 need to be uplifted as well? If not, could you submit a rebased patch for release? thank you!
| Assignee | ||
Comment 48•7 months ago
|
||
Yes, it should apply to release cleanly.
| Reporter | ||
Comment 49•7 months ago
|
||
Comment on attachment 9530802 [details]
Bug 1998188 Allow only one recursion of AppWindow::Center() r?emilio
Approved for 146.0.1 dot release
Comment 50•7 months ago
|
||
| uplift | ||
| Reporter | ||
Updated•7 months ago
|
Comment 54•7 months ago
|
||
Copying crash signatures from duplicate bugs.
Description
•