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 (Freelancer / Contractor) in Australia.

I have worked at places such as Google, Cochlear, Assembly Payments, News Corp, Fox Sports, NineMSN, FetchTV, Coles, Woolworths, Trust Bank, and Westpac, among others. If you're looking for help developing an iOS app, drop me a line!

Get in touch:
[email protected]
github.com/chrishulbert
linkedin



 Subscribe via RSS