Compiz unloads (CompScreen dtor) and reloads (CompScreen ctor) almost all plugins each time a plugin is added or removed. All the Compiz plugins support that correctly, apart the Unity one which leaks GLib sources, GLib signals, sigc signals and some instances when it's unloaded. It crashes because some objects emit signals on instances that have already been destroyed.
It's a bug in Unity, but it revealed another bug in Compiz that shouldn't unload/reload plugins when a plugin is simply added/removed.
Compiz unloads (CompScreen dtor) and reloads (CompScreen ctor) almost all plugins each time a plugin is added or removed. All the Compiz plugins support that correctly, apart the Unity one which leaks GLib sources, GLib signals, sigc signals and some instances when it's unloaded. It crashes because some objects emit signals on instances that have already been destroyed.
It's a bug in Unity, but it revealed another bug in Compiz that shouldn't unload/reload plugins when a plugin is simply added/removed.