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 688533 - symbol-db: g_value_copy() critical due to null values in database.
symbol-db: g_value_copy() critical due to null values in database.
Status: RESOLVED FIXED
Product: anjuta
Classification: Applications
Component: plugins: symbol-db
unspecified
Other All
: Normal normal
: ---
Assigned To: Massimo Cora'
Anjuta maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-17 13:53 UTC by Carl-Anton Ingmarsson
Modified: 2013-02-27 22:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
symbol-db: don't allow or set null scope_definition_id and scope_id. (3.90 KB, patch)
2012-11-17 13:53 UTC, Carl-Anton Ingmarsson
reviewed Details | Review

Description Carl-Anton Ingmarsson 2012-11-17 13:53:56 UTC
The following assertion is due to src_value being GDA_TYPE_NULL but dest value being G_TYPE_INT. I've attached a patch that gets rid of this warning by fixing so that we never store any null values for scope_definition_id and scope_id.

(anjuta:22387): GLib-GObject-CRITICAL **: g_value_copy: assertion `g_value_type_compatible (G_VALUE_TYPE (src_value), G_VALUE_TYPE (dest_value))' failed

Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x2aaaae1e6940 (LWP 22387)]
0x00002aaaacfe7c30 in g_logv (log_domain=0x2aaaacd7eab0 "GLib-GObject", log_level=G_LOG_LEVEL_CRITICAL, format=0x2aaaad06cc4c "%s: assertion `%s' failed", args=0x7fffffffb678) at gmessages.c:967
967			G_BREAKPOINT ();
(gdb) bt
    expression=0x2aaaacd7ec60 "g_value_type_compatible (G_VALUE_TYPE (src_value), G_VALUE_TYPE (dest_value))") at gmessages.c:1012
Comment 1 Carl-Anton Ingmarsson 2012-11-17 13:53:58 UTC
Created attachment 229237 [details] [review]
symbol-db: don't allow or set null scope_definition_id and scope_id.

Add not null constraints to the two fields and fixup PREP_QUERY_SYMBOL_NEW and
PREP_QUERY_UPDATE_SYMBOL_SCOPE_ID so that they don't set the fields to null.

The scope_id lookup in PREP_QUERY_SYMBOL_NEW can be removed since
the call to sdb_engine_add_new_scope_definition() at symbol-db-engine-core.c:4830 already
does  the lookup.
Comment 2 Massimo Cora' 2012-11-21 23:01:54 UTC
Thanks, I'll have a look at the patch ASAP.
The bug is really similar to #687054
Comment 3 Massimo Cora' 2013-02-27 22:20:46 UTC
Comment on attachment 229237 [details] [review]
symbol-db: don't allow or set null scope_definition_id and scope_id.

I've removed the version change "371.0" because we already are at 373.0
Comment 4 Massimo Cora' 2013-02-27 22:21:23 UTC
I've committed the patch, thanks.