GNOME Bugzilla – Bug 668438
IANJUTA_SYMBOL_FIELD_IS_CONTAINER has wrong column type
Last modified: 2012-01-25 21:38:33 UTC
The documentation says it should be boolean (which sounds reasonable) but actually it is integer and as such ianjuta_symbol_get_boolean() fails.
Can you please tell me the steps to reproduce the bug with glade (as in the mailing list problem)? I've never used it and I'd like to see the output of insert_after_mark () function.
In git master (with the patch attached to the mail applied): * Create a GtkApplication project * Open the ui file * Open the application.c file * Double click on a widget in the list (glade-inspector), window1 for example * The widget is added as a member of the struct and insert_after_mark() is called. It doesn't exactly reproduce the problem reported as I use ianjuta_symbol_get_int() on IANJUTA_SYMBOL_FIELD_IS_CONTAINER atm but _get_bool() should be more correct in that case.
Created attachment 205924 [details] [review] proposed patch actually I wasn't able to reproduce the problem with glade (the insert_after_mark () is never called here), but I suppose I found the problem. SQLite doesn't have boolean types, just integer mapped as 0 and 1. As such the isymbol_get_boolean () must use the G_TYPE_INT value as an integer and "convert" it into gboolean. Please try with the attached patch.
Are you sure it's never called? Did the glade plugin work and did you double click on a widget in the list (not in the main glade document window but the inspector list on the side) while the application.c file was the "current document?
oh, ok. Now it works. I missed the "current document". Well, it crashes with Program received signal SIGSEGV, Segmentation fault. 0x00007ffff567e01a in g_object_unref () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (gdb) bt
+ Trace 229510
A debugging session is active. which is something happening with g_object_unref () on language_support_get_mark_position (). I'll bypass this for now.
ok, I've fixed it on master.
Created attachment 206135 [details] [review] patch without crash the attached patch doesn't produce the crash as pointed out before in this bugreport.