gtkd-developers / GtkD

GtkD is a D binding and OO wrapper of GTK+ originally created by Antonio Monteiro
http://gtkd.org
Other
322 stars 71 forks source link

Unittest failures on travis #144

Closed BlackEdder closed 8 years ago

BlackEdder commented 8 years ago

I am trying to use travis to test one of my projects that depends on gtkd, but when building it and running the unittests (on travis) I get the errors below. Note that I don't seem to get the same errors on my own machine.

- ListG.2299
  +----------------------------------------------------------------------
  | unittest failure
  +----------------------------------------------------------------------
  | File: ../../../.dub/packages/gtk-d-3.2.2/src/glib/ListG.d
  | Line: 124
  +----------------------------------------------------------------------
- ListSG.2302
  +----------------------------------------------------------------------
  | unittest failure
  +----------------------------------------------------------------------
  | File: ../../../.dub/packages/gtk-d-3.2.2/src/glib/ListSG.d
  | Line: 111
  +----------------------------------------------------------------------

Both errors seem to be very similar (last code line):

    unittest
    {
        import gobject.Value;

        auto list = new ListG(null);
        list = list.append(new Value(0).getValueStruct());
        list = list.append(new Value(1).getValueStruct());
        auto arr = list.toArray!Value();

        assert(arr[0].getInt() == 0);
-->             assert(arr[1].getInt() == 1);  <---
    }
BlackEdder commented 8 years ago

On top of the above errors I also see the following errors that might be related. Maybe I am missing an dependency for travis?

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:4206: type id `24' is invalid

(process:2815): GLib-GObject-WARNING **: can't peek value table for type `<unknown>' which is not currently referenced

(process:2815): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:3297: You forgot to call g_type_init()

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(process:2815): GLib-GObject-CRITICAL **: g_value_set_int: assertion `G_VALUE_HOLDS_INT (value)' failed

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:4206: type id `24' is invalid

(process:2815): GLib-GObject-WARNING **: can't peek value table for type `<unknown>' which is not currently referenced

(process:2815): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:3297: You forgot to call g_type_init()

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(process:2815): GLib-GObject-CRITICAL **: g_value_set_int: assertion `G_VALUE_HOLDS_INT (value)' failed

(process:2815): GLib-GObject-CRITICAL **: g_value_get_int: assertion `G_VALUE_HOLDS_INT (value)' failed

(process:2815): GLib-GObject-CRITICAL **: g_value_get_int: assertion `G_VALUE_HOLDS_INT (value)' failed

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:4206: type id `24' is invalid

(process:2815): GLib-GObject-WARNING **: can't peek value table for type `<unknown>' which is not currently referenced

(process:2815): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:3297: You forgot to call g_type_init()

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(process:2815): GLib-GObject-CRITICAL **: g_value_set_int: assertion `G_VALUE_HOLDS_INT (value)' failed

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:4206: type id `24' is invalid

(process:2815): GLib-GObject-WARNING **: can't peek value table for type `<unknown>' which is not currently referenced

(process:2815): GLib-GObject-CRITICAL **: /build/buildd/glib2.0-2.32.4/./gobject/gtype.c:3297: You forgot to call g_type_init()

(process:2815): GLib-GObject-WARNING **: /build/buildd/glib2.0-2.32.4/./gobject/gvalue.c:192: cannot initialize GValue with type `(null)', this type has no GTypeValueTable implementation

(process:2815): GLib-GObject-CRITICAL **: g_value_set_int: assertion `G_VALUE_HOLDS_INT (value)' failed

(process:2815): GLib-GObject-CRITICAL **: g_value_get_int: assertion `G_VALUE_HOLDS_INT (value)' failed

(process:2815): GLib-GObject-CRITICAL **: g_value_get_int: assertion `G_VALUE_HOLDS_INT (value)' failed
BlackEdder commented 8 years ago

This seems to be because travis still uses ubuntu 12.04. I now use their beta environment (14.04) and the errors disappeared. Sorry for the noise.

MikeWey commented 8 years ago

The unittest in GtkD doesn't call g_type_init which isn't necessary for GLib 2.36 and up.