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 650836 - Segfault when using a signal which takes a delegate as parameter
Segfault when using a signal which takes a delegate as parameter
Status: RESOLVED OBSOLETE
Product: vala
Classification: Core
Component: Delegates
unspecified
Other All
: Normal normal
: 1.0
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-23 06:53 UTC by Alexander Kurtz
Modified: 2018-05-22 14:03 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Kurtz 2011-05-23 06:53:58 UTC
Hi,

I'm pretty sure this is a bug:

        $ cat Test.vala 
        class Test : Object {
                delegate void MyDelegate();
                signal void my_signal(MyDelegate d);
                static void main(){
                }
        }
        $ valac-0.12 Test.vala 
        Segmentation fault
        $ 

There are a lot of open reports about vala segfaulting when using delegates,
but I didn't find one in combination with signals, so I decided to file a new one.

Best regards

Alexander Kurtz
Comment 1 jtxx000 2012-04-16 21:48:39 UTC
For me, this doesn't even compile.

        $ valac Test.vala 

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: string_replace: assertion `self != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_type_id: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_constant_construct: assertion `_name != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_function_call_add_argument: assertion `expr != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: string_replace: assertion `self != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: string_replace: assertion `self != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_parameter_construct: assertion `type != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_function_declarator_add_parameter: assertion `param != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: string_replace: assertion `self != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_marshaller_type_name: assertion `node != NULL' failed

        ** (valac:29365): CRITICAL **: string_replace: assertion `self != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_base_module_get_ccode_get_value_function: assertion `sym != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_identifier_construct: assertion `_name != NULL' failed

        ** (valac:29365): CRITICAL **: vala_ccode_expression_write_inner: assertion `self != NULL' failed
        /tmp/Test.vala.c:40:13: error: ‘g_cclosure_user_marshal_VOID__’ declared as function returning a function
        /tmp/Test.vala.c:40:1: warning: parameter names (without types) in function declaration [enabled by default]
        /tmp/Test.vala.c:66:13: error: ‘g_cclosure_user_marshal_VOID__’ declared as function returning a function
        /tmp/Test.vala.c: In function ‘g_cclosure_user_marshal_VOID__’:
        /tmp/Test.vala.c:67:2: warning: parameter names (without types) in function declaration [enabled by default]
        /tmp/Test.vala.c:68:37: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘callback’
        /tmp/Test.vala.c:68:37: error: ‘callback’ undeclared (first use in this function)
        /tmp/Test.vala.c:68:37: note: each undeclared identifier is reported only once for each function it appears in
        /tmp/Test.vala.c:72:21: error: ‘closure’ undeclared (first use in this function)
        /tmp/Test.vala.c:73:2: error: ‘n_param_values’ undeclared (first use in this function)
        /tmp/Test.vala.c:76:11: error: ‘param_values’ undeclared (first use in this function)
        /tmp/Test.vala.c:81:34: error: expected ‘)’ before ‘null’
        /tmp/Test.vala.c:81:41: error: expected ‘;’ before ‘(’ token
        /tmp/Test.vala.c: In function ‘test_class_init’:
        /tmp/Test.vala.c:88:105: error: ‘null’ undeclared (first use in this function)
        error: cc exited with status 256
        Compilation failed: 1 error(s), 0 warning(s)

Cheers,
Caleb
Comment 2 Michael 'Mickey' Lauer 2018-02-21 13:55:09 UTC
Thanks for your bug report. This still triggers CRITICALs with Vala master.
Comment 3 GNOME Infrastructure Team 2018-05-22 14:03:34 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/vala/issues/205.