Re: libseed-list Suspected thread issues with callbacks.



some examples of backtraces

essage: [FINALIZATION] seed-engine.c:864: GSimpleAsyncResult at 0x86eaa48 (1 refs) ** Message: [STRUCTS] seed-structs.c:50: Finalizing seed_pointer object 0x875e928. with priv->free_pointer = 0 with type: Thread, size: 24 ** Message: [STRUCTS] seed-structs.c:50: Finalizing seed_pointer object 0x8759170. with priv->free_pointer = 1 with type: TreeIter, size: 16 ** Message: [IMPORTER] seed-importer.c:485: seed_gi_importer_get_property with GLib ** Message: [IMPORTER] seed-importer.c:389: Using existing namespace ref (0xb45439c0) for GLib ** Message: [IMPORTER] seed-importer.c:498: Result (0xb45439c0) from attempting to import GLib: [object Object]
** Message: [MISC] seed-types.c:951: gvalue type: 140898248

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb2616b70 (LWP 12384)]
0xb7814ef0 in JSC::JSCallbackObject<JSC::JSObject>::~JSCallbackObject () from /usr/lib/libwebkit-1.0.so.2
(gdb) bt full
#0 0xb7814ef0 in JSC::JSCallbackObject<JSC::JSObject>::~JSCallbackObject () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#1 0xb79078fb in JSC::Heap::allocate () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#2 0xb791521a in JSC::ErrorPrototype::ErrorPrototype () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#3 0xb7929a2b in JSC::JSGlobalObject::reset () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#4 0xb792d076 in JSC::JSGlobalObject::init () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#5 0xb7819340 in JSGlobalContextCreateInGroup () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#6 0xb807be1d in seed_handle_closure (cif=0x875a300, result=0xb26162d0, args=0xb2616280, userdata=0x875cde0) at seed-closure.c:56
privates = (SeedNativeClosure *) 0x875cde0
num_args = 0
i = 0
jsargs = (JSValueRef *) 0x0
return_value = (JSValueRef) 0x0
exception = (JSValueRef) 0x0
return_tag = GI_TYPE_TAG_VOID
arg_info = (GIArgInfo *) 0x0
return_type = (GITypeInfo *) 0x0
arg_type = (GITypeInfo *) 0x0
tag = GI_TYPE_TAG_VOID
rarg = {v_boolean = 0, v_int8 = 0 '\0', v_uint8 = 0 '\0', v_int16 = 0, v_uint16 = 0, v_int32 = 0, v_uint32 = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_short = 0, v_ushort = 0, v_int = 0, v_uint = 0, v_long = 0,
v_ulong = 0, v_ssize = 0, v_size = 0, v_string = 0x0, v_pointer = 0x0}
return_arg = {v_boolean = 0, v_int8 = 0 '\0', v_uint8 = 0 '\0', v_int16 = 0, v_uint16 = 0, v_int32 = 0, v_uint32 = 0, v_int64 = 0, v_uint64 = 0, v_float = 0, v_double = 0, v_short = 0, v_ushort = 0, v_int = 0, v_uint = 0, v_long = 0,
v_ulong = 0, v_ssize = 0, v_size = 0, v_string = 0x0, v_pointer = 0x0}
ctx = (JSContextRef) 0x0
arg = (GArgument *) 0x0
mes = (gchar *) 0x0
#7 0xb7e382a9 in ?? () from /usr/lib/libffi.so.5
No symbol table info available.
#8 0xb7e38642 in ?? () from /usr/lib/libffi.so.5
No symbol table info available.
#9 0xb7ebb17f in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#10 0x00000000 in ?? ()
No symbol table info available.





** Message: [MISC] seed-types.c:760: got type 25
** Message: [MISC] seed-types.c:869: ADDING STRUCT
** Message: [STRUCTS] seed-structs.c:643: make struct: Thread
** Message: [CONSTRUCTION] seed-structs.c:722: Constructing struct/union of type: TreeIter. Size: 16

