atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.64k stars 404 forks source link

Consistent Hang With `search-auto-complete t` #3401

Closed brosasaki closed 5 days ago

brosasaki commented 1 month ago

Describe the bug Nyxt hangs consistently on URL/Search prompt in certain states Precise recipe to reproduce the issue Browse to different websites using C-l or M-l. After visiting 2-5 sites, Nyxt will hang while inputting the url/query and will have to be killed with pkill -1. Restarting Nyxt will restore the state, and will no longer be hanged, but trying again to input a url will hang after an inconsistent number of characters input. Killing the buffer fixes the issue, even if you return to the same website. I can provide the VM image or other state data on request.

Information

ASDF version: 3.3.5 ASDF registries: (NYXT-SOURCE-REGISTRY ENVIRONMENT-SOURCE-REGISTRY USER-SOURCE-REGISTRY USER-SOURCE-REGISTRY-DIRECTORY DEFAULT-USER-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY SYSTEM-SOURCE-REGISTRY-DIRECTORY DEFAULT-SYSTEM-SOURCE-REGISTRY) Critical dependencies: (/gnu/store/q3cxhqk68mqj5n5g2x3dpl2f4la5vzy2-sbcl-cl-cffi-gtk-3.8.8-3.1700fe6/share/common-lisp/sbcl/cl-cffi-gtk/gtk/cl-cffi-gtk.asd /gnu/store/5953s2h5cpb7llq2ip3zmv4yk6yxm6zn-cl-gobject-introspection-0.3-3.83beec4/share/common-lisp/source/cl-gobject-introspection/cl-gobject-introspection.asd /gnu/store/lm2nh1cz60jgkx4anzf3bk93cyn3azld-sbcl-cl-webkit-3.5.10/share/common-lisp/sbcl/cl-webkit/webkit2/cl-webkit2.asd)

Guix version:

**Output when started from a shell**

Nyxt version 3.11.6

[16:43:46] Source location: #P"/gnu/store/b145cfpjzsj2a6f7vwsrxkmaznp5606y-nyxt [16:43:46] Loading Lisp file #P"/home/andrewwong/.config/nyxt/auto-config.3.lis [16:43:46] Loading Lisp file #P"/home/andrewwong/.config/nyxt/config.lisp". [16:43:46] Listening to socket: #P"/run/user/1000/nyxt/nyxt.socket" ** (nyxt:12514): WARNING **: 16:43:47.040: Disabled hardware acceleration because GTK (process:2): Gtk-WARNING **: 20:43:48.406: Locale not supported by C library. Using the fallback 'C' locale. (process:2): Gtk-WARNING **: 20:43:48.989: Locale not supported by C library. Using the fallback 'C' locale. [16:43:49] Loading #P"/home/andrewwong/.local/share/nyxt/history/default.lisp". [16:43:49] Restoring 1 buffer from history. [16:43:49] Loading #P"/home/andrewwong/.local/share/nyxt/auto-rules.lisp". [16:43:49] Loading #P"/home/andrewwong/.local/share/nyxt/hostlist-stevenblack.txt". (process:2): Gtk-WARNING **: 20:43:52.002: Locale not supported by C library. Using the fallback 'C' locale. [16:43:52] Warning: Error while processing the "nyxt:" URL: There is no applicable method for the generic function #<STANDARD-GENERIC-FUNCTION NYXT:STYLE (17)> when called with arguments (NIL). See also: The ANSI Standard, Section 7.6.6 (process:2): Gtk-WARNING **: 20:43:52.499: Locale not supported by C library. Using the fallback 'C' locale. [16:43:53] Loading "https://savannah.gnu.org/mail/?group=guix". [16:43:53] Finished loading "https://savannah.gnu.org/mail/?group=guix". Gdk-Message: 16:43:55.754: Unable to load pointer from the cursor theme Gdk-Message: 16:43:55.755: Unable to load pointer from the cursor theme [...] [There are no consistent final messages before the crash.] ```
brosasaki commented 1 month ago

EDIT: I’ve found that setting search-auto-complete-p nil in the context-buffer configuration is a work-around for the issue, for now.

aadcg commented 1 month ago

@brosasaki thanks for reporting.

It seems that after 36589e3d622c510df40baf6e4fd8b0bffa644a71, 8b00a2f8cf839c1dfe007b84b2df80456afc39a4 and 14dac1e88 we still got it wrong. @shamazmazum, @jmercouris can you reproduce the reported issue?

It may be that the feature was poorly designed from its inception (from 8887a7e64b6c281e74a163835b865d92fdd9dd4c) and we're trying to fix a house made of sand.

We should probably do it from scratch and set search-auto-complete-p to nil by default in the mean time.

jmercouris commented 1 month ago

Maybe. I'll have to look. In the interim, I'm more than happy to default to nil for this option.

shamazmazum commented 1 month ago

@aadcg I do not have this issue because I run nyxt with

(define-configuration context-buffer
  ((search-always-auto-complete-p nil)))

in the config :) I'll test it without this setting later. Not sure if search-auto-complete-p is the same as search-always-auto-complete-p.

shamazmazum commented 1 month ago

I cannot reproduce it. Navigation seems to be working fine and nyxt does not hang up.

aadcg commented 1 month ago

@shamazmazum did you test against the master branch or the 3.11.6 tag? Note that your PR #3385 will be part the next release. Regardless, it shouldn't make any difference since, if I recall correctly, the changes are orthogonal to the issue at hand.

I can't reproduce it as well. We should resort to the suggestion above if the issue is reproducible.

shamazmazum commented 1 month ago

@aadcg I tested against 3.11.6, but with those changes cherry-picked.

aadcg commented 5 days ago

Although not reproducible, let's keep this piece of information in the back of our heads.

Should anyone experience hangs, they could follow the tip and set search-auto-complete to nil.