Some signals have not been disconnected.



Hi there,

It seems some signals have not been disconnected
and some callback functions have been invoked with garbage arguments
several times.

In src/balsa-index.c, some signals have been connected to mailbox widget,
for example,

  gtk_signal_connect(GTK_OBJECT(mailbox), "message-new",
                     GTK_SIGNAL_FUNC(mailbox_message_new_cb),
                     (gpointer)bindex);

In some cases, even if 'bindex' is destroyed, 
this signal will remain and mailbox_message_new_cb will be
invoked with destroyed 'bindex'.
For example, if you reopen mailbox several times,
this problem will arise.

I think these signal should be disconnected before BalsaIndex is destroyed.
For example, a function 'balsa_index_page_close_and_destroy' in
src/balsa-index-page.c should be

  if( page->index ) {
+  gtk_signal_disconnect_by_data(GTK_OBJECT(BALSA_INDEX(page->index)->mailbox),
+                                BALSA_INDEX(page->index));
    gtk_widget_destroy( GTK_WIDGET( page->index ) );
    page->index = NULL;
  }

At present, I am implementing jwz's message threading
algorithm and I found avobe glitch in debuging process for it.
Mostly conding has be done, I will feedback it after a while.

Regards,
--
ymnk, JCraft Inc., mailto: ymnk@jcraft.com




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