Symbolicator

Published OS X and iOS crash log symbolicator written in Swift on GitHub.

Introduction

Many people assume software development is scientific, precise, boring, follow-the-rules type of work. While that’s true to some extent (except the boring part of course :), I would argue it’s as much art and feeling as is music, painting or writing a book - starting a new software project is like staring at blank paper and slowly filling it with virtual ink. And many times you’re solving issues not just by deducing, but by following a “gut” feel. Which partially comes from years of experience working in the field.

Most of the time, being software developer is thrilling experience. Being able to create stuff out of nothing while working with talented people from all over the world. But there are times when some piece of code on some particular computer just doesn’t cooperate like it’s supposed to. Most of the time, it’s bugs in our own code, but sometimes it’s code in system provider’s frameworks to which we don’t have access and can only deduce by eliminating all other possibilities. That can be very time consuming. Luckily for us, there are many tools we have at our disposal that help us pinpoint the issue. On Apple’s platforms that’s Xcode and Instruments. However the front most interface with users which have issues with our products, especially when the issue involves crashes, are crash logs.

The problem

When OS X or iOS application crashes, the operating system detects it and saves all available information into a crash log. For developers, these logs provide valuable information about potential cause. But raw system data needs to be interpreted before it reveals which parts of our code are affected. This process is called symbolication - converting raw memory addresses into method names that relate to our code.

While situation regarding symbolication is better on iOS where Xcode will do it on your behalf, there’s no such thing for OS X (actually there are utilites and blog posts but they are either old or don’t provide nice automated way).

All the tools for symbolicating the crash logs are already present with every Xcode installation in the form of atos command line utility. That’s nice, but it requires you to provide couple of information: architecture, Xcode archive, base memory address and all addresses you want to symbolicate. As you can imagine that’s very error prone but as it turns out also very automatable. Most of the information is already there, in the crash log itself: application identifier, version, build number, architecture, all the addresses, so all it requires is scanning archives folders and match the info. Once match is found, pass it to atos and let is symbolicate all addresses.

I’ve been using atos for a long time and imagined a tool that would automate this for me. But never came to write it. Until now that is :)

tl;dr

Download symbolicator from GitHub. Check the included readme file for build and run instructions. Wish you happy symbolications :)



Want to reach us? Fill in the contact form, or poke us on Twitter.