Re: [Vala] Is creating dbus interfaces in type modules (plugins) broken?
- From: Jürg Billeter <j bitron ch>
- To: PCMan <pcman tw gmail com>
- Cc: vala-list <vala-list gnome org>
- Subject: Re: [Vala] Is creating dbus interfaces in type modules (plugins) broken?
- Date: Thu, 29 Nov 2012 10:39:19 +0100
On Thu, 2012-11-29 at 10:06 +0800, PCMan wrote:
I tried to develop some type modules for my program.
Everything works fine initially and [ModuleInit] registered GObject dynamic
classes automagically as expected.
However, after I move a previously working dbus interface to that type
module, I got crashes.
Support for dynamic types will likely be removed from a future GLib
version¹, i.e., you will no longer be able to unload modules. Can you
try whether you can fix the crashes by simply removing the [ModuleInit]
attribute? Module loading should still work the same way, you just won't
be able to unload it without restarting the process.
If you want to keep using dynamic types and help finding the solution
for this bug, can you please try the following?
* Replace G_DEFINE_TYPE_EXTENDED in the generated .c file by
G_DEFINE_DYNAMIC_TYPE_EXTENDED (for the UPower proxy)
* Add upower_upower_proxy_register_type(type_module) to your
plugin_init function right after the call to
upower_upower_register_type
Regards,
Jürg
¹ http://blogs.gnome.org/mclasen/2012/10/08/gnome-summit-sunday/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]