Archive for January, 2007

Another Macro Bug

Wednesday, January 31st, 2007

Here. Thanks to Christian from Motorola for pointing it out!

Java binary compatibility

Sunday, January 28th, 2007

One of the things that my time at Symbian taught me was the importance of binary compatibility. In the end I was pretty good at thinking through whether any given change to a bit of C++ code would adversely affect users of the previous version of said code. Now I have to learn all the same stuff over again with Java, so that the release of the first version of my plugins doesn’t affect my ability to change them in future. Right now it looks like this might be a good starting point.

Contributing debug symbol lookup

Friday, January 26th, 2007

Right now, a lot of my code is focussed on converting numeric memory addresses into textual function names – with a location in the source code. (For the non-techies… computer programmes get converted from an English-like form to a coded form which can be used by the computer. I need to convert one aspect of that coded form back to what the programmer can understand).

I tried several ways of achieving this, spending several weeks hitting brick walls. I eventually found a solution but it’s rather complex. So I’d rather switch to a more sensible solution, and get rid of all that unnecessary complexity. Nokia’s existing debug technology already has routines to perform this conversion, but those routines aren’t currently accessible to me; so I’d really like Nokia to add an interface to allow me to access it.

This part of Eclipse is structured such that it includes generic debugging software and interfaces. Below that, each vendor implements their own debugger, so that it performs according to those interfaces.

So, if Nokia were going to add this facility, ideally somebody would add the interface to the generic layers, and then Nokia would implement this interface in their layer. This also makes sense because I know other people from other companies want the same facility that I do. So I volunteered to write the generic layer, and asked around at the pluginfest to find out who would know about how to approach that. The answer, invariably, was Nokia themselves… the implication being that I’d have to hassle Nokia to find out how to add this stuff to the generic layer, whilst they were also kindly implementing the facility in their own implementation layer.

That doesn’t sound like a good plan to me. And the alternative is that I try to hack this API into place without any wisdom or guidance from others, which doesn’t sound any better. So I think I’ll just wait and see what Nokia come up with. If they are able to produce such an API, I’ll then look at whether it can retrospectively be made generic, and try to contribute at that point.

Pluginfest Day Two

Thursday, January 25th, 2007

So, I achieved my objectives. Tuesday night I made a list of all the people I needed to talk to – along with my existing lists of what I needed to talk to them about – and yesterday (the second day of the pluginfest) I tried to fill up every available moment with talking to people. On the whole, I think I did well – all but two companies are crossed off the list, and I certainly didn’t have any spare moments.

Top credit to Ken Ryall and Dan Podwall of Nokia for being really helpful. I’ve explained the technical problems I’m having, and Ken was kind enough to look into how they might be able to expose APIs (Application Programming Interfaces, i.e. means to communicate with Nokia software) to make my work easier. If they do, I’ll be able to stop messing around with many low-level areas of debugging, and work on producing higher-level and more sophisticated tools on top. Which is great.

I also spoke to many of the OS/tools vendors – WindRiver, QNX, ST, IBM, ST (sort of). They all produce embedded operating systems, like Symbian, but unlike Symbian they seem to care just as much about the tools they produce, as they do the OS itself. Some of the tools available from WindRiver, for example, are just light years ahead of what’s available for Symbian OS.

Having said that, nobody seems to be doing exactly what I’m doing, and talking to Christian Kurze from Motorola it sounds as though it might just be unfeasibly complicated on Linux – oddly, this makes me happy as I don’t have to worry about competition, even if I can’t make anything work myself. Either way, Linux for me is a distant prospect… I am Symbian OS focussed for now.

Symbian themselves deserve a lot of credit for hosting this event. They also liberally scattered their engineers around – Andrew Ferguson was kind enough to spend a long while answering a whole slew of stupid primitive Eclipse questions. I hope many of their engineers got a lot out of it themselves.

Also, it looks like we’ll be forming some sort of informal group for Eclipse-monkeys in Cambridge. I was about to suggest some sort of Wiki page and/or mailing list to Derek Morris of Code Red, but then he jumped in with the suggestion that we just meet up in the pub now and again instead. Which is clearly a much better idea. The Wrestlers on Newmarket Road seems to be the favourite, as apparently it’s an old Acorn haunt. If any other Eclipsifiers in Cambridge want to be involved, drop one of us a line.

Most impressive/surprising things of the pluginfest for me:

  • Carbide 1.2 abandons their Managed Build System and moves back to the old Symbian build chain (abld). And yet, it’s now much quicker!
  • Sony Ericsson have a CBR tools GUI written in Eclipse, of sorts. It’s very focussed around their own use-cases, but in effect it does EnvInfo, MakeEnv, GetEnv, GetRel etc.
  • The QNX and WindRiver tools are terrific. WindRiver’s memory profiling stuff in particular blew me away. There are so many different graphs showing how things on their device can allocate memory.
  • My own stuff. OK, it’s a memory leak diagnoser – big deal – but my demos didn’t go wrong once; it worked perfectly. Wow.