** Message: [STRUCTS] seed-structs.c:643: make struct: TreeIter

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb520a760 (LWP 12398)]
0xb7fb94db in seed_pointer_set_slice (ctx=0xb44e9620, pointer=0xb3d2cd40, free_pointer=1, size=16) at seed-structs.c:488
488 priv->slice_alloc = free_pointer;
(gdb) bt full
#0 0xb7fb94db in seed_pointer_set_slice (ctx=0xb44e9620, pointer=0xb3d2cd40, free_pointer=1, size=16) at seed-structs.c:488
priv = (seed_struct_privates *) 0x0
#1 0xb7fb9dba in seed_construct_struct_type_with_parameters (ctx=0xb44e9620, info=0x879dd08, parameters=0x0,
exception=0xbff091d0) at seed-structs.c:730
size = 16
object = (gpointer) 0x889eac0
type = GI_INFO_TYPE_STRUCT
ret = (JSObjectRef) 0xb3d2cd40
nparams = -1208373435
i = 0
length = 3084229932
field = (GIFieldInfo *) 0x0
jsprops = (JSPropertyNameArrayRef) 0xb7753f42
jsprop_name = (JSStringRef) 0xb3f98380
jsprop_value = (JSValueRef) 0xb44e96f0
field_value = {v_boolean = 143298048, v_int8 = 0 '\0', v_uint8 = 0 '\0', v_int16 = -29184, v_uint16 = 36352, v_int32 = 143298048, v_uint32 = 143298048, v_int64 = 107517480448, v_uint64 = 107517480448, v_float = 8.33895692e-34, v_double = 5.3120693416764718e-313, v_short = -29184, v_ushort = 36352, v_int = 143298048, v_uint = 143298048, v_long = 143298048, v_ulong = 143298048, v_ssize = 143298048, v_size = 143298048, v_string = 0x88a8e00 "ؿ\211\b8��� method: thread_create_full with 6 in arguments and 0 out argumeP", v_pointer = 0x88a8e00}
prop_name = (gchar *) 0x5 <Address 0x5 out of bounds>
field_type = (GITypeInfo *) 0xb7f9af45
__PRETTY_FUNCTION__ = "seed_construct_struct_type_with_parameters"
#2 0xb7fb4fed in seed_struct_constructor_invoked (ctx=0xb44e9620, constructor=0xb3f98380, argumentCount=0, arguments=0xbff09184,
exception=0xbff091d0) at seed-engine.c:133
info = (GIBaseInfo *) 0x879dd08
ret = (JSValueRef) 0xb7d4f63c
parameters = (JSObjectRef) 0x0
#3 0xb774a5be in JSC::JSCallbackObject<JSC::JSObject>::construct () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#4 0xb778f0c4 in cti_op_construct_NotJSConstruct () from /usr/lib/libwebkit-1.0.so.2
No symbol table info available.
#5 0xb4192438 in ?? ()
No symbol table info available.
#6 0xb7f8c3f8 in ?? () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#7 0xb3f98380 in ?? ()
No symbol table info available.
#8 0xfffffffe in ?? ()
No symbol table info available.
#9 0x0000000c in ?? ()



