weird crashing behaviour trying to use OSC in Linux...

hey forum,

I have been trying to hook up OF with superCollider3 via OSC, and have succeeded in passing a “hello world” message (unrecognized message); yet, whenever I try to pass a value that OF is listening for (for instance,’" “/mouse/position”, 1’) of just quits and gives me this:

oscReceiveExample_debug: /home/furenku/Software/openFrameWorks/of_preRelease_v0.05_linux_cb_FAT/addons/ofxOsc/src/ofxOscMessage.cpp|51|int32_t ofxOscMessage::getArgAsInt32(int) const: Assertion `index >=0 && index < (int)args.size()’ failed.|
||=== Build finished: 1 errors, 0 warnings ===|

I did install Damian’s (frey’s) ofxOsc 2, and still the same…

I wonder if anybody has seen this same error, and whether it could be Linux-related…

I’d appreciate any help!!

rodrigoFrenk

that’s an assertion you’re seeing, not a ‘weird crashing error’ - it means that something has gone wrong and, rather than crashing, the program has bailed out with an error message telling you what’s wrong.

(to use assertions you just say

  
#include <assert.h>  
...  
assert( something_that_should_always_be_true );  

)

so let’s have a look then:

  
oscReceiveExample_debug: /home/furenku/Software/openFrameWorks/of_preRelease_v0.05_linux_cb_FAT/addons/ofxOsc/src/ofxOscMessage.cpp|51|int32_t ofxOscMessage::getArgAsInt32(int) const: Assertion `index >=0 && index < (int)args.size()' failed.  

this is telling you that you’re trying to call getArgAsInt32( index ) when index is not in the range (0…args.size()-1). this will happen if, for example, you try and get arg 0 on a message that has no arguments, or arg 4 on a message that has just 1 argument.

double check what you’re asking for. argument indices are 0-based, so to get the first one you call getArgAsInt32(0).