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 577620 - low-level delegate generation crashes vala
low-level delegate generation crashes vala
Status: RESOLVED DUPLICATE of bug 592769
Product: vala
Classification: Core
Component: Code Generator
unspecified
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-01 16:34 UTC by Allison Karlitskaya (desrt)
Modified: 2010-03-26 17:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Allison Karlitskaya (desrt) 2009-04-01 16:34:43 UTC
test case:
class xyz {
  void func () { }

  void a (GLib.Object obj) {
    Signal.connect (obj, "my_signal", func, null);
  }
}


fails with this assertion:
ERROR:arraylist.c:177:gee_array_list_real_get: assertion failed: (_tmp0)

which is really an access-out-of-bounds-index-in-array error.  backtrace includes:
  • #9 vala_ccode_delegate_module_generate_delegate_wrapper
    at valaccodedelegatemodule.c line 772

and the region in the .vala code responsible:

  if (m.binding == MemberBinding.INSTANCE) {
    CCodeExpression arg;
    if (d.has_target) {
      arg = new CCodeIdentifier ("self");
    } else {
      // use first delegate parameter as instance
      arg = new CCodeIdentifier ((d_params.get (0).ccodenode as
                                  CCodeFormalParameter).name);

problem, of course, is that the func() function doesn't have a parameter #0.
Comment 1 Michael Gratton 2010-01-08 05:54:10 UTC
I'm seeing something like this with valac 0.7.9, when using a local delegate declaration.

> ERROR:arraylist.c:320:vala_array_list_real_get: assertion failed: ((index >= 0) && (index < self->priv->_size))

The backtrace looks like:

  • #4 vala_array_list_real_get
    at arraylist.c line 320
  • #5 vala_ccode_delegate_module_generate_delegate_wrapper
    at valaccodedelegatemodule.c line 1554
  • #6 vala_ccode_delegate_module_real_get_implicit_cast_expression
    at valaccodedelegatemodule.c line 1254

Comment 2 Jürg Billeter 2010-03-26 17:23:00 UTC
Thanks for taking the time to report this bug.
This particular bug has already been reported into our bug tracking system, but we are happy to tell you that the problem has already been fixed. It should be solved in the next software version. You may want to check for a software upgrade.

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