pywebview: cef hangs while resizing in certain conditions

Specification

  • pywebview version: 3.2
  • platform / version: Win7 Pro SP1
  • cefpython3 version 66.0

Description

Observed reproducible hang during use of cef gui, if triggering some kind of update while resizing the window. Minimally this code usually (but not 100% of the time) hangs on my machine:

import webview
window=webview.create_window('Hello world', html='<h1>hello</h1>')
def reload_and_resize():
    window.evaluate_js("location.reload()")
    window.resize(1000, 420)
webview.start(reload_and_resize, gui="cef")

or while manually resizing something more like this:

import webview,time
window=webview.create_window('Hello world', html='<h1>hello</h1>')
def keep_reloading():
    while True:
        time.sleep(1)
        window.evaluate_js("location.reload()")
webview.start(keep_reloading, gui="cef")

This may be a cefpython issue.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 23 (19 by maintainers)

Commits related to this issue

Most upvoted comments

I have reproduced it and it looks like a race condition issue to me. At least adding a debug print statement somewhere in an execution chain seem to eliminate the problem. I will look into it.

Is there any news?

I have reproduced it and it looks like a race condition issue to me. At least adding a debug print statement somewhere in an execution chain seem to eliminate the problem. I will look into it.