Also, whilst at the pluginfest, I may have removed two full configuration steps from my tools. That’s a really big deal for me when most Symbian OS tools seem to fail because they’re hard to configure. One is the installation of Microsoft’s dbghelp.dll, which I fervently hope won’t be necessary if and when Nokia introduce an API for what I need. The other is a way to avoid having to capture textual output form the Symbian OS device: I remembered that such information is now transmitted over an additional channel, BTrace, which I listen to already. If I just capture it there, I have no need for the additional console listeners. Hooray.

Finally – I sometimes take the mickey out of certain aspects of Symbian. (People who know me might say that as an understatement). But credit were it’s due – Symbian was generous to spend the money on organising this event, and it worked out well. (Thibaut Rouffineau was the main organiser – thanks!). I hope that next year somebody else will take up the mantle. Maybe by then, I will have five hundred employees and enough meeting rooms to hold such an event. Ahem.

PS you can see photos of the pluginfest here

Pluginfest Day One

Tuesday, January 23rd, 2007

Report from the Eclipse Pluginfest Day One – it seemed to be generally productive for most people.

Many of the participants (including myself) had Eclipse plug-ins or platforms for specific circumstances (for example, operating systems) so there wasn’t as much testing of plug-ins as there might have been. That said, I’m sure some people such as the CollabNet and Perforce guys were very busy testing their plug-ins on all sorts of platforms.

The rest of us, meanwhile, spent useful time talking about how we could work together. I had interesting discussions with Sony Ericsson, Symbian and various other companies. Most of the Symbian guys I spoke to seemed surprised that I had actually produced something – I’m not just vapourware!

For all it was a productive and interesting day, I didn’t actually solve any one of the twenty or so technical issues/questions/interoperability points that I brought along. So I’m going to have to work really hard tomorrow to nail them down.

Another good week

Sunday, January 21st, 2007

Next week I’m off to the Eclipse Pluginfest which conveniently is being hosted by Symbian down in London. The idea of the event is for plugin makers like me to test with other plugins, to make sure they don’t break each other.

I’ve therefore spent a couple of weeks desperately trying to pull together something that can be installed on someone else’s PC. I’ve got further than I expected – I have a memory leak debugging plug-in which can be installed on a standard S60 3.1 SDK, using a standard Carbide.C++ Express 1.1 IDE, and will give you a useful diagnosis whenever a memory leak occurs on the emulator.

There’s still a long way to go before it’s a saleable product (if indeed there seems to be any market opportunity for a memory leak plugin), but here are a couple of screenshots of the work-in-progress. It ought to be enough for useful testing this week, anyway. (And yes, it’s got the silly bug logo in the corner. For now.)

Panic Page One

Panic Page Two

Note that these images, as with everything else here, are © Macrobug Ltd.!

Technical skills I’ve learned so far

Sunday, January 21st, 2007

Obviously the job I’m trying to do is quite closely related to that which I was previously doing at Symbian. I wasn’t sure what new technical skills I would learn. So far, the list is:

  • Eclipse plug-ins
  • Win32 API programming
  • Subversion
  • C++ STL

Which I am quite pleased with.

Software licensing

Friday, January 19th, 2007

Not sure exactly what license I’ll eventually (hopefully) release tools under. So this was an interesting read.

Stupid bug of the day

Tuesday, January 16th, 2007

I have a producer-consumer relationship between two processes involved in my tools. (One of them is the Symbian OS emulator; the other is the development environment).

The ‘producer’ produces events and information which get sent to the consumer for later analysis.

Today some of my events were going missing. Every so often, 3846 events would simply not be received by the consumer. Mysterious. I tried everything I could think of to work out why it was 3846: relating it to all the typical computer-like things. Is it divisible by 256? No. What’s 4096-3846: 250. Mystery. And I just couldn’t figure out why those events weren’t being received.

Anyway, it turned out that it was because I had a terminal window open, running another consumer. Every so often it woke up – and, as designed – consumed some of my data. I’d forgotten I’d left this running a few hours ago when I was debugging something.

I still have no idea why it always claimed exactly 3846 events before going back to sleep, but at least it doesn’t do it any more. (Maybe that was how many events it could grab in a standard Windows timeslice, before Windows gave my other process a chance to run).


Mac backup software

Friday, January 12th, 2007

Has anyone found any good Mac backup software?

Most Mac backup software is considered harmful. Before that excellent post came out (in April 06) I was using Impression, but that post revealed shortcomings in the way Impression works.

The only reliable two options seemed to be Synk or SuperDuper. I’ve been struggling on with Synk since August (it’s shareware, but I paid for it back then)… but I really can’t stand it any longer.

In theory it’s great. It uses the same mechanism as Spotlight to keep track of the changes on your hard disk – which means each backup should take only a few minutes. But in practice, that mechanism just doesn’t work. Furthermore, every time I backup it finds a list of “conflicts” between my original hard disk and my backup. Huh? There can’t be “conflicts” – it’s a backup – my hard disk wins every time, by definition. Resolving these conflicts takes – literally – half an hour choosing the same option in 214 pop-up menus, due to the design of the interface. And then, sometimes, the backup doesn’t work.

So, I am going to try to get my money back. I’ve never tried getting my money back from a shareware developer. Wish me luck.

Meanwhile, I’m giving SuperDuper a go. It looks happy so far:


Update: the guys at Synk gave me my money back within a few hours, with no quibbles. I’m glad. I wish them the best of luck.