wxpython.py example crashes on Linux

87 views
Skip to first unread message

jori...@gmail.com

unread,
Feb 26, 2019, 11:15:46 PM2/26/19
to CEF Python
Hello,

I decided to try wxpython.py example on Linux Mint 18 but it crashes.
Symptoms are identical to https://github.com/cztomczak/cefpython/issues/309 Though I work not on Mac, but Linux. It crashes on both python 2.7 and 3.6.

[wxpython.py] CEF Python 66.0
[wxpython.py] Python 3.6.8 64bit
[wxpython.py] wxPython 4.0.3 gtk3 (phoenix) wxWidgets 3.0.5

DevTools listening on ws://127.0.0.1:64466/devtools/browser/d3669946-a831-40e4-aa7e-327dce471193
[wxpython.py] wx.GetDisplayPPI = (96, 95)
[wxpython.py] wx.GetDisplaySize = (3840, 1080)
[wxpython.py] MainFrame declared size: (900, 640)
[wxpython.py] MainFrame DPI scaled size: (900, 640)
[wxpython.py] MainFrame actual size: (900, 640)
Segmentation fault

If I remove window_info in
self.browser = cef.CreateBrowserSync(window_info,
url="http://www.google.com/")
I don't have a crash.

Czarek Tomczak

unread,
Feb 27, 2019, 1:59:23 AM2/27/19
to CEF Python
What is the stack trace? Please follow these instructions:
2. Find location where cepfython3 package was installed and replace the original libcef.so with the one downloaded in step one
3. Debug with gdb using these commands:

sudo apt-get install gdb
gdb python
run wxpython.py
bt

Is it crashing randomly?

jori...@gmail.com

unread,
Feb 27, 2019, 10:22:31 AM2/27/19
to CEF Python
Thank you, Czarek, for detailed and quick answer.
That's my stack trace:

[wxpython.py] wx.GetDisplayPPI = (96, 95)
[wxpython.py] wx.GetDisplaySize = (3840, 1080)
[wxpython.py] MainFrame declared size: (900, 640)
[wxpython.py] MainFrame DPI scaled size: (900, 640)
[wxpython.py] MainFrame actual size: (900, 640)

Thread 1 "python3.6" received signal SIGSEGV, Segmentation fault.
0x00007fffe50df0bf in FindChild ()
at ../../cef/libcef/browser/native/window_x11.cc:44
44 ../../cef/libcef/browser/native/window_x11.cc: No such file or directory.

jori...@gmail.com

unread,
Feb 27, 2019, 10:23:14 AM2/27/19
to CEF Python
It crashes always.

Czarek Tomczak

unread,
Feb 27, 2019, 10:39:19 AM2/27/19
to CEF Python
You've provided only the last frame. What is the full stack trace?


It's a bug in upstream CEF and I've already sent patch for that. However I think it would be better to create a pull request in upstream, so it would be merged faster. You would need to build CEF from sources and apply the patch to fix it now. I will patch it within CEF Python in the next release even if it doesn't get merged upstream.

Czarek Tomczak

unread,
Feb 27, 2019, 10:44:10 AM2/27/19
to cefp...@googlegroups.com
FYI, on my Ubuntu 14.04 it works fine with wxPython 4.

jori...@gmail.com

unread,
Feb 27, 2019, 10:46:18 AM2/27/19
to CEF Python
I am sorry. Forgot bt :)

(gdb) bt
#0 0x00007fffe50df0bf in FindChild () at ../../cef/libcef/browser/native/window_x11.cc:44
#1 Show () at ../../cef/libcef/browser/native/window_x11.cc:178
#2 0x00007fffe50dba57 in CreateHostWindow () at ../../cef/libcef/browser/native/browser_platform_delegate_native_linux.cc:89
#3 0x00007fffe4ff6879 in CreateHostWindow () at ../../cef/libcef/browser/browser_host_impl.cc:3159
#4 CreateInternal () at ../../cef/libcef/browser/browser_host_impl.cc:418
#5 0x00007fffe4ff536f in Create () at ../../cef/libcef/browser/browser_host_impl.cc:359
#6 0x00007fffe4ff4b3d in CreateBrowserSync () at ../../cef/libcef/browser/browser_host_impl.cc:275
#7 0x00007fffe37ace21 in cef_browser_host_create_browser_sync () at ../../cef/libcef_dll/cpptoc/browser_host_cpptoc.cc:94
#8 0x00007fffdfcc13f8 in CefBrowserHost::CreateBrowserSync(CefWindowInfo const&, scoped_refptr<CefClient>, CefStringBase<CefStringTraitsUTF16> const&, CefStructBase<CefBrowserSettingsTraits> const&, scoped_refptr<CefRequestContext>) ()
from /usr/local/lib/python3.6/dist-packages/cefpython3/cefpython_py36.so
#9 0x00007fffffffbf00 in ?? ()
#10 0x000000000120bd40 in ?? ()
#11 0x000000000120be40 in ?? ()
#12 0x0000000001210220 in ?? ()
#13 0x00007fffdff63158 in construction vtable for CefRequestContextHandler-in-RequestContextHandler ()
from /usr/local/lib/python3.6/dist-packages/cefpython3/cefpython_py36.so
#14 0x00000000009ec9c0 in ?? ()
#15 0x00007fffffffc9f0 in ?? ()
#16 0x0000000001210220 in ?? ()
#17 0x00007fffdff63158 in construction vtable for CefRequestContextHandler-in-RequestContextHandler ()
from /usr/local/lib/python3.6/dist-packages/cefpython3/cefpython_py36.so
#18 0x00007fffdff63158 in construction vtable for CefRequestContextHandler-in-RequestContextHandler ()
from /usr/local/lib/python3.6/dist-packages/cefpython3/cefpython_py36.so
#19 0x0000000001210220 in ?? ()
#20 0x00007fffdf9c3093 in __pyx_pf_14cefpython_py36_30CreateBrowserSync(_object*, _object*, _object*, _object*, _object*, _object*) [clone .isra.328.15445] () from /usr/local/lib/python3.6/dist-packages/cefpython3/cefpython_py36.so
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Czarek Tomczak

unread,
Feb 27, 2019, 10:51:58 AM2/27/19
to CEF Python
From the logs it seems you are using wxPython 4 build for GTK 3. Try installing wxPython 4 build for GTK 2. Or you could build cefpython for GTK 3 by applying this patch:


Although the issue with x11 that is occuring in your case is not related to GTK 3, so there is not guarantee that this will fix it. CEF Python links to GTK 2 libraries, although some GTK 3 examples still do work fine like the gtk3.py example in my case.

On Wednesday, February 27, 2019 at 4:15:46 AM UTC, jorikdima wrote:
Reply all
Reply to author
Forward
0 new messages