| Summary: | [GTK] Kinetic scrolling intermittently stops | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Kdwk <kdwkleung> | ||||||||
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
| Status: | NEW --- | ||||||||||
| Severity: | Normal | CC: | alicem, bugs-noreply, cgarcia, mcatanzaro, nekohayo | ||||||||
| Priority: | P2 | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Linux | ||||||||||
| Attachments: |
|
||||||||||
I have discovered that when kinetic scrolling abruptly stops, it is usually accompanied by this output in the terminal: (epiphany:4229): Gdk-CRITICAL **: 11:46:11.568: gdk_event_get_modifier_state: assertion 'GDK_IS_EVENT (event)' failed (epiphany:4229): Gdk-CRITICAL **: 11:46:11.568: gdk_event_get_time: assertion 'GDK_IS_EVENT (event)' failed Can you please set the environment variable G_DEBUG=fatal-criticals and attach a backtrace to the first critical? $ flatpak run --env=G_DEBUG=fatal-criticals ... Interestingly, I still get abrupt stops to kinetic scrolling but not these terminal outputs on my desktop, only my MacBook. I’ll try to get a back trade there Created attachment 468216 [details]
coredumpctl gdb output.txt
:(
Did you install org.gnome.Sdk.Debug and org.gnome.Epiphany.Debug? It was not a Flatpak. I was using the repo version because the Flatpak one has its own stock Mesa which doesn't support hardware acceleration on Apple Silicon yet. However, I have already performed `debuginfo-install epiphany` When you open the core dump in gdb, it should give you a long list of debuginfo packages to install. Created attachment 468301 [details]
gdb (bt full; c) output.txt
I have finally caught it.
#25 0x00007ffff72b165e in gtk_widget_event (widget=widget@entry=0x555557088fd0 [EphyWebView], event=event@entry=0x5555576789d0 [GdkScrollEvent], target=target@entry=0x5555575ece70 [WebKitWebViewBase]) at ../gtk/gtkwidget.c:4775
return_val = <optimized out>
x = 4.6355722553119971e-310
y = 0
Presumably the x value is messed up? I guess this means "scroll horizontally, but only an infinitesimally tiny distance"?
#9 0x00007ffff3080904 in webkitWebViewBaseSynthesizeWheelEvent(_WebKitWebViewBase*, double, double, int, int, WheelEventPhase, WheelEventPhase, bool) (webViewBase=0x3c0, deltaX=6.9533558071543795e-310, deltaY=6.9533482728850466e-310, x=1, y=0, phase=7, momentumPhase=WheelEventPhase::NoPhase, hasPreciseDeltas=<optimized out>) at /buildstream/gnome/sdk/webkitgtk-6.0.bst/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp:3347
OK, so not only are the scroll deltas messed up, but somehow webViewBase=0x3c0 which indicates memory corruption because we know the actual WebKitWebViewBase is at 0x555557088fd0 due to the other frames of the stack.
PageClientImpl contains a non-weak raw pointer to the viewWidget (the WebKitWebViewBase). Somehow that must have been corrupted, but how?
valgrind could catch this, but running Epiphany under valgrind for long enough to reproduce the bug is surely not practical. asan could work too, but then you'd have to figure out how to build with asan enabled, which is not easy.
How do I run Epiphany with valgrind? Ah I just tried to do that and the app is not usable I think I found a way to reliably reproduce this critical. Scroll down then swipe very slightly to the right as if doing the backward history swipe, then release. Under G_DEBUG=fatal-criticals this crashes the app every time with the same error message and backtrace. However, I have noticed that sometimes touchpad scrolling stops intermittently without triggering this critical. In that case I think it is still having the same problem of recognizing a very small horizontal delta as the history swipe gesture, and because you cannot do history swipe and vertical scroll at the same time, halt the vertical scroll. The problem with this theory is, in Spidey without back/ forward history swipe one, this issue still persists. |
Created attachment 465534 [details] Screencast showing kinetic scrolling abruptly stopping every few scrolls When using a touchpad to scroll websites, kinetic scrolling randomly stops working (i.e. scrolls fail to carry momentum and comes to an abrupt halt). This can be observed in all websites and all versions of WebKitGTK.