oksunp / vvopensource

Automatically exported from code.google.com/p/vvopensource
0 stars 0 forks source link

8-byte alignment crashes (simple fix!) #33

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm encountering BAD_ACCESS crashes when running optimized (compiled for 
"release")

There's a simple fix -- in OSCInPort.h change the declaration of "but" to:

unsigned char           *buf;

and in OSCInPort.m,  initWithPort:  add the line:

buf = malloc(65506);

This will force buf to be properly byte-aligned for whatever system you're 
running (hooray for malloc!).  I haven't look for other cases of arrays or 
structs that are being allocated  with [], but they might produce similar 
problems...

Thanks for the great framework btw, really enjoying it!

Original issue reported on code.google.com by milburn....@gmail.com on 6 Jan 2013 at 4:37

GoogleCodeExporter commented 8 years ago
thanks andy!

Original comment by raycut...@gmail.com on 11 Jan 2013 at 12:25