After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668438 - IANJUTA_SYMBOL_FIELD_IS_CONTAINER has wrong column type
IANJUTA_SYMBOL_FIELD_IS_CONTAINER has wrong column type
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: symbol-db
git master
Other Linux
: Normal normal
: ---
Assigned To: Massimo Cora'
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-22 14:53 UTC by Johannes Schmid
Modified: 2012-01-25 21:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (523 bytes, patch)
2012-01-23 22:30 UTC, Massimo Cora'
committed Details | Review
patch without crash (8.15 KB, patch)
2012-01-25 21:38 UTC, Massimo Cora'
none Details | Review

Description Johannes Schmid 2012-01-22 14:53: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.
Comment 1 Massimo Cora' 2012-01-23 18:36:19 UTC
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.
Comment 2 Johannes Schmid 2012-01-23 21:32:15 UTC
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.
Comment 3 Massimo Cora' 2012-01-23 22:30:55 UTC
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.
Comment 4 Johannes Schmid 2012-01-24 17:40:02 UTC
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?
Comment 5 Massimo Cora' 2012-01-24 22:39:42 UTC
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
  • #0 g_object_unref
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #1 language_support_get_mark_position
    at plugin.c line 615
  • #2 insert_after_mark
    at plugin.c line 833
  • #3 insert_member_decl_and_init
    at plugin.c line 940
  • #4 on_glade_member_add
    at plugin.c line 951
  • #5 g_closure_invoke
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #6 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #7 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #8 g_signal_emit_by_name
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #9 add_glade_member
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.
Comment 6 Massimo Cora' 2012-01-24 23:05:37 UTC
ok, I've fixed it on master.
Comment 7 Massimo Cora' 2012-01-25 21:38:33 UTC
Created attachment 206135 [details] [review]
patch without crash

the attached patch doesn't produce the crash as pointed out before in this bugreport.