what(): unable to create udp socket. Runtime error

Dear OF community.

I have a presentation with the software written with OF in 6 hours, and just now I found a runtime error

  
terminate called after throwing an instance of 'std::runtime_error'  
  what():  unable to create udp socket  
  
openFrameworks has exited due to signal 6 (SIGABRT).c  
  

I am sending multiple OSC messages to SuperCollider, sometimes 5,6 per second, depending on how the user interacts with the program.

When I send too many I get the above error message in the run log and then the program quits.

Please could someone help.

Thanks,

Mark

hmm…

1/ are you on Windows? Windows internal (localhost) networking is really bad, and probably can’t handle so much data.

2/ are you creating a fresh ofxOscSender() every time you need to send a message, or just reausing the old one? much better to reuse the old one.

3/ rebooted lately? :wink:

not sure if it has something to do, but oscpack the library used to send/receive osc messages, has some problems with memory allocation that can potentially crash an application. has never really had a problem with that but perhaps it’s what’s happening with your project.

if you want to give it a try, i’ve uploaded a win library with those errors fixed here:

http://arturocastro.net/files/oscpack/win/liboscpack.a

just substitute the one you have in oF/addons/ofxOsc/libs/oscpack/lib/win32 with this one

Thanks for your replies and suggestions guys,

1/ are you on Windows? Windows internal (localhost) networking is really bad, and probably can’t handle so much data.

2/ are you creating a fresh ofxOscSender() every time you need to send a message, or just reausing the old one? much better to reuse the old one.

3/ rebooted lately? :wink:

I’m on a mac, using 10.4.11 and yes, each time I start a create a new instance of ofxOscSender.

I’m gonna alter my code so that i just change the address instead of creating new senders each time.

And thanks for the osc lib arturo, but I am programming on a mac. If you could, could you tell me what sort of errors needed to be fixed in the osc lib file?

Thanks guys

That seemed to have fixed the problem!

I guess creating a new instance of ofxOscSender wasn’t too wise!

Perfect the program doesn’t crash!

Now the hard part of transporting an iMac and a sound system half way across London… Wish me luck!

Thanks again for your suggestions guys!