lldbopenframeworkssimbl

openFrameworks: Math killing debugger?


Using a lerping rectangle class in openFrameworks. I then tried to instantiate it as an array, but it crashed with error:

"warning: Could not find object file "/Users/mike/Projects/simbl/build/SIMBL.build/Deployment/SIMBL.build/Objects-normal/i386/SIMBLPlugin.o" - no debug information available for "/Users/mike/Projects/simbl/src/SIMBLPlugin.m".

The release build was slightly more stable than the debug.

When commenting out these two lines (within a function called continuously throughout the array of its class), it runs fine.

pos.x = catchUpSpeed * mouseX + (1-catchUpSpeed) * pos.x;
pos.y = catchUpSpeed * mouseY + (1-catchUpSpeed) * pos.y;

catchUpSpeed is .03f

Any thoughts on the error message? How did this error arise and how can it be avoided? I can't make heads or tails of it. Seems like simple enough math.

Thank you for reading!


Solution

  • You shouldn't see a crash if this happens, or rather, a crash shouldn't be caused by/related to this warning.

    There are two ways to build your app with debug information on Mac OS X / iOS: "DWARF" and "DWARF with dSYM". (these are options in your Xcode project Build Settings)

    "DWARF" means that the debug information exists in your .o (object) files. It is not copied into the final executable binary for your app. Your app binary has pointers back to the debug information in the object files. This helps to speed up the link & run cycle. But for it to work, your object files need to be located in the same place as when your built your app. Copying your app to another computer would likely break this. Removing your build intermediates would result in the same problem. The "DWARF" debug info scheme is designed for active development on your local desktop where the .o files will remain in place and not be removed while you're debugging your app.

    "DWARF with dSYM" means that when your app binary is linked together, another command (dsymutil) is run to create a linked version of all of your debug information -- a .dSYM bundle. This collects all of the debug information from your object files into a single bundle, and it sits next to your binary. If you want to copy your binary to another system to run & debug it, bring the dSYM along and everything will work fine.

    I'm not sure how you're using the build system so that this arrangement is failing for you at debug time, but if you're doing something behind the scenes so that your SIMBLPlugin.o object file does not exist wen you're debugging your app, try changing your project to DWARF with dSYM and you should be fine.

    If Xcode is crashing, it's unlikely to be related to that warning message from the debugger. But it would be worth filing a bug report if you're seeing this with a current (Xcode 4.6, etc) version of the tools. http://bugreport.apple.com/ - include the crash reporter text from one of the instances and that'll be a place for them to start.