rdmenezes / cefpython

Automatically exported from code.google.com/p/cefpython
1 stars 0 forks source link

Segmentation fault in the PyQt example on Linux #88

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The example:
https://code.google.com/p/cefpython/source/browse/cefpython/cef3/linux/binaries_
64bit/pyqt.py

Stack trace:
--------------------------------------------------------------------------------
---------------
0x00007ffff1ee52a0 in CefBrowserHostImpl::PlatformCreateWindow() ()
   from /home/czarek/cefpython/cefpython/cef3/linux/binaries_64bit/libcef.so
(gdb) backtrace
#0  0x00007ffff1ee52a0 in CefBrowserHostImpl::PlatformCreateWindow() ()
   from /home/czarek/cefpython/cefpython/cef3/linux/binaries_64bit/libcef.so
#1  0x00007ffff1e24930 in CefBrowserHostImpl::Create(CefWindowInfo const&, 
CefStructBase<CefBrowserSettingsTraits> const&, CefRefPtr<CefClient>, 
content::WebContents*, scoped_refptr<CefBrowserInfo>, _GtkWidget*) ()
   from /home/czarek/cefpython/cefpython/cef3/linux/binaries_64bit/libcef.so
#2  0x00007ffff1e251ec in CefBrowserHost::CreateBrowserSync(CefWindowInfo 
const&, CefRefPtr<CefClient>, CefStringBase<CefStringTraitsUTF16> const&, 
CefStructBase<CefBrowserSettingsTraits> const&) ()
   from /home/czarek/cefpython/cefpython/cef3/linux/binaries_64bit/libcef.so
#3  0x00007ffff1dc9fec in cef_browser_host_create_browser_sync ()
   from /home/czarek/cefpython/cefpython/cef3/linux/binaries_64bit/libcef.so
#4  0x00007fffe8136e4f in CefBrowserHost::CreateBrowserSync(CefWindowInfo 
const&, CefRefPtr<CefClient>, CefStringBase<CefStringTraitsUTF16> const&, 
CefStructBase<CefBrowserSettingsTraits> const&) ()
   from /home/czarek/cefpython/cefpython/cef3/linux/binaries_64bit/cefpython_py27.so
#5  0x00007fffe8111cce in __pyx_pf_14cefpython_py27_16CreateBrowserSync (
    __pyx_v_windowInfo=<cefpython_py27.WindowInfo at remote 0xdc7fb0>, 
    __pyx_v_browserSettings=<optimized out>, __pyx_v_navigateUrl=
    'file:///home/czarek/cefpython/cefpython/cef3/linux/binaries_64bit/example.html', __pyx_self=<optimized out>) at cefpython.cpp:65142
#6  0x00007fffe8114ea6 in __pyx_pw_14cefpython_py27_17CreateBrowserSync ()
--------------------------------------------------------------------------------
---------------

Could this be caused by the CEF 3 GTK Linux patch?
https://code.google.com/p/cefpython/source/browse/cefpython/cef3/linux/CEF-GTK-p
atch.txt?r=2471b5fb1019

This patch adds new code to the PlatformCreateWindow() function where the 
segmentation fault happens.

Original issue reported on code.google.com by czarek.t...@gmail.com on 26 Sep 2013 at 2:54

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 10 Jan 2014 at 6:44

GoogleCodeExporter commented 9 years ago
On Linux it is required to use the QX11EmbedContainer widget for embedding CEF 
browser. That should fix the segmentation fault.

Original comment by czarek.t...@gmail.com on 14 Jan 2014 at 8:28

GoogleCodeExporter commented 9 years ago
Downloaded original CEF binary (from cefbuilds.com) and replaced libcef.so, but 
it didn't help. So the code that was added to PlatformCreateWindow() by 
applying the cefpython patch, is not the cause of the problem.

Original comment by czarek.t...@gmail.com on 28 Jul 2014 at 12:07

GoogleCodeExporter commented 9 years ago
It was required to use the QX11EmbedContainer class that provides an X11 
window. Additionally it was required to embed a GTK widget (GtkPlug) inside the 
X11 window, as the CEF browser requires a GtkWidget pointer to be able to 
embed. In latest CEF trunk it is possible to embed the CEF browser by just 
providing X11 window handle, so in future the GTK dependency will be removed 
from CEF Python.

Fixed in revision 017198f7dd64.

Original comment by czarek.t...@gmail.com on 28 Jul 2014 at 2:16