Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
6.6.3
-
None
Description
IMPORTANT NOTE: This was originally reported under the PYSIDE bug reporting as PYSIDE-2671, but they bounced me here (see this comment). Sorry for no reproducer script in C++. I can't make that. The gist should be clear, though.
SCOPE NOTE:
This problem is under WSL2 on Windows 10. See below for details. Not sure if this is a general Linux problem or not.
This does not happen on Windows.
THE PROBLEM:
When I run the program below with the QWebEngineView import, a window opens as expected, but when you close the window you get the dreaded "Segmentation fault". Remove the QWebEngineView import and repeat, and you get no segfault.
import sys from PySide6.QtWidgets import QApplication, QMainWindow # With the import below, you will see "Segmentation fault" on exit. # Uncomment the import, and the segfault does not happen. from PySide6.QtWebEngineWidgets import QWebEngineView if __name__ == "__main__": app = QApplication(sys.argv) mainWindow = QMainWindow() mainWindow.show() sys.exit(app.exec())
Cmdline output showing environment details and running with/without the import (and closing the window in between):
$ uname -a Linux CA1E101030L 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal $ python --version Python 3.11.8 $ pip freeze | grep PySide IceSpringPySideStubs-PySide6==1.3.1 PySide6==6.6.3.1 PySide6_Addons==6.6.3.1 PySide6_Essentials==6.6.3.1 $ python ./test.py # and close the window Segmentation fault $ sed -i '/QWebEngineView/s/^/#/' ./test.py # to comment the import line $ python ./test.py # and close the window $ # No segfault!
OTHER NOTES:
FWIW, without the WSLg of Win11 I'm using x410 as the X server up in Windows. This requires these exports to work at all, but it does work well:
export QT_QPA_PLATFORM=xcb # For X to work at all export QT_QUICK_BACKEND=software # For QWebEngineView to work? (less clear here)
This has no impact on the segfault issue... just including it to head off any questions on how this works under WSL2 on Win 10 at all.
Attachments
Issue Links
- resulted from
-
PYSIDE-2671 Importing QWebEngineView causes "Segmentation fault" at application exit
-
- Closed
-