Hi,
On to the next problem. :)
Occasionally, it seems like the CEF event loop simply stops working, or at least no OnPaint() events get posted. I've added logging each time OnPaint() is called and when this problem occurs, it's not called even once.
Here's what the log shows on a normal run:
[CEF Python] Initialize() called [87/1991]
[CEF Python] CefExecuteProcess(): exitCode = -1
[CEF Python] CefInitialize()
[CEF Python] App_OnBeforeCommandLineProcessing_BrowserProcess()
[CEF Python] Command line string for the browser process: --browser-subprocess-path=/usr/local/lib/python3.5/dist-packages/cefpython3/subprocess --no-sandbox --lang=en-US --log-file=/tmp/cef.log --log-sev
erity=info --resources-dir-path=/usr/local/lib/python3.5/dist-packages/cefpython3 --locales-dir-path=/usr/local/lib/python3.5/dist-packages/cefpython3/locales --remote-debugging-port=50877 --disable-web-security
=true --ignore-gpu-blacklist=true
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] Switch already set, ignoring: disable-web-security
[CEF Python] Switch already set, ignoring: ignore-gpu-blacklist
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] CreateBrowserSync() called
[CEF Python] navigateUrl:
[CEF Python] CefBrowser::CreateBrowserSync()
[CEF Python] GetPyBrowser(): create new PyBrowser, browserId=1
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] CefBrowser::CreateBrowserSync() succeeded
DEBUG:root:Initialising realtime mode
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
[CEF Python] MessageLoop()
[CEF Python] Command line string for the zygote process: /usr/local/lib/python3.5/dist-packages/cefpython3/subprocess --type=zygote --no-sandbox --lang=en-US --locales-dir-path=/usr/local/lib/python3.5/dist-pack
ages/cefpython3/locales --log-file=/tmp/cef.log --log-severity=info --resources-dir-path=/usr/local/lib/python3.5/dist-packages/cefpython3 --disable-web-security=true --ignore-gpu-blacklist=true
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
[CEF Python] Renderer: OnContextCreated()
[CEF Python] Browser: OnProcessMessageReceived(): OnContextCreated
[CEF Python] V8ContextHandler_OnContextCreated()
[0403/142855.005520:ERROR:gl_surface_glx.cc(411)] GLX 1.3 or later is required.
[0403/142855.005656:ERROR:gl_initializer_x11.cc(130)] GLSurfaceGLX::InitializeOneOff failed.
[0403/142855.010445:ERROR:gpu_child_thread.cc(327)] Exiting GPU process due to errors during initialization
[0403/142855.021730:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0403/142855.022240:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0403/142855.022928:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0403/142855.023129:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
DEBUG:root:GetViewRect(): 1920x1080
[0403/142855.024333:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
DEBUG:root:OnLoadStart()
DEBUG:root:OnAddressChange():
DEBUG:root:OnStatusMessage():
DEBUG:root:OnTitleChange(): kirupa.com - It's Alive DEBUG:root:OnLoadEnd()
DEBUG:root:OnLoadingStateChange()
DEBUG:root:OnTitleChange(): kirupa.com - It's Alive DEBUG:root:OnPaint() raw mode 1, status 0, n_onpaint 1
DEBUG:root:First OnPaint()
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:OnPaint() raw mode 1, status 3, n_onpaint 2
DEBUG:root:OnPaint() raw mode 1, status 3, n_onpaint 3
DEBUG:root:OnPaint() raw mode 1, status 3, n_onpaint 4
DEBUG:root:OnPaint() raw mode 1, status 3, n_onpaint 5
...
And here's how it looks when OnPaint is never called:
[CEF Python] Initialize() called [4/1991]
[CEF Python] CefExecuteProcess(): exitCode = -1
[CEF Python] CefInitialize()
[CEF Python] App_OnBeforeCommandLineProcessing_BrowserProcess()
[CEF Python] Command line string for the browser process: --browser-subprocess-path=/usr/local/lib/python3.5/dist-packages/cefpython3/subprocess --no-sandbox --lang=en-US --log-file=/tmp/cef.log --log-sev
erity=info --resources-dir-path=/usr/local/lib/python3.5/dist-packages/cefpython3 --locales-dir-path=/usr/local/lib/python3.5/dist-packages/cefpython3/locales --remote-debugging-port=62478 --disable-web-security
=true --ignore-gpu-blacklist=true
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] Switch already set, ignoring: disable-web-security
[CEF Python] Switch already set, ignoring: ignore-gpu-blacklist
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] CreateBrowserSync() called
[CEF Python] navigateUrl:
[CEF Python] CefBrowser::CreateBrowserSync()
[CEF Python] GetPyBrowser(): create new PyBrowser, browserId=1
[CEF Python] BrowserProcessHandler_OnBeforeChildProcessLaunch()
[CEF Python] CefBrowser::CreateBrowserSync() succeeded
DEBUG:root:Initialising realtime mode
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
[CEF Python] MessageLoop()
[CEF Python] Command line string for the zygote process: /usr/local/lib/python3.5/dist-packages/cefpython3/subprocess --type=zygote --no-sandbox --lang=en-US --locales-dir-path=/usr/local/lib/python3.5/dist-pack
ages/cefpython3/locales --log-file=/tmp/cef.log --log-severity=info --resources-dir-path=/usr/local/lib/python3.5/dist-packages/cefpython3 --disable-web-security=true --ignore-gpu-blacklist=true
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
[CEF Python] Renderer: OnContextCreated()
[CEF Python] Browser: OnProcessMessageReceived(): OnContextCreated
[CEF Python] V8ContextHandler_OnContextCreated()
[0403/142912.713426:ERROR:gl_surface_glx.cc(411)] GLX 1.3 or later is required.
[0403/142912.713505:ERROR:gl_initializer_x11.cc(130)] GLSurfaceGLX::InitializeOneOff failed.
[0403/142912.718239:ERROR:gpu_child_thread.cc(327)] Exiting GPU process due to errors during initialization
[0403/142912.728610:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0403/142912.729253:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:OnLoadStart()
DEBUG:root:OnAddressChange():
DEBUG:root:OnStatusMessage():
[0403/142912.735744:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0403/142912.739874:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
[0403/142912.740375:ERROR:browser_gpu_channel_host_factory.cc(113)] Failed to launch GPU process.
DEBUG:root:OnTitleChange(): kirupa.com - It's Alive DEBUG:root:OnLoadEnd()
DEBUG:root:OnLoadingStateChange()
DEBUG:root:OnTitleChange(): kirupa.com - It's Alive DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:GetViewRect(): 1920x1080
DEBUG:root:RecordWatchdogThread: WOOF! (# OnPaints: 0, # frames: 0)
DEBUG:root:RecordWatchdogThread: WOOF! (# OnPaints: 0, # frames: 0)
WARNING:root:No frame for 10.0 seconds
They are different, but I don't know what differences are significant? I'm guessing somehow the message loop doesn't even get started, but the code is always the same, and cefpython.MessageLoop() is called unconditionally.
Any ideas?