qutebrowser / qutebrowser

A keyboard-driven, vim-like browser based on Python and Qt.
https://www.qutebrowser.org/
GNU General Public License v3.0
9.46k stars 1.01k forks source link

[Regression][Bisected] Alt + number does not switch tabs back and forth #8169

Open Hi-Angel opened 2 months ago

Hi-Angel commented 2 months ago

Version info:

qutebrowser v3.1.0
Git commit:
Backend: QtWebEngine 6.7, based on Chromium 118.0.5993.220 (from api)
Qt: 6.7.0

Does the bug happen if you start with --temp-basedir?: yes

Description

Some time earlier I noticed that I no longer can switch back and forth between two last tabs by pressing Alt with a number of either of them.

I just started digging into it and bisected this down to a number of commits.

Unfortunately these commits apparently haven't been tested, because each one of them either fails or crashes the browser whatsoever. So the code is not bisectable any further than that:

There are only 'skip'ped commits left to test.
The first bad commit could be any of:
236371cb1db6cc2e525a80495602d30845534ec0
75188fb257fe3e9b4d88ef49b53fb8c9e4a82d6e
5e26fa922b21f026d2660f7c2408452ffeba9623
cedca4737003e9f3f153b6df5b51f43dc80f73cc
76f9262defc0217289443467927cab7c211aff73
894acbd6f7e9c47cbaf3824ed96e04e9d0d8c9db
8011eb4b49bc7c586df211c396c8004a787aa494
96c303823f6084266afc52041c1bae26e57140d2
49d840a9233f3b4b6427d4cb26cd454cfd0de189
8031abd5ad27b60cba37298ae56f9838b52c39a5
bcfa99d1e644de260eb3c689f31aeba00d193e89
f0972704a785029568c6ea36b76bad53fd479a6d
3ef3bac01d591c7ff9f86309f0607c9f81b71dca
d734101d9ae2b43ff58769268e5ea7283ec8cfcb
e2537e4ed1a824ce98e35ca9f460cea5135d86d3
fcd1a7bbb1d7d252180738958e914104c5837678
0877fb0d78635692e481c8bde224fac5ad0dd430
aced2c47ae64a490855e7d79486273c56a0a916b
a11f1d34d3784b170fbc3f5a0e04d5c96ab06b74
fce306d5f184f185b660f35ec2808b6745d57520
3e21c8214a998cb1058defd15aabb24617a76402
5ebfee1f420dabc67fa1e5ee1ddad5b946ddea62
d47cfd99d7374a41b4c228c21221c7850e65d0b1
f6e1235421c0d23656cc0230dbd6640f089f3542
6cac151ad9c6d25085c900eca50a0c391baf0433
f8520b0a768aa8e30904d74e1f0d8d4d79bbd98a
ec8e5af4dd691a2fdb2bfed5bf1e45f2aa57be1e
We cannot bisect more!

How to reproduce

  1. Run ./qutebrowser.py --temp-basedir
  2. Open 2-nd tab
  3. Start pressing Alt+2

Expected

The browser switches between 1-st and 2-nd tab

Actual

The browser switches to 2nd tab just once, and nothing happens anymore.

Hi-Angel commented 2 months ago

That's so weird to see the commits being dated by 2022, whereas I'm certain it is not that old, I would say I only noticed it maybe a few months ago or so…

But FTR, I didn't botch the bisection: I repeated it (this time even in a different way: by checking out good/bad commits along the main branch whereas the post was done by using stable branches as good/bad points), and I came to the exact same commits list.

The-Compiler commented 2 months ago

Works fine for me. The bisect is misleading, those commits just reflect you switching from Qt 5 to Qt 6. If you run with --qt-wrapper pyqt5 it will probably work fine on main too.

This might just be a duplicate of #8127 I think, and the breakage was probably introduced by you upgrading to Qt 6.6.2 or maybe Qt 6.7?

Hi-Angel commented 2 months ago

The bisect is misleading, those commits just reflect you switching from Qt 5 to Qt 6. If you run with --qt-wrapper pyqt5 it will probably work fine on main too.

Oh, I confirm, running with a --qt-wrapper PyQt5 fixes the problem!

This might just be a duplicate of #8127 I think

Well, from the description I am not so sure… It seems to be about the default behavior of a keybinding being changed. But you know the code better, so if you think the underlying reason is the same, maybe so.

and the breakage was probably introduced by you upgrading to Qt 6.6.2 or maybe Qt 6.7?

Hmm, it is possible. I'm kind of afraid of downgrading it, something might break… but it does sound plausible, given you've recently fixed another bug that was related to Qt regression as well…

Works fine for me.

What Qt version do you have?

Hi-Angel commented 2 weeks ago

The problem is fixed after upgrade. Not sure what fixed (QtWebEngine update or the Qutebrowser), so here's the snippet from my current :version:

qutebrowser v3.2.0
Git commit: 
Backend: QtWebEngine 6.7.1
  based on Chromium 118.0.5993.220
  with security patches up to 124.0.6367.202 (plus any distribution patches)
  (source: api)
Qt: 6.7.1
The-Compiler commented 2 weeks ago

Not sure either! Nothing changed in qutebrowser, and I can't find anything in the Qt 6.7.1 changelog that sounds related. Given that I can't reproduce, maybe the culprit was somewhere else (a theme?) and fixed.

Hi-Angel commented 2 weeks ago

Actually, I was wrong, the issue still happens but something apparently influences it.

When I closed it I had to use older laptop for some time and I had Wayland KDE there. Now I'm back to the work laptop and after updating the system the problem still there. So it may be due to Wayland difference or something else, I'm not sure…