Skip to content

QT Renderer - WebEnginePage not deleted error appears to cause random unexpected termination messages from the OS when closing window #1328

@Kytech

Description

@Kytech

Specification

  • pywebview version: >=5
  • operating system: Behavior observed on both Windows and Linux (Ubuntu 20.04)
  • web renderer: qt (using either PyQt5 or pyside6 back end package)

Description

When closing a webview window to exit the application, the following message is logged and a crash message is sometimes reported by the OS (not always consistent, however. I observed the crash message from the OS most frequently on a Ubuntu 20.04 machine).

This bug was observed in python 3.8.10 on both Windows and Linux. Not sure if the issue occurs with other python versions at this time

Release of profile requested but WebEnginePage still not deleted. Expect troubles !

This appears to happen regardless of what content is displayed in the webview, though here's a simple example of an application where the above error message was observed.

import webview

# Simple WSGI Application that serves a test page
def get_page(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/plain; charset=utf-8')])
    return ['Test Window'.encode('utf-8')]

window = webview.create_window('Test', url=get_page)
webview.start(gui='qt')

Everything appears to work fine in the webview itself, even when the issue was observed with a webview that was displaying some heavy interactive JS content (Leaflet map), so it appears that the issue is mostly that the application is not exiting cleanly, which may result in the OS reporting that the application terminated unexpectedly, though no further error was noted in the console output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions