assertion failed: (object == G_OBJECT (sRegistry)) when no session bus
Compile and install libspiel and libspeechprovider on Fedora Linux 39.
Create a simple C program, which compiles but fails to execute.
...
#include <spiel/spiel.h>
#include <spiel/spiel-speaker.h>
gint main(gint argc, gchar **argv) {
GError *error = NULL;
SpielSpeaker *speaker;
GListModel * providers;
speaker = spiel_speaker_new_sync(NULL, &error);
if (error)
g_error("Error: %s\n", error->message);
return EXIT_SUCCESS;
}
ERROR:../libspiel/spiel-registry.c:436:spiel_registry_finalize: assertion failed: (object == G_OBJECT (sRegistry))
Bail out! ERROR:../libspiel/spiel-registry.c:436:spiel_registry_finalize: assertion failed: (object == G_OBJECT (sRegistry))
Aborted
I don't know if I am failing in the implementation because I can't find a C program to use as a reference. I would appreciate the help.
That is very strange. I don't know why the registry would be destroyed at that stage. FYI, there is a command line C program in utils/spiel.c for your reference, along with a few C tests. Any luck with those?
I tried your program locally and it worked alright.
Worked okay for me too, although I guess it's possible a compiler might be doing something funky (I used gcc-14.0.1).
My wild guess it that the G_OBJECT () cast might be failing, since it's already chained up and that causes the assertion failure. If that's true, maybe the cast failure isn't printed before the program aborts?
@eeejay @andyholmes
My oversight: I was working inside a container, which does not have access to X11 and dbus.
I tested using 'toolbox' and it works.
Sorry for the inconvenience.
@eeejay I guess in that case, it's probably that if the registry fails initialization, when the "temporary" object is finalized it has not been assigned to sRegistry?
I think we should keep this open because the error message is useless and it should be better than that.
@eeejay Is there a channel to ask questions about the project? For example, I would like if you can indicate a folder with the onnx models for 'piper'.
gnome:#a11y on matrix works for now
gnome:#a11y on matrix works for now
Thank you. I already joined.