GNOME Bugzilla – Bug 650836
Segfault when using a signal which takes a delegate as parameter
Last modified: 2018-05-22 14:03:34 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
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
Thanks for your bug report. This still triggers CRITICALs with Vala master.
-- 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.