Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2611

setUrl(QUrl causes a core dunp in Arch Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.15.10
    • PySide
    • None
    • Python Virtual Environment
    • Linux/X11

    Description

      I have the Pyhton code below using a Python virtual environment in Arch Linux, running KDE Plasma 5 Desktop. When the code is executed the main window displays and briefly a smaller white rectangle appears but the QWebEngineView is not visible. I have checked that it is visibel and enabled. When Ilooked further into this I ascertained that the line         self.browser.setUrl(QUrl("https://www.google.com/")) results in a core dumps like this:

       

      Feb 20 04:12:47 archlinux systemd-coredump[2234]: Removed old coredump core.QtWebEngineProc.1000.c0cbddfb61d74e23878ed1335508074a.1154.1708313971
      000000.zst.
      Feb 20 04:12:47 archlinux systemd-coredump[2234]: Process 2229 (QtWebEngineProc) of user 1000 dumped core.
      Feb 20 04:12:48 archlinux systemd-coredump[2257]: Removed old coredump core.QtWebEngineProc.1000.c0cbddfb61d74e23878ed1335508074a.6168.1708314888
      000000.zst.
      Feb 20 04:12:48 archlinux systemd-coredump[2257]: Process 2253 (QtWebEngineProc) of user 1000 dumped core.


       

       
      #!/usr/bin/env python3

       
      from PyQt5.QtCore import QUrl
      from PyQt5.QtWidgets import QApplication, QMainWindow, QWidget
      from PyQt5.QtWebEngineWidgets import QWebEngineView
      import sys
       
       
      class MainWindow(QMainWindow):
          def _init_(self, *args, **kwargs):
              super(MainWindow, self)._init_(*args, **kwargs)
       
              self.browser = QWebEngineView()
              # Set URL without specifying parsing mode
              self.browser.setUrl(QUrl("https://www.google.com/"))
              self.browser.setStyleSheet("border: 2px solid black")
              self.browser.setFixedSize(700, 500)  # Set fixed size with width and height arguments
       
              # Set window geometry
              self.setGeometry(100, 100, 800, 600)  # Adjust as needed
       
              self.setCentralWidget(self.browser)
              self.show()
       
      app = QApplication(sys.argv)
      window = MainWindow()
      sys.exit(app.exec_())

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            glenmeehan Glen Meehan
            Glen Meehan Glen Meehan
            Glen Meehan Glen Meehan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes