Recently got the following nasty notices in a crash report on an iphone app:

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: EXC_ARM_DA_ALIGN at 0x078e0032

Turns out that ARMv7, which is now compulsory, has memory alignment issues that ARMv6 didn't, so now people will probably see more of these issues.
Anyway, i could write about it, or i could post some links to helpful blogs:

Basically, replace code like this: 

destination = *((long *)unalignedPointer);

With this:

long tmp;
memcpy(&tmp, unalignedPointer, sizeof(tmp));
destination = tmp;

Thanks for reading! And if you want to get in touch, I'd love to hear from you: chris.hulbert at gmail.

Chris Hulbert

(Comp Sci, Hons - UTS)

iOS Developer in Sydney.

I have worked at places such as Google, Cochlear, News Corp, Fox Sports, NineMSN, FetchTV, Woolworths, and Westpac, among others. If you're looking for a good iOS developer, drop me a line!

Get in touch:
[email protected]
my resume

 Subscribe via RSS