[Vala] Trouble with array properties on a DBus server



Hi,


First of all, I am no Vala expert, so keep in mind I could easily be
making a silly mistake here :)

So I'm playing with a little DBus server / client thing, where there's
one central service and other services register themselves with it.
(Lots of neat little issues emerge involving threading, etc).

Here is one DBus interface I'm working with:

[DBus (name = "test.dylan-m.Blah")]
public class Blah : Object {
        public string name { get; set; }
        public string description { get; set; }
        public string[] mimetypes { get; set; }
}


Now, in a separate process, I have code that receives a path to an
object on DBus and uses some of the information it stores.

It is completely happy if I access the name property. So I can have
something like:

dynamic DBus.Object blah = this.connection.get_object (sender,
source_path, "test.dylan-m.Blah");
string name = blah.name

…and everything is happy. However, if I do:

string[] mimetypes = blah.mimetypes

…Everything comes to a screeching halt.

** (valac:22666): CRITICAL **: vala_dbus_module_get_basic_type_info:
assertion `signature != NULL' failed

** (valac:22666): CRITICAL **: vala_dbus_module_get_basic_type_info:
assertion `signature != NULL' failed

** (valac:22666): CRITICAL **: vala_ccode_assignment_construct:
assertion `r != NULL' failed

** (valac:22666): CRITICAL **:
vala_ccode_expression_statement_construct: assertion `expr != NULL'
failed

** (valac:22666): CRITICAL **: vala_ccode_fragment_append: assertion
`node != NULL' failed

** (valac:22666): CRITICAL **: vala_dbus_module_get_basic_type_info:
assertion `signature != NULL' failed
Segmentation fault

** (valac:22668): CRITICAL **: vala_dbus_module_get_basic_type_info:
assertion `signature != NULL' failed

** (valac:22668): CRITICAL **: vala_dbus_module_get_basic_type_info:
assertion `signature != NULL' failed

** (valac:22668): CRITICAL **: vala_ccode_assignment_construct:
assertion `r != NULL' failed

** (valac:22668): CRITICAL **:
vala_ccode_expression_statement_construct: assertion `expr != NULL'
failed

** (valac:22668): CRITICAL **: vala_ccode_fragment_append: assertion
`node != NULL' failed

** (valac:22668): CRITICAL **: vala_dbus_module_get_basic_type_info:
assertion `signature != NULL' failed


If I remove the awesome Properties stuff from the mimetypes variable and
add a get_mimetypes() method that returns string[], then call that from
the code above, Vala doesn't complain and the program works just fine.
However, I like properties :)

Could someone explain why this is happening? Feels very odd to me.



Thanks!
Dylan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]