Hi,
I recently wrote a piece of software which makes use of liblo. The software is written in C, and uses liblo to interpret data from a kinect and send it to puredata via OSC messages. I ran the software, and it stopped sending OSC messages after 1021 had been sent - this is within a few seconds, as the kinect interpreter spits out data at a high rate. This is repeatable, every time it is run the same thing happens after the same number of messages. I checked the software, made sure it was working properly and then wrote a trivial piece of code which only used liblo, to send an OSC message every 1 second, for ever. This also stopped sending OSC messages, but after 305 had been sent, again completely repeatable. I changed the time between OSC messages to 2 seconds, this time it sent 1021 messages before stopping, again repeatable.
On each occasion, the sending software continued running, in the first case (the original piece of software I set out to write), it continued printing messages to the console as it should, messages printed from the same C function as that which sends the OSC messages.
The trivial test software which I wrote (lo_ex.c) is attached.
I also used oscdump, from liblo-tools, to ensure puredata was not the problem - in all cases the messages stopped at the same point, regardless of the software receiving them.
The version of liblo and liblo-dev I am using is 0.28-3, running on Ubuntu 12.04, kernel 3.11.0-18. I previously also tried version 0.26~repack-7, with the same results.
Hello, thanks for the report! I'm not sure what your original code does, but the example code you gave never frees the lo_address objects you are created. I think the process is likely running out of available sockets. After adding a call to lo_address_free() in your example, the counter increases past 1021.
Note that since actual socket allocation is deferred, lo_address_new() can't report an error, however after the 1021's lo_address is created, lo_send() returns -1 to indicate an error.