Thunderbird Test Day

Today is the first Thunderbird test day using the potential Shredder Alpha 1 builds. Find out more about the test day here.

Having been working on various bits of Thunderbird’s Core MailNews code (and some of the specific code as well) since the Mozilla 1.8 branch was originally cut, it is exciting to be getting close to releasing the first alpha since the last major release. Whilst there is lots more work to do to get us to the final, its the first big step in the right direction.

So, please do come along and help us test the alpha candidates. The more testing we get, the more confidence we’ll have in the candidates (assuming no failures!), and feedback will help us learn where we need to improve for the next alphas, betas and the final.

Soon to be a few less (minor) MailNews Memory Leaks

(I actually found the bugs a few days ago, but only just got round to blogging about it)

A couple of days ago, I was reviewing a patch and came across a function call to an interface of the type:

void foo(out unsigned long aCount, [array, size_is(count)] out bar aResult);

Where bar was an object derived from nsISupports. The aResult was being freed with NS_Free, instead of NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY. This would have ended up with MailNews leaking most of the objects in the array.

Being curious about where this came from, I did a quick search for the function, and found one instance already in the main code base, where we called NS_Free instead of the NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY. It wasn’t a major leak and would only happen on migration of some of the tag preferences, and for most users would probably end up being 300 bytes. However bug 431404 was raised, and that will soon be checked in.

Having realised that at least one instance in MailNews did this wrong, I did a quick audit of the other function calls in MailNews that obtain an array in the style above. A bit of searching later and I filed the patch on bug 431414, this fixes several leaks in migration, one potential leak in the LDAP autocomplete code, and two leaks related to getting/receiving mail.

The leaks I found when getting/receiving mail, really are small, effectively 4 or 8 bytes per message or newsgroup post, so you probably won’t notice too much difference. These also won’t show up on the Leak stats as we don’t currently receive messages in those tests (that is one of the things I want to extend those tests to do).

Improving MailNews performance, reducing leaks, bloat etc, is something I really want to see happen, this is one small step along the road, and I’ll certainly be looking out for more instances where we do our memory management wrong.

Address Book Status at Thunderbird 3.0 Alpha 1

Now that Thunderbird is in 3.0 Alpha 1 Code Freeze, I want to point out some of the changes since Thunderbird 2 to the Address Book back-end code and where it is likely to be going post-Alpha 1.

First, though, for all of those wanting to see improvements to the UI – we are starting to discuss these in more detail (keep an eye on the newsgroups), and are planning for them to be included Thunderbird 3.0 – the back-end improvements have currently taken priority as they will give us a much better basis for us to improve the UI.

So what are the main changes so far in the address book between Thunderbird 2.0 and Thunderbird 3.0alpha1?

Continue reading “Address Book Status at Thunderbird 3.0 Alpha 1”