Arduino Crashing Often in OF7

Hi,
I’m running an app that uses buttons and pots that are hooked up to an Arduino MEGA as a controller. The app usually runs smoothly, but every once in a while i compile it and it crashes. I have also noticed that it crashes more often when i run the app instead of compiling from x-code. Has anyone else ran into this problem before. Any help is much appreciated. Attached you can find a screen shot of the error.

thanks
Lucas

![](http://forum.openframeworks.cc/uploads/default/1814/Screen shot 2011-08-31 at 11.54.30 AM.png)

it would be more useful if you posted the text of the error message (think of the search function!).
anyway, maybe this is relevant: http://forum.openframeworks.cc/t/“exc-bad-access”:data-formatters-temporarily-unavailable/5720/0

Hi,
thanks.
This is what i get:

warning: Could not find object file “/Users/theo/Documents/CODE/__OPENFRAMEWORKS/gitOF/openFrameworks/apps/devApps/macDragDropExample/buildGlutFrameworkHackedWindowLevel10.4/libForeground.a(macx_foreground.o)” - no debug information available for “/Users/mcast/Code/GLUT-ToPost/macx_foreground.m”.

It looks like there’s a hardcoded path from Theo’s machine.

I also took a screen shot of the debugger.
Does this help?
cheers,

![](http://forum.openframeworks.cc/uploads/default/1816/Screen shot 2011-08-31 at 3.10.18 PM.png)

that’s a warning, but you get an Error, too: program received signal: EXC_BAD_ACCESS

If you check out the top of that loop you’ll see the if you’ll see that it’s checking for FIRMATA_SYSEX_REPORT_FIRMWARE, which is supposed to be at least 6 bytes long. I’m not sure why your Mega is sending an invalid sysex message, but what’s being sent over isn’t long enough or is somehow corrupted so that the 5th value in the serial port isn’t allocated properly. Where are you calling sendFirmwareVersionRequest()?

Hi, i actually solved my problem. I had made several extensions of ofbase class to create scenes for the project. I wasn’t running the arduino at the TESTAPP level and that was making it crash. When i put all of the arduino code in the TESTAPP level, everything worked super smoothly. Thanks for the help.
cheers,
Lucas