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



Hi James,

On Sun, Jun 26, 2011 at 2:00 AM, James Liggett <jrliggett cox net> wrote:
Besides, the widgets are
still intact when I get the critical. If we take a closer look at the
message I get:

(anjuta:27688): Anjuta-CRITICAL **: anjuta_app_hide_dockable_widget:
assertion `app->widgets != NULL' failed

The complaint is *not* about the widget that gets passed to it, but the
widgets table contained in AnjutaApp, which has been destroyed and its
pointer set to NULL. I checked into this and found that AnjutaApp's
dispose handler does unref the widgets table and set it to NULL, which
causes this critical to appear when my widget's unmap handler gets
called.

That's true about the error. However, the real thing is, it shouldn't
be called at that point because the widget tree is being destroyed
(that's why you receive the unmap event) and depending on where your
second widget is in the tree, it is either dead or about to be. I
suggested weak ref would help there. If not, obviously go with the
"exiting" signal. Ideally, anjuta should exit without destroying the
widgets to avoid emitting spurious signals like the one you just
received, and that's where I suggesting trying the gtk_main_quit().
But since it didn't work, I guess some other approach could be
investigated. I guess we can't just call exit(0)?

Regards,
-Naba



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