Why would I see g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed?
- Date: Sun, 22 Apr 2018 12:56:47 -0400
- From: Brendan Long <self@xxxxxxxxxxxxxxx>
- Subject: Why would I see g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed?
I'm not sure if this is a Glib, Meson or Vala thing, but I don't even understand why this glib error would ever happen so I hope this is the right place to ask (I know it means "this type is null", but I have no idea why that would ever be the case).
I'm trying to convert a Vala project that uses dynamically loaded plugins to Meson:
For some reason, linking a test exectable with one of our plugins causes errors like:
(./plugins/backend/feedbin/test_feedbin:27002): GLib-GObject-CRITICAL **: g_object_new_with_properties: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Trace/breakpoint trap (core dumped)
The file is just a simple class that extends GLib.object: https://github.com/brendanlong/FeedReader/blob/meson/plugins/backend/feedbin/feedbinAPI.vala
The meson build is here, if that matters: https://github.com/brendanlong/FeedReader/blob/meson/plugins/backend/feedbin/meson.build
We were getting similar issues when linking our main library statically, but it's a shared library now (and the plugin has always been a shared library).
The only things I could find on Google were versioning issues, but I get this error in Docker, where no other version of FeedReader is installed:
Can someone help me understand what's going wrong, and what I might do to fix it?