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



[Resending to list to make sure that it shows up in the archive...]

On Wed, 2011-06-22 at 13:22 +0300, Naba Kumar wrote:
However, to potentially fix it better way, try this little change. Put
an else statement at anjuta.c:121 just before the return statement and
call gtk_main_quit() there. The idea is not to bother going any
further with widgets destruction if proper-shutdown wasn't mentioned.
This is also what we wanted originally anyways. If this works, then
it's better than the weak-ref/signal approach.
I tried this; it doesn't have any effect. But, running Anjuta with
--proper-shutdown fixes the problem completely. 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. 

At the time this critical happens, my widget is still intact. I checked
this with some tests I did by hooking into the widget's destroy signal
and with weak refs. The unmap signal happens *before* destroy/finalize,
I still don't see how weak refs on the widgets help here. 

Thanks,
James






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