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? :)