question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cef hangs while resizing in certain conditions

See original GitHub issue

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.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ikhzcommented, Apr 22, 2020

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?

1reaction
r0x0rcommented, Mar 22, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cef python - Freeze when resizing
The problem is when I resize my window, the use of WindowUtils.OnSize() freezes my app. 99% of the time, it happens when the...
Read more >
Hang in SetWindowPos when resizing browser window
Hang in SetWindowPos when resizing browser window ... I recently began integrating CEF into an MFC based C++ program. I'm using CEF 2526.1364....
Read more >
OSR: Resizing sometimes causes the rendering to freeze
I would expect the window to keep rendering the web page with new size. Instead the picture freezes. CefRenderHandler::OnPaint is not called.
Read more >
cef
The object being dropped is |drag_data|, given as an argument to the previous DragTargetDragEnter call. This function is only used when window rendering...
Read more >
The SWT FAQ | The Eclipse Foundation
Why does Eclipse 3.3 freeze when I open an editor on GTK 2.10 (Linux, UNIX)? ... For changes done to any specific widget,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found