dbus glib string array errors
keith preston
keithpre at gmail.com
Thu Aug 24 12:02:57 PDT 2006
I am trying to send some arrays across DBUS with glib bindings and get an
error and segfault when I send empty string array. I believe it should
gracefully handle this case. It does seem to handle empty GArrays, but not
string arrays.
I send the following:
'as' array of string glib bindings show this as a char** so I am assuming I
need to null terminate this array
char** arraystrings = malloc(sizeof(char*) * (sizeofarray +1) )
arraystrings[sizeofarray] = NULL;
If I do this with empty arrays (sizeofarray = 0). My server process
answering the dbus request segfaults with the following error
27088: arguments to dbus_message_iter_get_fixed_array() were incorrect,
assertion "dbus_type_is_fixed (_dbus_type_reader_get_current_type (&real->
u.reader))" failed in file dbus-message.c line 1741.
If I change the code to give it one element it works great. But it always
fails with zero.
Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20060824/63ffbd5e/attachment.html
More information about the dbus
mailing list