Announcement

Collapse
No announcement yet.

Bug w/ Blobs –*OSC Error 9911

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bug w/ Blobs –*OSC Error 9911

    Hello,

    Thank you for writing Osculator! It is an awesome tool.

    I do believe I found a strange bug in the way that Osculator processes blob messages.

    I am generating OSC messages from a command line tool I wrote in C using the liblo. I use Osculator for the occasional sanity check.

    For whatever reason, when a blob has a size that is cleanly divisible by 4, I get...

    "OSC Error 9911 in /my/namespace: Invalid message received"

    ...in yellow at the bottom of the screen.

    If the blob size is modulo 4 equal to 1,2, or 3, then all is fine and I see my messages without any errors.

    Interestingly enough, if I send the exact same stream to a Processing app using the OscP5 library, I get the exact opposite. The blobs with a size that is a multiple of 4 are just fine... and a blob with size % 4 == 2 throws an exception in Processing.

    Very strange. Can you elaborate on the 9911 error and what might be happening with the 4-byte boundary check?

    Many thanks,

    John

  • #2
    Hi John,

    From what I can see the error 9911 means LO_ESIZE, and is usually signaled when a message is received that is not valid (its size is not valid regarding the complete message size). There are many places where this error can be signaled so it is hard to tell exactly its cause.
    It would be very helpful if you could send me a little test case that I can reproduce so I can see if there is something wrong in liblo. I will have a look to see if I can reproduce the issue myself as well...


    Best,
    Cam

    Comment


    • #3
      I just ran the liblo test suite and there was no error, so unless this is an isolated case, I wouldn't bet that the blobs are broken in liblo. If you want to let me check the part of your program that deals with blobs, don't hesitate to send it to my email address (camille at osculator dot net).

      Comment


      • #4
        Sample Code for OSC Error 9911

        Hi Camile,

        Here is a quick little sample program that is still causing the error on my end.

        Many thanks for looking into this!

        -John

        #include <stdio.h>
        #include <stdlib.h>
        #include "lo/lo.h"


        main(int argc, char *argv[]){


        char test0[24] = {0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF ,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00 ,0x00,0xFF,0x00,0x00};
        char test1[25] = {0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00 ,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF ,0x00,0x00,0xFF,0x00,0x01};
        char test2[26] = {0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF ,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00 ,0x00,0xFF,0x00,0x00,0x01,0x02};
        char test3[27] = {0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF ,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00,0x00,0xFF,0x00 ,0x00,0xFF,0x00,0x00,0x01,0x01,0x03};


        char *osc_namespace = "/test";


        // create a new OSC destination


        lo_address osc_destintation = lo_address_new(NULL,"4444");


        // create the test blobs


        lo_blob test0blob = lo_blob_new(24, test0);
        lo_blob test1blob = lo_blob_new(25, test1);
        lo_blob test2blob = lo_blob_new(26, test2);
        lo_blob test3blob = lo_blob_new(27, test3);


        while(1) {
        printf("sending blob of size = 24 to localhost on port 4444\n");
        lo_send(osc_destintation, osc_namespace, "b", test0blob);
        sleep(1);
        printf("sending blob of size = 25 to localhost on port 4444\n");
        lo_send(osc_destintation, osc_namespace, "b", test1blob);
        sleep(1);
        printf("sending blob of size = 26 to localhost on port 4444\n");
        lo_send(osc_destintation, osc_namespace, "b", test2blob);
        sleep(1);
        printf("sending blob of size = 27 to localhost on port 4444\n");
        lo_send(osc_destintation, osc_namespace, "b", test3blob);
        sleep(1);
        }


        // free the blobs


        lo_blob_free(test0blob);
        lo_blob_free(test1blob);
        lo_blob_free(test2blob);
        lo_blob_free(test3blob);
        }

        Comment


        • #5
          Thank you John, I've created an Xcode project and managed to reproduce this issue.

          I've tried linking to liblo-0.26 (officially released version) and the current development version of liblo.
          OSCulator 2.12.3 uses a slightly modified development version of liblo-0.27.

          By linking your code to the development version of liblo-0.27, I noticed OSCulator was correctly receiving the blob, at all sizes.
          So it seem there is a bug in the way blobs are sent in liblo-0.26. Hopefully OSCulator is using a more recent version that has this bug fixed. I suggest you checkout liblo-0.27 from the repository (<pre>git clone git://gitorious.org/liblo/mainline.git</pre>) and try again with OSCulator.


          Best,
          Cam

          Comment

          Working...
          X