Repository navigation
Linux: Crash in Qt and wxPython examples during browser creation due to x11 FindChild() failing #452
Copy link
Copy link
Open
Description
This needs to be patched during next CEF Python release (internal patch or merged PR upstream).
Reported in upstream CEF tracker:
https://bitbucket.org/chromiumembedded/cef/issues/2490/x11-findchild-fails-during-a-call-to
Reported problem on the CEF Forum:
https://magpcss.org/ceforum/viewtopic.php?f=6&t=16203
Reproducible so far with the following examples:
- PyQt4
- PySide
- wxPython 4 - reported here
The PyQt5 example works fine (Python 3.6, Ubuntu 14.04 same machine).
Stack trace for qt.py pyqt4 example running on Python 2.7.6 and Ubuntu 14.04:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff1d9e0bf in FindChild () at ../../cef/libcef/browser/native/window_x11.cc:44
44 ../../cef/libcef/browser/native/window_x11.cc: No such file or directory.
(gdb) bt
#0 0x00007ffff1d9e0bf in FindChild () at ../../cef/libcef/browser/native/window_x11.cc:44
#1 Show () at ../../cef/libcef/browser/native/window_x11.cc:178
#2 0x00007ffff1d9aa57 in CreateHostWindow ()
at ../../cef/libcef/browser/native/browser_platform_delegate_native_linux.cc:89
#3 0x00007ffff1cb5879 in CreateHostWindow () at ../../cef/libcef/browser/browser_host_impl.cc:3159
#4 CreateInternal () at ../../cef/libcef/browser/browser_host_impl.cc:418
#5 0x00007ffff1cb436f in Create () at ../../cef/libcef/browser/browser_host_impl.cc:359
#6 0x00007ffff1cb3b3d in CreateBrowserSync () at ../../cef/libcef/browser/browser_host_impl.cc:275
#7 0x00007ffff046be21 in cef_browser_host_create_browser_sync ()
at ../../cef/libcef_dll/cpptoc/browser_host_cpptoc.cc:94
#8 0x00007fffe743ad58 in CefBrowserHost::CreateBrowserSync(CefWindowInfo const&, scoped_refptr<CefClient>, CefStringBase<CefStringTraitsUTF16> const&, CefStructBase<CefBrowserSettingsTraits> const&, scoped_refptr<CefRequestContext>) ()
from /usr/local/lib/python2.7/dist-packages/cefpython3/cefpython_py27.so
#9 0x00007fffffffcb70 in ?? ()
#10 0x0000000001067c50 in ?? ()
#11 0x00000000010406b0 in ?? ()
#12 0x00000000010406b0 in ?? ()
#13 0x00007fffe76f2fc0 in __pyx_v_14cefpython_py27_g_external_message_pump ()
from /usr/local/lib/python2.7/dist-packages/cefpython3/cefpython_py27.so
#14 0x00000000009420a0 in ?? ()
#15 0x00007fffffffcd60 in ?? ()
#16 0x00007fffe24a4fc8 in ?? ()
#17 0x00007ffff7e7f8f0 in ?? ()
#18 0x0000000000000000 in ?? ()
Stack for qt.py pyside is the same.
Corresponding CEF source codes for the stack trace:
0. https://github.com/chromiumembedded/cef/blob/3359/libcef/browser/native/window_x11.cc#L44
- https://github.com/chromiumembedded/cef/blob/3359/libcef/browser/native/window_x11.cc#L178
- https://github.com/chromiumembedded/cef/blob/3359/libcef/browser/native/browser_platform_delegate_native_linux.cc#L89
- https://github.com/chromiumembedded/cef/blob/3359/libcef/browser/browser_host_impl.cc#L3159
- https://github.com/chromiumembedded/cef/blob/3359/libcef/browser/browser_host_impl.cc#L418
- https://github.com/chromiumembedded/cef/blob/3359/libcef/browser/browser_host_impl.cc#L359
- https://github.com/chromiumembedded/cef/blob/3359/libcef/browser/browser_host_impl.cc#L275
Reactions are currently unavailable
Activity
[-]PyQt4 and PyQt5 examples crash during browser creation on Linux[/-][+]PyQt4 and PySide examples crash during browser creation on Linux[/+][-]PyQt4 and PySide examples crash during browser creation on Linux[/-][+]PyQt4 and PySide examples crash during browser creation on Linux due to x11 FindChild() failing[/+]Update run_examples.py (#452)
cztomczak commentedon Aug 17, 2018
PyQt4 and PySide examples disabled from auto running in commit cb9628b.
cztomczak commentedon Dec 5, 2018
I've provided a patch that fixes the issue in upstream CEF. However this still needs testing with PyQt4 and PySide to see if that resolves the issue completely.
[-]PyQt4 and PySide examples crash during browser creation on Linux due to x11 FindChild() failing[/-][+]Linux: Crash in Qt and wxPython examples during browser creation due to x11 FindChild() failing[/+]dee42 commentedon Aug 8, 2019
This is biting me with wxPython 4 with GTK 3. Is there any way to work around the issue with cefpython 66? If not, when are you expecting the next cefpython release?
cztomczak commentedon Aug 8, 2019
@dee42 You can build CEF 66 from sources and apply the patch. See the build instructions document and inject the patch via patches/patch.py script before building. There is no known schedule for the next release at the moment.
dee42 commentedon Aug 15, 2019
@cztomczak Thanks. I've done so, but there seem to be knock-on issues. With that patch, I see a consistent segmentation fault which seems very similar to the crash reported here: https://magpcss.org/ceforum/viewtopic.php?f=6&t=16634. Traceback is:
Ever seen anything like this?
cztomczak commentedon Aug 16, 2019
@dee42 No, first time seeing such error in CEF Python. Feel free to create a new issue for this error. Test with original wxpython.py example.
cztomczak commentedon Jan 12, 2020
This is fixed in upstream CEF in v78+.
jorikdima commentedon Jan 31, 2020
Czarek, I created a thread a year ago. Seems like now it's fixed in CEF. But when can we expect a new release of CEF python? If not soon what is my options? Should I rebuild existing CEF python against new CEF? But here you mentioned that versions should match, so 66 only as for today. Should I follow #264 like mentioned in the Notes?
Otherwise I still can't use CEFpython with wxPython on Linux GTK3
Thank you