Crash in [@ nsBaseWidget::Release]
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
People
(Reporter: gsvelto, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: crash)
Crash Data
Crash report: https://crash-stats.mozilla.org/report/index/35061711-902b-4874-ac58-f418e0220109
Reason: SIGSEGV / SEGV_MAPERR
Top 10 frames of crashing thread:
0 libxul.so nsBaseWidget::Release /usr/src/debug/firefox-95.0-1.fc35.x86_64/widget/nsBaseWidget.cpp:137
1 libxul.so std::_Function_handler<void
2 libxul.so moz_container_wayland_clear_initial_draw_callback
3 libxul.so moz_container_wayland_unmap
4 libgobject-2.0.so.0 g_signal_emit_valist /usr/src/debug/glib2-2.70.2-1.fc35.x86_64/gobject/gsignal.c:3406
5 libgobject-2.0.so.0 g_signal_emit /usr/src/debug/glib2-2.70.2-1.fc35.x86_64/gobject/gsignal.c:3553
6 libgtk-3.so.0 gtk_widget_unmap /usr/src/debug/gtk3-3.24.30-4.fc35.x86_64/gtk/gtkwidget.c:5081
7 libgobject-2.0.so.0 g_closure_invoke /usr/src/debug/glib2-2.70.2-1.fc35.x86_64/gobject/gclosure.c:830
8 libgobject-2.0.so.0 signal_emit_unlocked_R /usr/src/debug/glib2-2.70.2-1.fc35.x86_64/gobject/gsignal.c:3672
9 libgobject-2.0.so.0 g_signal_emit_valist /usr/src/debug/glib2-2.70.2-1.fc35.x86_64/gobject/gsignal.c:3497
Looking at the stack this appears like it might be a Wayland-specific issue. Going up several frames one always finds an invocation to nsWindow::HideWaylandWindow(). This seems to be mainly happening on Fedora but we have Ubuntu crashes on file too.
Updated•4 years ago
|
Comment 1•4 years ago
|
||
This comes from popup code but the backtrace is not very clear why nsBaseWidget::Release() is called on unmap. The stack looks wrong to me from moz_container_wayland_clear_initial_draw_callback() point.
Comment 2•4 years ago
|
||
Comment 3•4 years ago
|
||
I don't quite understand how we can get:
0 nsBaseWidget::Release()
1 std::_Function_handler<void (), nsWindow::EnableRenderingToWindow()::$_3>::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation)
(2 moz_container_wayland_clear_initial_draw_callback(_MozContainer*))
3 moz_container_wayland_unmap(_GtkWidget*)
| Reporter | ||
Comment 4•4 years ago
|
||
Yeah, that stack is really odd. However looking up we're capturing this in this lambda expression. Is it possible that we're getting the reference count wrong and the nsWindow object is being released when leaving the lamda function call?
Comment 5•4 years ago
|
||
I see. I think the scenario may be:
- we call EnableRenderingToWindow() and take refcount of nsWindow to lambda registered in initial_draw_callback()
- we clear all draw callbacks without calling them (by moz_container_wayland_clear_initial_draw_callback()).
- is the refcount taken in 1) cleared or not?
Comment 6•4 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #5)
I see. I think the scenario may be:
- we call EnableRenderingToWindow() and take refcount of nsWindow to lambda registered in initial_draw_callback()
- we clear all draw callbacks without calling them (by moz_container_wayland_clear_initial_draw_callback()).
- is the refcount taken in 1) cleared or not?
So yes, the references are cleared as expected.
| Reporter | ||
Comment 7•4 years ago
|
||
Could the refcount have been decremented somewhere else?
Comment 8•4 years ago
|
||
Hard to say. But this is Wayland (recently untested by testsuite) so I hope to catch this a similar ones when we enable Wayland testing (Bug 1725245).
Comment 9•4 years ago
|
||
I'd say it's dupe of Bug 1756789.
Description
•