[webkit-gtk] Operation webkit_web_view_new() crashed when in multithreading

刘阳 liuyang06 at hc360.com
Tue Nov 18 01:31:28 PST 2014


hello everyone !

I am new here, and i got a question.
I was trying to work with libwebkitgtk-4.0, I want to use it with no GUI program like a web crawler. 

But when i try to use code below not in the main thread(main thread means end with gtk_main()), it got crash

GtkWidget *webView = webkit_web_view_new();

Program received signal SIGSEGV, Segmentation fault.

i use gdb to debug, it tells me this backtrace.

#0 set_para_values (layout=layout at entry=0x7fff88004410, base_dir=base_dir at entry=PANGO_DIRECTION_RTL, style=style at entry=0x0, display=display at entry=0x65b2e0) at gtktextlayout.c:1341 
#1 0x00007fffee941613 in gtk_text_layout_get_line_display (layout=layout at entry=0x7fff88004410, line=line at entry=0x7fff88024840, size_only=size_only at entry=1) at gtktextlayout.c:2209 
#2 0x00007fffee941d32 in gtk_text_layout_real_wrap (layout=0x7fff88004410, line=0x7fff88024840, line_data=0x61aae0) at gtktextlayout.c:1165 
#3 0x00007fffee9231ba in gtk_text_btree_node_validate (view=view at entry=0x7fff8802a410, node=<optimized out>, view_id=view_id at entry=0x7fff88004410, state=state at entry=0x7fffffffe150) at gtktextbtree.c:5103 
#4 0x00007fffee927400 in _gtk_text_btree_validate (tree=0x7fff88029800, view_id=view_id at entry=0x7fff88004410, max_pixels=max_pixels at entry=2000, y=y at entry=0x7fffffffe1b4, 
old_height=old_height at entry=0x7fffffffe1b8, new_height=new_height at entry=0x7fffffffe1bc) at gtktextbtree.c:5255 
#5 0x00007fffee93ff57 in gtk_text_layout_validate (layout=0x7fff88004410, max_pixels=max_pixels at entry=2000) at gtktextlayout.c:1137 
#6 0x00007fffee94ecb5 in incremental_validate_callback (data=0x7fff880251e0) at gtktextview.c:3883 
#7 0x00007fffeb949fb8 in gdk_threads_dispatch (data=0x7fff880167a0) at gdk.c:788 
#8 0x00007fffec1c59e5 in g_main_dispatch (context=0x63b820) at gmain.c:3064 
#9 g_main_context_dispatch (context=context at entry=0x63b820) at gmain.c:3663 
#10 0x00007fffec1c5d48 in g_main_context_iterate (context=0x63b820, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at gmain.c:3734 
#11 0x00007fffec1c600a in g_main_loop_run (loop=0x667cd0) at gmain.c:3928 
#12 0x00007fffee88f905 in gtk_main () at gtkmain.c:1162 
#13 0x0000000000402174 in main (argc=1, argv=0x7fffffffe468) at main.c:42


Can anyone figure me out, what should i do next, to get multithreading use WebKitWebView objects without GUI ?

Thank you very much !
Thanks for your reading !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-gtk/attachments/20141118/acbe8179/attachment.html>


More information about the webkit-gtk mailing list