Screenshots, debugging the hard way

Screenshots of tinymail on devices

Koen created a screenshot of a tinymail demo ui showing his E-mails:

Inspired by Koen’s adventure, I decided to retry getting the demo ui working on the Nokia 770. My little brother has our camera at this moment, so it’s not a video demo but in stead this picture which I took with a crappy cellphone camera:

Debugging fun

Sometimes bug reports like this can still be useful. Just subtract the PC (program counter) value 0x40afdf54 with the start of the location of the library that is mmapped at that location, which in this case is libglib mmapped at 0x40b57000 until 0x40b58000. Now subtract the PC (0x40afdf54) with the begin of that mmap (0x40b57000) and you get 0x00024f54. SO I asked Koen to give me an objdump of his libglib-2.0.so.0.1200.3.so. We learn that at that location, you have the function “00024f54 [g_mapped_file_get_contents]:”.

I started looking at places where I called for the contents of a mapped file. It turned out that I didn’t check for errors after g_mapped_file_new. That was the location and reason of the crash. What the real bug is, we still have to figure out. It looks like his jffs2 filesystem sometimes didn’t create the summary.mmap file.

Feww, it wasn’t a ARM mmap data alignment problem. Those are hard to find. The kernel helps a little bit by trapping them. But still. Anyway, the first part of the fix is of course to check for errors after the g_mapped_file_new.

However! The real message is: why wasn’t Koen’s gdb working correctly on his device? :)

Designing sending E-mails

While doing design for tinymail, we create a simple wiki page, throw some sketches to it. Yes, hand-drawn & scanned in (doesn’t matter). Then I usually make a nice UML class diagram out of that. This time I used ArgoUML (None of the existing tools really work the way they should. I’m not saying ArgoUML is the good stuff, it’s just the least bad crap software that is available for this. — It’s still crap –). People like you guys get to make comments on it (hence me blogging about it). Finally, somebody (most likely me) will implement it.

This is the design page for “sending E-mails”. The tinymail framework is, indeed, going to aid the E-mail application developer with sending messages in an asynchronous way by implementing most of this in an inheritable, re-implementable, enhanceable and most importantly optional little inner framework or predefined method. You can still develop and design your own idea around this. Maybe in case your device or application needs a different way of sending E-mails that doesn’t use outbox, sentbox and draft folders? I don’t know. I can’t know. It’ll be both enhanceable and optional.