Closed Bug 1736795 Opened 3 years ago Closed 3 years ago

[Linux] nsWindow::GetTitlebarRect() crashes on SW-WR

Categories

(Core :: Widget: Gtk, defect, P2)

defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

Details

Attachments

(2 files)

SW-WR crashes because nsWindow::GetTitlebarRect() is called from Render thread:

#8 0x00007ff29e717a20 in <signal handler called> () at /lib64/libpthread.so.0
#9 0x00007ff28c20a8d8 in mozilla::IsInServoTraversal() () at /raid/src3/objdir/dist/include/mozilla/ServoUtils.h:33
#10 0x00007ff28c1596b9 in mozilla::ServoStyleSet::IsInServoTraversal() () at /raid/src3/objdir/dist/include/mozilla/ServoStyleSet.h:103
#11 0x00007ff28c166c7f in mozilla::Preferences::InitStaticMembers() () at /raid/src3/modules/libpref/Preferences.cpp:3464
#12 0x00007ff28c1f9257 in mozilla::Internals::GetPrefValue<int*&>(char const*, int*&, mozilla::PrefValueKind)
(aPrefName=0x7ff287d0f214 <sFloatPrefs+148> "ui.titlebarRadius", aResult=@0x7ff2530f9a20: 0x7ff2530f9a8c, aKind=mozilla::PrefValueKind::User)
at /raid/src3/modules/libpref/Preferences.cpp:4439
#13 0x00007ff28c15b4b8 in mozilla::Preferences::GetInt(char const*, int*, mozilla::PrefValueKind)
(aPrefName=0x7ff287d0f214 <sFloatPrefs+148> "ui.titlebarRadius", aResult=0x7ff2530f9a8c, aKind=mozilla::PrefValueKind::User) at /raid/src3/modules/libpref/Preferences.cpp:4756
#14 0x00007ff291fe4767 in nsXPLookAndFeel::GetFloatValue(mozilla::LookAndFeel::FloatID, float&)
(this=0x7ff26fca7d00, aID=mozilla::LookAndFeel::FloatID::TitlebarRadius, aResult=@0x7ff2530f9af4: -nan(0x7fffff)) at /raid/src3/widget/nsXPLookAndFeel.cpp:893
#15 0x00007ff291fe5e23 in mozilla::LookAndFeel::GetFloat(mozilla::LookAndFeel::FloatID, float*) (aID=mozilla::LookAndFeel::FloatID::TitlebarRadius, aResult=0x7ff2530f9af4)
at /raid/src3/widget/nsXPLookAndFeel.cpp:1196
#16 0x00007ff291fa3286 in mozilla::LookAndFeel::GetFloat(mozilla::LookAndFeel::FloatID, float) (aID=mozilla::LookAndFeel::FloatID::TitlebarRadius, aDefault=0)
at /raid/src3/objdir/dist/include/mozilla/LookAndFeel.h:473
#17 0x00007ff292013b45 in nsWindow::GetTitlebarRadius() (this=0x7ff29df70c00) at /raid/src3/widget/gtk/nsWindow.cpp:6106
#18 0x00007ff292014610 in nsWindow::GetTitlebarRect() (this=0x7ff29df70c00) at /raid/src3/widget/gtk/nsWindow.cpp:6362
#19 0x00007ff29203135e in mozilla::widget::GtkCompositorWidget::GetTransparentRegion() (this=0x7ff24cc99340) at /raid/src3/widget/gtk/GtkCompositorWidget.cpp:137

Summary: [Linux] Don't crash on SW-WR → [Linux] nsWindow::GetTitlebarRect() crashes on SW-WR

Titlebar radius is exported as integer from Gtk so there's no need to use floats here.

Use fixed titlebar height at nsWindow::GetTitlebarRect(). It's used by SW-WR only and to get transparent area of titlebar.
In such limited use case it isn't worth implementing multi-thread getter for it.

Depends on D128993

Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/768c4463b2d8 [Linux] Export titlebar radius as int from LookAndFeel, r=emilio https://hg.mozilla.org/integration/autoland/rev/e87e1d1a429d [Linux] Use fixed height of titlebar transparent area r=emilio
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: