I have a 2013 Mac Mini (OSX 10.9.3) installed in a gallery for the next 6 months and in preparation for the long haul, I’ve set the computer to power cycle every night, restarting in the morning, have my OF app in the Mac login items, and am running Lingon with some shell scripts to keep an eye on the computer from the cloud.
The app uses the ofxOsc library to communicate bidirectionally with an iPad. Here’s the problem: When I try to auto start the OF app on login, the app crashes. Log says,
libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: unable to connect udp socket
It looks like the issue with the UDP socket happens when I create a ofxOscSender object on app load, and initialize it to a host ip that is anything outside of localhost.
If I sign into the Mac Mini with Logmein, I can launch the app no problem from the dock, but having to do that every morning for 6 months seems unnecessarily arduous. I’m using OF v0.8.0.
Has anyone had this problem before?
Here’s my bare bones implementation:
in my testApp::setup() function I call an osc setup method from my own OSC class wrapper:
void OSC::setup(string& hostname, int& recPort, int& sendPort) {
receiver.setup(recPort);
cout << "listening for osc messages on port " << recPort << endl;
sender.setup(hostname, sendPort);
cout << "waiting to send on port " << sendPort << endl;
...
}