Re: Strange segfaults



Hi,

On 2001.08.16 17:16 Peter Bloomfield wrote:
> I ran into the same problem in setting up the File->New->Remote IMAP
> subfolder `Subfolder of' browse button. I gave up on balsa_mblist_new, and
> just copied the code from balsa_mblist_repopulate (browse_button_cb, in
> src/folder-conf.c). If you find a more correct solution, please let me
> know!

As requested:

When a balsa mblist is created, it is populated with the existing mailboxes.
These mailboxes are shared between all instances of the mailbox tree.
Signals then get connected to the _mailboxes_, with the _tree_ as user data!
Now, guess what happens when the tree disappears? The functions will get
called with an invalid pointer argument, causing a segfault in gtk.
The solution is to disconnect the signals on destroy. I copied the code
(first 10 lines) from repopulate into destroy. I don't yet know if that has
ill side effects, but I don't think so. If anything, it would affect all
like submenus, which is not a problem because they're short-lived and don't
display message counts anyway.

The fix will be included in my next patch.

Melanie




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