Unsolicitated invocation of g_object_run_dispose() on GTypeModule when running unit tests

I’m getting a GLib-GObject-FATAL-CRITICAL with the message unsolicitated invocation of g_object_run_dispose() on GTypeModule when I run some of the libpurple tests. It looks like the affected tests are those which include test_ui.h. I didn’t test all of them but test_contact_info and test_protocol_contacts definitely show this behaviour.

The critical is happening when the plugins are removed in the cleanup phase. This is a backtrace from valgrind:

Process terminating with default action of signal 5 (SIGTRAP)          
   at 0x4C7AC79: g_logv (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7800.4)      
   by 0x4C7AF02: g_log (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7800.4)               
   by 0x4BF3C78: ??? (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7800.4)          
   by 0x4BD29BF: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7800.4)
   by 0x4F479A3: gplugin_manager_remove_list_value (gplugin-manager.c:119)
   by 0x4C5D710: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7800.4)
   by 0x4F47F9F: gplugin_manager_finalize (gplugin-manager.c:294)
   by 0x4BD2A8B: g_object_unref (in /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.7800.4)
   by 0x4F4850D: gplugin_manager_private_uninit (gplugin-manager.c:548)
   by 0x4F45F9E: gplugin_uninit (gplugin-core.c:93)
   by 0x48B887B: purple_plugins_uninit (plugins.c:522)
   by 0x48A3674: purple_core_quit (core.c:266)

Anybody else getting this critical message?

I wonder if this is related to the same message that comes up during build from ircv3generategir. But the critical when running tests is not limited to the IRCv3 plugin. I manually excluded the plugins, which otherwise would cause the critical message, from being unref’d and it happens with all GObject based plugins it seems.

This is an issue with unloading the plugins by calling gplugin_manager_unload_plugin on native plugins which happens at application shutdown too so you’ll see it spammed there as well.

There’s some stuff I’m not clear on when it comes to GTypeModule and I haven’t really spent the time looking into it.

1 Like