Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdp_portal_spawn crashes #156

Open
2-www opened this issue Aug 17, 2024 · 0 comments
Open

xdp_portal_spawn crashes #156

2-www opened this issue Aug 17, 2024 · 0 comments

Comments

@2-www
Copy link

2-www commented Aug 17, 2024

examples in vala and javascript:

toolbox$ cat ./example.vala 
#! /usr/bin/env -S vala --pkg libportal
void main() {
	new Xdp.Portal().spawn.begin(".", {"true"}, null, null, null, NONE, null, null, null, () => {print("ok\n");});
	new MainLoop().run();
}

toolbox$ ./example.vala 
/tmp/example.vala.44UNS2.c: In function ‘_vala_main’:
/tmp/example.vala.44UNS2.c:67:40: warning: passing argument 3 of ‘xdp_portal_spawn’ from incompatible pointer type [-Wincompatible-pointer-types]
   67 |         xdp_portal_spawn (_tmp1_, ".", _tmp4_, NULL, NULL, (gint) 0, NULL, XDP_SPAWN_FLAG_NONE, NULL, NULL, NULL, ___lambda4__gasync_ready_callback, NULL);
      |                                        ^~~~~~
      |                                        |
      |                                        gchar ** {aka char **}
In file included from /usr/include/libportal/portal.h:37,
                 from /tmp/example.vala.44UNS2.c:4:
/usr/include/libportal/spawn.h:50:70: note: expected ‘const char * const*’ but argument is of type ‘gchar **’ {aka ‘char **’}
   50 |                                                const char * const   *argv,
      |                                                ~~~~~~~~~~~~~~~~~~~~~~^~~~

(process:319024): GLib-CRITICAL **: 20:37:17.663: g_variant_builder_end: assertion 'valid_builder' failed

(process:319024): GLib-CRITICAL **: 20:37:17.663: g_variant_get_type: assertion 'value != NULL' failed

(process:319024): GLib-CRITICAL **: 20:37:17.663: g_variant_type_is_array: assertion 'g_variant_type_check (type)' failed

(process:319024): GLib-CRITICAL **: 20:37:17.663: g_variant_get_type_string: assertion 'value != NULL' failed

(process:319024): GLib-ERROR **: 20:37:17.663: g_variant_new: expected array GVariantBuilder but the built value has type '(null)'
toolbox$ gjs
gjs> new imports.gi.Xdp.Portal().spawn(".", ["echo", "123"], null, null, [], 0, [], [], null, () => console.log("ok"));

(gjs:319291): GLib-CRITICAL **: 20:39:54.697: g_variant_builder_end: assertion 'valid_builder' failed

(gjs:319291): GLib-CRITICAL **: 20:39:54.697: g_variant_get_type: assertion 'value != NULL' failed

(gjs:319291): GLib-CRITICAL **: 20:39:54.697: g_variant_type_is_array: assertion 'g_variant_type_check (type)' failed

(gjs:319291): GLib-CRITICAL **: 20:39:54.697: g_variant_get_type_string: assertion 'value != NULL' failed

(gjs:319291): GLib-ERROR **: 20:39:54.697: g_variant_new: expected array GVariantBuilder but the built value has type '(null)'
Переривання на точці зупину
toolbox$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant