Re: [anjuta-devel] Deactivate plugin handlers not getting called when Anjuta exits?



On Thu, 2011-06-16 at 23:10 +0300, Naba Kumar wrote:
(anjuta:27743): Anjuta-CRITICAL **: anjuta_app_hide_dockable_widget:
assertion `app->widgets != NULL' failed

I suppose it happens because you still hold a reference to the widget
despite having it being killed during somewhere else during shutdown.
To get around it, try listening for a weak reference on the widget and
"disengage" any attempt to use it further (normally, by just setting
NULL to the pointer variable).
What's happening here is that the plugin gets the unmap signal and then
tries to call to AnjutaApp after its widgets table is destroyed. I think
AnjutaApp is disposed at this point, but not finalized. I could try
getting a weak reference on AnjutaShell, but I'm not sure that this
would work because those only call the callback when the object is
finalized, not when it's disposed. 

Your disconnecting handlers approach didn't probably work because the
two widgets (the other one being the widget triggering the signal)
aren't related in life-cycle enough to guarantee unreferenced
pointers.
Ok, so how can I know when the app is shutting down so I can make sure
not to call anjuta_shell_hide_dockable_widget? Does
AnjutaShell/AnjutaApp emit a "destroyed" signal or similar on dispose
like GtkWidget does? 

As an aside, this discussion seems like we're trying to work around a
design flaw in the plugin system, in that they don't properly deactivate
themselves on shutdown. I'd feel much better if we could work that out
somehow...

Thanks,
James





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]