Skip to content

Message loop work hangs in wxPython / Qt examples on Mac. Fixed in examples. Needs further debugging in next releases. #442

Description

@cztomczak

These examples freeze during initial loading or later when typing something on a page. Issues occurs in v66.0 on Mac 10.9.

Temporary solution
See Migration Guide doc "v66+ Changes to Mac apps that integrate into existing message loop (Qt, wxPython)":
https://github.com/cztomczak/cefpython/blob/master/docs/Migration-guide.md#v66-changes-to-mac-apps-that-integrate-into-existing-message-loop-qt-wxpython

Reported problem on the CEF Forum in many details:
https://magpcss.org/ceforum/viewtopic.php?f=6&t=16181

I can see ERROR:gpu_process_transport_factory.cc(1017)] Lost UI shared context error message in console, however this message doesn't seem to be the cause, as I also see this message when running hello_world.py example and it works fine.

The Lost UI shared context error can be safely ignored according to:
https://stackoverflow.com/questions/49094399/chromedriver-showing-lost-ui-shared-context

hello_world.py, screenshot.py and tutorial.py examples do work fine on Mac.

I can also see ERROR:command_buffer_proxy_impl.cc(133)] ContextResult::kTransientFailure: Failed to send GpuChannelMsg_CreateCommandBuffer.

Passing disable-gpu and disable-gpu-compositing switches to cef.Initialize does not help. However it seems that the ContextResult::kTransientFailure.. error message disappears after these switches are passed (though more testing needed if it's just luck).

Issue is not related to recent Cython dupate, as I've tested both 0.25.2 and 0.28.4 and the issue occurs in both.

TODO: Compare cefpython/src/subprocess/main_message_loop* files with cef/tests/shared/browser/main_message_loop* files. These files may have been changed after v66 update.

Activity

  1. added this to the v66 milestone on Jul 31, 2018
  2. changed the title [-]qt.py PySide and wxpython.py examples freeze randomly on Mac[/-] [+]Message loop hangs in wxPython / Qt examples on Mac[/+] on Aug 7, 2018
  3. changed the title [-]Message loop hangs in wxPython / Qt examples on Mac[/-] [+]Message loop work hangs in wxPython / Qt examples on Mac[/+] on Aug 7, 2018
  4. cztomczak commented on Aug 7, 2018

    @cztomczak
    OwnerAuthor

    Examples qt.py and wxpython.py fixed in rev b20c79b by enabling external message pump. This is just a temporary solution that combines two different approaches of integrating message loop at the same time: 1. Do message loop work in a timer 2. Enable external message pump. A correct approach is to do only one of these and not both at the same time.

  5. changed the title [-]Message loop work hangs in wxPython / Qt examples on Mac[/-] [+]Message loop work hangs in wxPython / Qt examples on Mac. Temporary solution: enable external message pump and also run message loop work in a timer.[/+] on Aug 7, 2018
  6. changed the title [-]Message loop work hangs in wxPython / Qt examples on Mac. Temporary solution: enable external message pump and also run message loop work in a timer.[/-] [+]Message loop work hangs in wxPython / Qt examples on Mac. Temporary fix: enable external message pump and also run message loop work in a timer.[/+] on Aug 7, 2018
  7. cztomczak commented on Aug 7, 2018

    @cztomczak
    OwnerAuthor

    Migration Guide document was updated.

  8. cztomczak commented on Aug 7, 2018

    @cztomczak
    OwnerAuthor

    Further debugging of the issue:

  9. changed the title [-]Message loop work hangs in wxPython / Qt examples on Mac. Temporary fix: enable external message pump and also run message loop work in a timer.[/-] [+]Message loop work hangs in wxPython / Qt examples on Mac[/+] on Aug 14, 2018
  10. changed the title [-]Message loop work hangs in wxPython / Qt examples on Mac[/-] [+]Message loop work hangs in wxPython / Qt examples on Mac. Fixed in examples. Needs further debugging in next releases.[/+] on Aug 16, 2018
  11. cztomczak commented on Aug 16, 2018

    @cztomczak
    OwnerAuthor

    Fixes to CefAppProtocol did not change anything. Need to debug this further in v68+ release and on Mac 10.10.

  12. cztomczak commented on Sep 6, 2018

    @cztomczak
    OwnerAuthor

    Fixes to external message pump in upstream CEF:
    https://bitbucket.org/chromiumembedded/cef/commits/869efa1

  13. cztomczak commented on Dec 18, 2019

    @cztomczak
    OwnerAuthor

    Maybe related issue reported on CEF Forum:
    https://magpcss.org/ceforum/viewtopic.php?f=6&t=17118

  14. cztomczak commented on Aug 24, 2020

    @cztomczak
    OwnerAuthor

    It seems the issue on Mac was that Chromium was messing with NSTimer, so that all wxTimers stop working. See for more details https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=17118 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions