Bug 2240025

Summary: v3.0.0 does not work with qt6: immediately crashes
Product: [Fedora] Fedora Reporter: Ankur Sinha (FranciscoD) <sanjay.ankur>
Component: qutebrowserAssignee: Timothée Floure <timothee.floure>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 39CC: sanjay.ankur, timothee.floure
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: qutebrowser-3.0.0-3.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-21 17:37:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ankur Sinha (FranciscoD) 2023-09-21 11:36:34 UTC
I got the update today, and it asked me if I wanted to use Qt6. I said yes, and then it immediately crashed. I thought maybe it was because of my config, so I tried it again but this time with `-T` to get a fresh temp config. When it tries to use Qt6, it still crashes immediately. If I use Qt5, it works.

Reproducible: Always

Steps to Reproduce:
1. Update to 3.0.0
2. Try to run
3.
Actual Results:  
Immediate crash

Expected Results:  
Should not crash

Trace of crash:

```
Traceback (most recent call last):
  File "/usr/bin/qutebrowser", line 33, in <module>
    sys.exit(load_entry_point('qutebrowser==3.0.0', 'gui_scripts', 'qutebrowser')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qutebrowser/qutebrowser.py", line 231, in main
    return app.run(args)
           ^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qutebrowser/app.py", line 108, in run
    init(args=args)
  File "/usr/lib/python3.12/site-packages/qutebrowser/app.py", line 155, in init
    _process_args(args)
  File "/usr/lib/python3.12/site-packages/qutebrowser/app.py", line 200, in _process_args
    new_window = mainwindow.MainWindow(private=private)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qutebrowser/mainwindow/mainwindow.py", line 227, in __init__
    self.tabbed_browser: tabbedbrowser.TabbedBrowser = tabbedbrowser.TabbedBrowser(
                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qutebrowser/mainwindow/tabbedbrowser.py", line 203, in __init__
    self.widget = tabwidget.TabWidget(win_id, parent=self)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qutebrowser/mainwindow/tabwidget.py", line 45, in __init__
    bar = TabBar(win_id, self)
          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/qutebrowser/mainwindow/tabwidget.py", line 397, in __init__
    self._our_style = TabBarStyle()
                      ^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
  QProxyStyle(style: typing.Optional[QStyle] = None): not enough arguments
  QProxyStyle(key: Optional[str]): not enough arguments

```

Comment 1 Ankur Sinha (FranciscoD) 2023-09-21 11:37:23 UTC
Filed issue upstream hoping to get some hints on what's going on here.

https://github.com/qutebrowser/qutebrowser/issues/7927

I've also given the update negative karma to prevent it from being automatically pushed.

Out of curiosity: does it work for everyone else??

Comment 2 Ankur Sinha (FranciscoD) 2023-09-21 12:23:41 UTC
Florian said:

"
It's a bug in PyQt (or possibly Python). I already reported it there and pushed a workaround in 90d16b5.

I'll release qutebrowser v3.0.1 as soon as Qt/PyQt 6.5.3 is out, with the former planned for next Wednesday, and PyQt hopefully following shortly after.
"

I'll test the workaround now.

I'd unpush the 3.0.0 update in the meantime though, and we can either carry the fix or wait till 3.0.1 is released?

Cheers,

Comment 3 Ankur Sinha (FranciscoD) 2023-09-21 12:57:44 UTC
The patch fixes the issue, so I've opened a PR including it now.

https://src.fedoraproject.org/rpms/qutebrowser/pull-request/13

Comment 4 Fedora Update System 2023-09-21 17:36:11 UTC
FEDORA-2023-9cf36d3de2 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-9cf36d3de2

Comment 5 Fedora Update System 2023-09-21 17:37:44 UTC
FEDORA-2023-9cf36d3de2 has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.