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 638208 - ObjectClass ref count increase fails
ObjectClass ref count increase fails
Status: RESOLVED DUPLICATE of bug 679481
Product: vala
Classification: Core
Component: Code Generator
0.11.x
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2010-12-28 19:22 UTC by Travis Reitter
Modified: 2014-06-27 04:17 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Travis Reitter 2010-12-28 19:22:20 UTC
unowned ObjectClass pclass = final_persona.get_class ();
=>
          GObjectClass* _tmp12_ = NULL;
          GObjectClass* pclass;
          GParamSpec* _tmp13_ = NULL;
          _tmp12_ = G_OBJECT_GET_CLASS ((GObject*) final_persona);
          pclass = _tmp12_;


var pclass = final_persona.get_class ();
=>
          GObjectClass* _tmp12_ = NULL;
          GObjectClass* _tmp13_;
          GObjectClass* pclass;
          GParamSpec* _tmp14_ = NULL;
          _tmp12_ = G_OBJECT_GET_CLASS ((GObject*) final_persona);
          _tmp13_ = _g_type_class_ref0 (_tmp12_);
          pclass = _tmp13_;

In this second case, _g_type_class_ref0 (_tmp12_) fails with:

GLib-GObject-WARNING **: cannot retrieve class for invalid (unclassed) type `(null)'

even though _tmp12_ is non-NULL.

The code for _g_type_class_ref0() looks fine:

static gpointer _g_type_class_ref0 (gpointer self) {
  return self ? g_type_class_ref (self) : NULL;
}
Comment 1 Travis Reitter 2011-11-01 17:59:47 UTC
This still exists as of Vala 0.14.0.49-e950
Comment 2 Evan Nemerson 2014-06-27 04:17:32 UTC

*** This bug has been marked as a duplicate of bug 679481 ***