Open Bug 1688184 Opened 3 years ago Updated 3 years ago

`AccessibleCaretManager::DragCaretInternal` sometimes fails but the error is ignored

Categories

(Core :: DOM: Selection, defect)

defect

Tracking

()

People

(Reporter: mbrodesser-Igalia, Unassigned)

References

(Blocks 1 open bug)

Details

STR:

  1. Change https://searchfox.org/mozilla-central/rev/358fbca0398ac651f5ea6030be39b1870ec180a5/layout/base/AccessibleCaretManager.cpp#500

to

  {
    const nsresult dragCaretInternalResult = DragCaretInternal(aPoint);
    MOZ_ASSERT(!NS_FAILED(dragCaretInternalResult));
  }
  1. Enable the AccessibleCaret: flip layout.accessiblecaret.enabled and layout.accessiblecaret.hide_carets_for_mouse_input.

  2. Open https://www.w3schools.com/html/html_tables.asp.

  3. Randomly select text, preferably across multiple elements and randomly move the first or the second raindrop-caret.

Expected:
assertion not violated or proper error-handling for that case.

Actual:
assertion violated, error ignored. Backtrace:

(gdb) bt
#0  0x00007fffe355e204 in mozilla::AccessibleCaretManager::DragCaret(nsPoint const&) (this=0x7fffb1da2d80, aPoint=...)
    at /home/mirko/src/firefox/gecko2/layout/base/AccessibleCaretManager.cpp:538
#1  0x00007fffe35cbb1c in mozilla::AccessibleCaretEventHub::DragCaretState::OnMove(mozilla::AccessibleCaretEventHub*, nsPoint const&, mozilla::WidgetMouseEvent::Reason) (this=0x7fffecdebf90 <mozilla::AccessibleCaretEventHub::DragCaretState()::singleton>, aContext=0x7fffa4fc3820, aPoint=..., aReason=mozilla::WidgetMouseEvent::eReal) at /home/mirko/src/firefox/gecko2/layout/base/AccessibleCaretEventHub.cpp:159
#2  0x00007fffe355a207 in mozilla::AccessibleCaretEventHub::HandleMouseEvent(mozilla::WidgetMouseEvent*) (this=0x7fffa4fc3820, aEvent=
    0x7fffffffaf98) at /home/mirko/src/firefox/gecko2/layout/base/AccessibleCaretEventHub.cpp:464
#3  0x00007fffe3559df4 in mozilla::AccessibleCaretEventHub::HandleEvent(mozilla::WidgetEvent*) (this=0x7fffa4fc3820, aEvent=0x7fffffffaf98)
    at /home/mirko/src/firefox/gecko2/layout/base/AccessibleCaretEventHub.cpp:411
#4  0x00007fffe3594a48 in mozilla::PresShell::EventHandler::MaybeHandleEventWithAccessibleCaret(nsIFrame*, mozilla::WidgetGUIEvent*, nsEventStatus*) (this=0x7fffffffacd0, aFrameForPresShell=0x7fffb2086020, aGUIEvent=0x7fffffffaf98, aEventStatus=0x7fffffffadb4)
    at /home/mirko/src/firefox/gecko2/layout/base/PresShell.cpp:7365
#5  0x00007fffe359457f in mozilla::PresShell::EventHandler::HandleEvent(nsIFrame*, mozilla::WidgetGUIEvent*, bool, nsEventStatus*) (this=0x7fffffffacd0, aFrameForPresShell=0x7fffb2086020, aGUIEvent=0x7fffffffaf98, aDontRetargetEvents=false, aEventStatus=0x7fffffffadb4)
    at /home/mirko/src/firefox/gecko2/layout/base/PresShell.cpp:6880
#6  0x00007fffe35938c0 in mozilla::PresShell::HandleEvent(nsIFrame*, mozilla::WidgetGUIEvent*, bool, nsEventStatus*) (this=
    0x7fffb237d000, aFrameForPresShell=0x7fffb2086020, aGUIEvent=0x7fffffffaf98, aDontRetargetEvents=false, aEventStatus=0x7fffffffadb4)
    at /home/mirko/src/firefox/gecko2/layout/base/PresShell.cpp:6833
#7  0x00007fffe3086d91 in nsViewManager::DispatchEvent(mozilla::WidgetGUIEvent*, nsView*, nsEventStatus*) (this=0x7fffb2371fc0, aEvent=0x7fffffffaf98, aView=0x7fffb236b300, aStatus=0x7fffffffadb4) at /home/mirko/src/firefox/gecko2/view/nsViewManager.cpp:748
#8  0x00007fffe3086add in nsView::HandleEvent(mozilla::WidgetGUIEvent*, bool) (this=0x7fffb236b300, aEvent=0x7fffffffaf98, aUseAttachedEvents=true) at /home/mirko/src/firefox/gecko2/view/nsView.cpp:1133
#9  0x00007fffe3179472 in nsWindow::DispatchEvent(mozilla::WidgetGUIEvent*, nsEventStatus&) (this=0x7fffd0e51c00, aEvent=0x7fffffffaf98, aStatus=@0x7fffffffae94: nsEventStatus_eIgnore) at /home/mirko/src/firefox/gecko2/widget/gtk/nsWindow.cpp:602
#10 0x00007fffe30a4722 in nsBaseWidget::DispatchInputEvent(mozilla::WidgetInputEvent*) (this=0x7fffd0e51c00, aEvent=0x7fffffffaf98)
    at /home/mirko/src/firefox/gecko2/widget/nsBaseWidget.cpp:1157
#11 0x00007fffe3189a62 in nsWindow::OnMotionNotifyEvent(_GdkEventMotion*) (this=0x7fffd0e51c00, aEvent=0x7fff9802cac0)
    at /home/mirko/src/firefox/gecko2/widget/gtk/nsWindow.cpp:3379
#12 0x00007fffe3192c2f in motion_notify_event_cb(_GtkWidget*, _GdkEventMotion*) (widget=0x7fffbcbb5e60, event=0x7fff9802cac0)
    at /home/mirko/src/firefox/gecko2/widget/gtk/nsWindow.cpp:6750

Corresponding Try run. Not finished yet, but up to now, no test violates that assertion.

Summary: `AccessiblCaretManager::DragCaretInternal`s sometimes fails but the error is ignored → `AccessibleCaretManager::DragCaretInternal`s sometimes fails but the error is ignored
Summary: `AccessibleCaretManager::DragCaretInternal`s sometimes fails but the error is ignored → `AccessibleCaretManager::DragCaretInternal` sometimes fails but the error is ignored
You need to log in before you can comment on or make changes to this bug.