I’m getting a
terminate called after throwing an instance of 'osc::MalformedPacketException'
what(): element size must be multiple of four
I know the incoming packet was malformed, so my question is what is the pattern to catch these and not terminate app. Update looks like this:
void ofApp::update(){
// check for waiting messages
while(receiver.hasWaitingMessages()){
ofxOscMessage m;
receiver.getNextMessage(m);
if(m.getAddress() == "/key/1"){
key1 = m.getArgAsInt32(0);
}
}
}
I tried some try{} catch{} blocks around the OSC functions, but app still terminates. Is there an example of how to deal with malformed packets gracefully? or is it a problem with ofxOsc?