The following simple code is sufficient to reproduce the error I am having.
#include <gio/gio.h>
int main()
{
GVariantIter *Iter;
const gchar* s = "[('appname', uint64 size, uint64 field, false)]";
GVariant* up = g_variant_new_string(s);
Iter = g_variant_iter_new(up);
return 0;
}
It is resulting in:
GLib:ERROR:../../../glib/gvariant-serialiser.c:1367:g_variant_serialised_n_children: code should not be reached Bail out! GLib:ERROR:../../../glib/gvariant-serialiser.c:1367:g_variant_serialised_n_children: code should not be reached Aborted
What am I missing? The documentation is somewhat vague.
GVariant * g_variant_new_string (const gchar *string);
Creates a string GVariant with the contents of string.
GVariantIter * g_variant_iter_new (GVariant *value);
Creates a heap-allocated GVariantIter for iterating over the items in value.