Message: [STRUCTS] seed-structs.c:50: Finalizing seed_pointer object 0x8ddd290. with priv->free_pointer = 0 with type: Thread, size: 0 ** Message: [STRUCTS] seed-structs.c:50: Finalizing seed_pointer object 0x8dbf190. with priv->free_pointer = 1 with type: Value, size: 12 ** Message: [STRUCTS] seed-structs.c:50: Finalizing seed_pointer object 0x8ddc400. with priv->free_pointer = 1 with type: TreeIter, size: 16 ** Message: [IMPORTER] seed-importer.c:485: seed_gi_importer_get_property with GLib ** Message: [IMPORTER] seed-importer.c:389: Using existing namespace ref (0xb43c39c0) for GLib ** Message: [IMPORTER] seed-importer.c:498: Result (0xb43c39c0) from attempting to import GLib: [object Object]
** Message: [MISC] seed-types.c:951: gvalue type: 147623880

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb514d760 (LWP 12407)]
gdk_window_queue (window=0x8d241f8, item=0x8de1270)
at /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/x11/gdkgeometry-x11.c:185 185 /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/x11/gdkgeometry-x11.c: No such file or directory. in /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/x11/gdkgeometry-x11.c
(gdb) bt full
#0 gdk_window_queue (window=0x8d241f8, item=0x8de1270)
at /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/x11/gdkgeometry-x11.c:185
item = (GdkWindowQueueItem *) 0x0
next = (GList *) 0x8d7ebc0
serial = 3716
tmp_list = (GList *) 0x8dc3890
display_x11 = (GdkDisplayX11 *) 0x8d1d000
#1 0xb698b065 in _gdk_x11_window_queue_antiexpose (window=0x8d241f8, area=0x8de34e0) at /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/x11/gdkgeometry-x11.c:258
No locals.
#2 0xb696ab69 in gdk_window_process_updates_internal (window=0x8d241f8)
at /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/gdkwindow.c:5238
expose_region = (GdkRegion *) 0x8de3620
save_region = <value optimized out>
clip_box = {x = 10, y = 210, width = 280, height = 50}
#3 0xb696cbff in IA__gdk_window_process_all_updates ()
at /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/gdkwindow.c:5328
old_update_windows = (GSList *) 0x8dbbaa8
tmp_list = (GSList *) 0x8dbbaa8
in_process_all_updates = 1
got_recursive_update = 0
#4 0xb696cc5b in gdk_window_update_idle (data=0x0)
at /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/gdkwindow.c:4954
No locals.
#5 0xb6948eeb in gdk_threads_dispatch (data=0x8de3a70) at /build/buildd-gtk+2.0_2.18.3-1-i386-YrT8XN/gtk+2.0-2.18.3/gdk/gdk.c:506
ret = 0
#6 0xb7d08141 in ?? () from /lib/libglib-2.0.so.0
No symbol table info available.
#7 0x08de3a70 in ?? ()
No symbol table info available.
#8 0x08ddc738 in ?? ()
No symbol table info available.
#9 0xb7edc39b in __pthread_mutex_unlock_usercnt () from /lib/i686/cmov/libpthread.so.0
No symbol table info available.
#10 0xb7d09f28 in g_main_context_dispatch () from /





Alan Knowles wrote:
I was wondering if you had some insight into this issue.

Code is here :http://www.akbkhome.com/svn/seed/gtk.js

Basically it's a pretty simple test, creates 2 widgets on a window, a button, and a treeview. After the treeview is filled via a Gio async file read, you can press on any of the tree elements, and it set's the button text to whatever tree node you pressed.

What I found however was that it would randomly segfault after a few presses, running gdb, indicated that the exact location of the segfault was not fixed, and was often inside a gtk internal refresh - unrelated to the setting code.

My suspicion is that this is due to thread locking (or lack thereof) with the Javascript code probably running in a different thread to Gtk.main()..

Do you have any thoughts. (cursor-changed code below for reference - the gtk.js relies on a data file, so it's a bit difficult to test)

Regards
Alan


'cursor-changed' : function(tv, a) {
var iter = new Gtk.TreeIter();
//console.log('changed');
var s = tv.selection;
s.get_selected(tv.model, iter);
// var val = "";
value = new GObject.Value();
tv.model.get_value(iter, 0, value);
console.log(value.get_string());
// _g.button.set_label(''+value.get_string());
//Seed.print( value.get_string());
return true;
}
_______________________________________________
libseed-list mailing list
libseed-list gnome org
http://mail.gnome.org/mailman/listinfo/libseed-list



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]